Jump to content


Photo

Help please: PND: libraries not available!


  • Please log in to reply
17 replies to this topic

#1 OFFLINE   hmc

hmc

    Advanced Member

  • Members
  • PipPipPip
  • 615 posts
  • Local time: 05:21 AM
  • LocationBavaria, Germany

Donator

Posted 02 July 2012 - 07:34 PM

Hi guys,

my libiconv problem is driving me nuts!
I'd kindly ask someone with some time on his hands and with decent PND knowledge to assist me sorting that out.

Situation is as follows:

My TrueCrypt PNDcontains a folder "lib", which contains libiconv.so.2.

The run script of the PND contains the code

LD_LIBRARY_PATH="./lib"
export LD_LIBRARY_PATH


But when I attempt to mount a TrueCrypt container, after entering the container password and then the user password, TrueCrypt claims that "libiconv.so.2" is not available!

I think this is a new problem in SuperZaxxon release 1.5. I think that in SuperZaxxon Beta5 this has worked. but I am not 100% sure about that.

Could anyone please help me? I am stuck with that problem now. :-(

Helping me would mean
- downloading the PND
- creating a truecrypt container to test with
- reproducing the error
- disassembling the PND
- analyzing the reason for the problem

This would be really great.

Thank you in advance!
Daniel
My focus is making the Pandora a good productivity tool. I only occasionally play games on the Pandora.
Have done that with the HP 200LX Palmtop (MS-DOS 5.0), the Sharp Zaurus SL-C3100 and 3200 (Linux), the mBook M1 and the Viliv N5 UMPCs (Windows XP/7). Now, with the Pandora, finally coming back to Linux after my not-so-good experiences with Windows and with the Intel ATOM-based UMPC hardware platform.
(Although I run a small business, http://www.hermocom.com, my intents here on the forum are mainly community-oriented!)
You may read my detailed introduction here.

#2 OFFLINE   mcobit

mcobit

    Does this thing work?

  • Members
  • PipPipPip
  • 4533 posts
  • Local time: 06:21 AM
  • LocationFrankfurt a.M., Germany

Donator

Posted 02 July 2012 - 07:35 PM

If the folder is called ".lib" and you export ./lib, that won't work ;)

#3 OFFLINE   hmc

hmc

    Advanced Member

  • Members
  • PipPipPip
  • 615 posts
  • Local time: 05:21 AM
  • LocationBavaria, Germany

Donator

Posted 02 July 2012 - 07:45 PM

sorry, no, the folder is called "lib" inside the PND.
Will correct this now in the first post
My focus is making the Pandora a good productivity tool. I only occasionally play games on the Pandora.
Have done that with the HP 200LX Palmtop (MS-DOS 5.0), the Sharp Zaurus SL-C3100 and 3200 (Linux), the mBook M1 and the Viliv N5 UMPCs (Windows XP/7). Now, with the Pandora, finally coming back to Linux after my not-so-good experiences with Windows and with the Intel ATOM-based UMPC hardware platform.
(Although I run a small business, http://www.hermocom.com, my intents here on the forum are mainly community-oriented!)
You may read my detailed introduction here.

#4 OFFLINE   mcobit

mcobit

    Does this thing work?

  • Members
  • PipPipPip
  • 4533 posts
  • Local time: 06:21 AM
  • LocationFrankfurt a.M., Germany

Donator

Posted 02 July 2012 - 07:54 PM

Ok. What about exporting fullpath?

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/utmp/truecrypt/lib

if it opens a new shell in the program and executes something from there, the setting could be lost, too.
Maybe you need to have a look at the program and how it executes this stuff.

#5 OFFLINE   hmc

hmc

    Advanced Member

  • Members
  • PipPipPip
  • 615 posts
  • Local time: 05:21 AM
  • LocationBavaria, Germany

Donator

Posted 02 July 2012 - 10:51 PM

full path doesn't help here. :-(

need sleep now. will continue tomorrow...

thanks anyway!
daniel
My focus is making the Pandora a good productivity tool. I only occasionally play games on the Pandora.
Have done that with the HP 200LX Palmtop (MS-DOS 5.0), the Sharp Zaurus SL-C3100 and 3200 (Linux), the mBook M1 and the Viliv N5 UMPCs (Windows XP/7). Now, with the Pandora, finally coming back to Linux after my not-so-good experiences with Windows and with the Intel ATOM-based UMPC hardware platform.
(Although I run a small business, http://www.hermocom.com, my intents here on the forum are mainly community-oriented!)
You may read my detailed introduction here.

#6 ONLINE   Neelix

Neelix

    Resident Talaxian

  • Supporter
  • 1213 posts
  • Local time: 02:21 PM
  • LocationMelbourne, Australia

Posted 03 July 2012 - 12:33 AM

I get the impression that the error message is not accurately reporting the problem.

According to lsof truecrypt is already successfully loading the library in question:
op-inigo:~$ lsof |grep "/mnt/utmp/TrueCrypt/libs"
truecrypt 2657 neelix  mem    REG	    7,2				   6 /mnt/utmp/TrueCrypt/libs/libiconv.so.2.5.1
truecrypt 2665 neelix  mem    REG	    7,2				   6 /mnt/utmp/TrueCrypt/libs/libiconv.so.2.5.1

- Neelix

This is the Internet, ffs - Everybody has an opinion, everybody publishes their opinion, and nobody listens to anybody else.


#7 OFFLINE   hmc

hmc

    Advanced Member

  • Members
  • PipPipPip
  • 615 posts
  • Local time: 05:21 AM
  • LocationBavaria, Germany

Donator

Posted 03 July 2012 - 08:45 AM

Neelix, can you reproduce the problem?
What firmware are you testing on?

Yesterday I totally messed up my SuperZaxxon 1.5 SD install. Nothing worked anymore, and after rebooting I even got the error "Login program cannot be executed" or similar. So I now went back to Beta5, and there the same PND works flawlessly, and lsof also reports that libiconv.so.2.5.1 is loaded from the PND's lib directory.

However, on a clean Superzaxxon 1.5 install on NAND, the PND produces that error, so the problem does not have to do with the mess of yesterday.

I am totally confused.

mcobit's idea, that the program internally launches a new shell, which does not see the LD_LIBRARY_PATH, is now disproven by the fact that the same PND works on Beta5, right?


Is there any hypothetical reason, why maybe a binary compiled on Beta5 is not able to load a library (although it can locate it) on release 1.5?

Thanks for any hint or idea!


Daniel
My focus is making the Pandora a good productivity tool. I only occasionally play games on the Pandora.
Have done that with the HP 200LX Palmtop (MS-DOS 5.0), the Sharp Zaurus SL-C3100 and 3200 (Linux), the mBook M1 and the Viliv N5 UMPCs (Windows XP/7). Now, with the Pandora, finally coming back to Linux after my not-so-good experiences with Windows and with the Intel ATOM-based UMPC hardware platform.
(Although I run a small business, http://www.hermocom.com, my intents here on the forum are mainly community-oriented!)
You may read my detailed introduction here.

#8 OFFLINE   notaz

notaz

    Advanced Member

  • Official OpenPandora Team
  • PipPipPip
  • 1689 posts
  • Local time: 07:21 AM

Posted 03 July 2012 - 11:01 AM

That does not make sense, nobody changed library lists during the whole beta to final.

Maybe your beta5 has codecpack installed and in influences things somehow?

#9 OFFLINE   hmc

hmc

    Advanced Member

  • Members
  • PipPipPip
  • 615 posts
  • Local time: 05:21 AM
  • LocationBavaria, Germany

Donator

Posted 03 July 2012 - 11:08 AM

Codec pack was also installed on final install...
My focus is making the Pandora a good productivity tool. I only occasionally play games on the Pandora.
Have done that with the HP 200LX Palmtop (MS-DOS 5.0), the Sharp Zaurus SL-C3100 and 3200 (Linux), the mBook M1 and the Viliv N5 UMPCs (Windows XP/7). Now, with the Pandora, finally coming back to Linux after my not-so-good experiences with Windows and with the Intel ATOM-based UMPC hardware platform.
(Although I run a small business, http://www.hermocom.com, my intents here on the forum are mainly community-oriented!)
You may read my detailed introduction here.

#10 ONLINE   Neelix

Neelix

    Resident Talaxian

  • Supporter
  • 1213 posts
  • Local time: 02:21 PM
  • LocationMelbourne, Australia

Posted 03 July 2012 - 04:58 PM

I have not been able to get it to mount the encrypted volume, and I get exactly the same error message.

I'm testing on SuperZaxxon Beta 5a w/ codec pack, as I haven't got around to reflashing with SuperZaxxon Final yet.

mcobit's theory makes sense to me, as the dialog box seems to be spitting out whatever is sent to stderr including the usual
"We trust you have received the usual lecture from the local System Administrator." message if its the first time you've run sudo since boot.

- Neelix

This is the Internet, ffs - Everybody has an opinion, everybody publishes their opinion, and nobody listens to anybody else.


#11 ONLINE   Neelix

Neelix

    Resident Talaxian

  • Supporter
  • 1213 posts
  • Local time: 02:21 PM
  • LocationMelbourne, Australia

Posted 04 July 2012 - 06:43 AM

Aha! It looks like mcobit was right. The fact that its it calling sudo seems to be the cause of the issue.
I found the following on the sudo man-page:

Note that the dynamic linker on most operating systems will remove
variables that can control dynamic linking from the environment of
setuid executables, including sudo. Depending on the operating system
this may include _RLD*, DYLD_*, LD_*, LDR_*, LIBPATH, SHLIB_PATH, and
others. These type of variables are removed from the environment
before sudo even begins execution and, as such, it is not possible for
sudo to preserve them.


It also provides a workaround, but it will mean having to change the truecrypt source-code:

Environment variables to be set for the command may also be passed on
the command line in the form of VAR=value, e.g.
LD_LIBRARY_PATH=/usr/local/pkg/lib. Variables passed on the command
line are subject to the same restrictions as normal environment
variables with one important exception. If the setenv option is set in
sudoers, the command to be run has the SETENV tag set or the command
matched is ALL, the user may set variables that would overwise be
forbidden. See sudoers(5) for more information.


If I have understood this, and what little I have seen of the source code correctly then I believe it should just be a matter of adding some code to CoreService.cpp to getenv("LD_LIBRARY_PATH") and then adding an assignment for it to the arguments passed to sudo on line 362.

HTH

- Neelix

This is the Internet, ffs - Everybody has an opinion, everybody publishes their opinion, and nobody listens to anybody else.


#12 OFFLINE   hmc

hmc

    Advanced Member

  • Members
  • PipPipPip
  • 615 posts
  • Local time: 05:21 AM
  • LocationBavaria, Germany

Donator

Posted 04 July 2012 - 09:56 AM

Neelix, thanks so much for this info! It sounds very plausible.

I need to sort out some firmware issues (SD-reinstall of release 1.5, because it's totally borked for some reason). Then I will try another method for onboard compiling and see, if this new method eliminates all these libiconv problems I had with compiling on Beta5. I hope it will.

If not, I will definitely try your suggestion with changing the call of sudo in CoreService.cpp.

Daniel
My focus is making the Pandora a good productivity tool. I only occasionally play games on the Pandora.
Have done that with the HP 200LX Palmtop (MS-DOS 5.0), the Sharp Zaurus SL-C3100 and 3200 (Linux), the mBook M1 and the Viliv N5 UMPCs (Windows XP/7). Now, with the Pandora, finally coming back to Linux after my not-so-good experiences with Windows and with the Intel ATOM-based UMPC hardware platform.
(Although I run a small business, http://www.hermocom.com, my intents here on the forum are mainly community-oriented!)
You may read my detailed introduction here.

#13 OFFLINE   hmc

hmc

    Advanced Member

  • Members
  • PipPipPip
  • 615 posts
  • Local time: 05:21 AM
  • LocationBavaria, Germany

Donator

Posted 11 July 2012 - 10:33 AM

Hi Neelix,
as the build system change did not solve the libiconv issue for me, I now went to try your suggestion.

But unfortunately I did not have success yet.
Maybe someone with more understanding of execvp() can give me a hint?


I patched line 362 of CoreService.cpp this way:

const char *args[] = { "sudo", "-S", "-p", "", strcat("LD_LIBRARY_PATH=",getenv("LD_LIBRARY_PATH")), appPath.c_str(), TC_CORE_SERVICE_CMDLINE_OPTION, nullptr )

(so I added that LD_LIBRARY_PATH stuff behind '-p ""' paramter of sudo).

What I get now, when mounting a volume, is - as usual - the prompt for my user password, and once entered, I get the message "Failed to obtain administrator privileges".
I assume that the syntax is not correct in some way, but I don't know why.

Also, is there a way to check the exact command line execvp() assembles from the args[] array in line 363?:

execvp (args[0], ((char* const*) args));

Thank you for any hint!

Daniel
My focus is making the Pandora a good productivity tool. I only occasionally play games on the Pandora.
Have done that with the HP 200LX Palmtop (MS-DOS 5.0), the Sharp Zaurus SL-C3100 and 3200 (Linux), the mBook M1 and the Viliv N5 UMPCs (Windows XP/7). Now, with the Pandora, finally coming back to Linux after my not-so-good experiences with Windows and with the Intel ATOM-based UMPC hardware platform.
(Although I run a small business, http://www.hermocom.com, my intents here on the forum are mainly community-oriented!)
You may read my detailed introduction here.

#14 ONLINE   Neelix

Neelix

    Resident Talaxian

  • Supporter
  • 1213 posts
  • Local time: 02:21 PM
  • LocationMelbourne, Australia

Posted 14 July 2012 - 03:33 PM

Hi Daniel,

If I read that correctly you are effectively separating the -p option from its argument. (I don't believe that empty string has any effect.) Try putting it before -p.

EDIT: On second thought I don't think that's right. What happens now if you run it first thing after a reboot? Could you provide the exact text of the error dialog?

- Neelix

This is the Internet, ffs - Everybody has an opinion, everybody publishes their opinion, and nobody listens to anybody else.


#15 OFFLINE   hmc

hmc

    Advanced Member

  • Members
  • PipPipPip
  • 615 posts
  • Local time: 05:21 AM
  • LocationBavaria, Germany

Donator

Posted 16 July 2012 - 04:39 PM

Hi Neelix,

tried with the LD_LIBRARY_LATH before the -p parameter, but it gave the same result.
Isn't the empty "" parameter after the -p the parameter of the -p parameter, i.e. an empty sudo prompt?
Anyway...
Here is the additional info you requested:

Booted, and then immediately executed the PND.
Mounted my volume.
entered the volume password:

Attached File  pan1sd0_2012-07-16_18-36-03.png   82.56K   15 downloads

Then I am asked for the administrator password:

Attached File  pan1sd0_2012-07-16_18-36-30.png   68.09K   21 downloads

I enter my user password.... OH, can this be the problem? Do I need to add truecrypt to a sudoers file or something, so this can work? Do we have an actual administrator password on the Pandora at all? But normally, when using sudo, I can enter my normal user password, and have admin rights.

Okay, back to reporting mode ;-)

I enter the user password, and this gives me this:

Attached File  pan1sd0_2012-07-16_18-36-48.png   75.23K   13 downloads

Any idea?...

Thank you!
Daniel
My focus is making the Pandora a good productivity tool. I only occasionally play games on the Pandora.
Have done that with the HP 200LX Palmtop (MS-DOS 5.0), the Sharp Zaurus SL-C3100 and 3200 (Linux), the mBook M1 and the Viliv N5 UMPCs (Windows XP/7). Now, with the Pandora, finally coming back to Linux after my not-so-good experiences with Windows and with the Intel ATOM-based UMPC hardware platform.
(Although I run a small business, http://www.hermocom.com, my intents here on the forum are mainly community-oriented!)
You may read my detailed introduction here.

#16 OFFLINE   M-HT

M-HT

    Advanced Member

  • Members
  • PipPipPip
  • 79 posts
  • Local time: 06:21 AM
  • LocationBratislava

Posted 17 July 2012 - 09:23 AM

Also, is there a way to check the exact command line execvp() assembles from the args[] array in line 363?:

execvp (args[0], ((char* const*) args));

Try something like this:

const char **arg;
arg = args;
while (*arg != nullptr)
{
    printf("%s ", *arg);
    arg++;
}
printf("\n");

Game ports (repo link): Albion, Asylum, Heart of The Alien Redux, Warcraft: Orcs & Humans, X-COM: UFO Defense, X-COM: Terror from the Deep
For developers: NEON scalers, Dosbox - dynrec update
Donations? Buy me a Kindle eBook from my wishlist.

#17 ONLINE   Neelix

Neelix

    Resident Talaxian

  • Supporter
  • 1213 posts
  • Local time: 02:21 PM
  • LocationMelbourne, Australia

Posted 18 July 2012 - 09:39 PM

Hi Daniel,

tried with the LD_LIBRARY_LATH before the -p parameter, but it gave the same result.
Isn't the empty "" parameter after the -p the parameter of the -p parameter, i.e. an empty sudo prompt?
Anyway...


Yeah I figured that out shortly after posting, hence the edit. :-)

Here is the additional info you requested:

Booted, and then immediately executed the PND.
Mounted my volume.
entered the volume password:

Then I am asked for the administrator password:

I enter my user password.... OH, can this be the problem? Do I need to add truecrypt to a sudoers file or something, so this can work? Do we have an actual administrator password on the Pandora at all? But normally, when using sudo, I can enter my normal user password, and have admin rights.


I very much doubt it. As I understand it, entering your user password is exactly correct. Your user account is already given permission to use sudo, so there is no need for additional permission for truecrypt specifically.

I enter the user password, and this gives me this:

Attached File  pan1sd0_2012-07-16_18-36-48.png   75.23K   13 downloads

Any idea?...


To be honest... I think it's misreporting the error.

The fact that it was reporting the library failure to begin with tells me that it was succeeding at obtaining administrator privileges all along, but the program is assuming a privileges problem if it doesn't see the expected outcome for any reason.

The fact that the dialogue box is otherwise empty tells me that nothing is now being sent to stderr by the process being executed, which in turn suggests to me that the command is being executed correctly, but it isn't doing something that the program expects it to do.

I think It would be useful at this point to add code similar to what M-HT suggested to discover the text of the command line being executed. Once we know what it was trying to execute, we should then be able to trace where it is being called from and what the testing conditions are, and hopefully, what the actual effect of the command is.

Is it possible that it worked and reported the error anyway? Maybe there is a race condition and the execution of the command took longer than the program was expecting, so it reported failure? I'd suggest you try it again then type mount in a terminal, to see if the volume was in fact mounted.

- Neelix

This is the Internet, ffs - Everybody has an opinion, everybody publishes their opinion, and nobody listens to anybody else.


#18 OFFLINE   hmc

hmc

    Advanced Member

  • Members
  • PipPipPip
  • 615 posts
  • Local time: 05:21 AM
  • LocationBavaria, Germany

Donator

Posted 18 July 2012 - 09:46 PM

Thanks Neelix and M-HT. Working on some other very time-consuming project currently, so this topic must wait until maybe tomorrow, maybe the weekend, for further investigation.
Will report back here, as soon as I have the time to continue!
Daniel
My focus is making the Pandora a good productivity tool. I only occasionally play games on the Pandora.
Have done that with the HP 200LX Palmtop (MS-DOS 5.0), the Sharp Zaurus SL-C3100 and 3200 (Linux), the mBook M1 and the Viliv N5 UMPCs (Windows XP/7). Now, with the Pandora, finally coming back to Linux after my not-so-good experiences with Windows and with the Intel ATOM-based UMPC hardware platform.
(Although I run a small business, http://www.hermocom.com, my intents here on the forum are mainly community-oriented!)
You may read my detailed introduction here.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users