* Issue with pseudo on 64-bit build host
@ 2013-06-26 9:33 Erik Botö
2013-06-26 13:30 ` Laurentiu Palcu
0 siblings, 1 reply; 4+ messages in thread
From: Erik Botö @ 2013-06-26 9:33 UTC (permalink / raw)
To: openembedded-core
Hi,
In bitbake.conf FAKEROOTBASEENV is set to contain
"PSEUDO_LIBDIR=${STAGING_BINDIR_NATIVE}/../lib/pseudo/lib" but on my
buildhost libpseudo.so is in
${STAGING_BINDIR_NATIVE}/../lib/pseudo/lib64.
For me this causes rpm:s that use qemu_run_binary() to do stuff during
do_rootfs() (using post-install scripts) to fail, since ld.so can't
find libpseudo.so it gives an error that contains "ERR" which
package_rpm.bbclass rpm_log_check() picks up.
I git confused for a while since the command used in the post-install
script worked ok in a devshell but not during do_rootfs(), but this is
due to the fact that LD_LIBRARY_PATH in the devshell contains:
<mybuilddir>/tmp/sysroots/x86_64-linux/usr/bin/../lib/pseudo/lib64 . I
couldn't find where this was added to LD_LIBRARY_PATH for devshells
though.
Cheers,
Erik Botö
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Issue with pseudo on 64-bit build host
2013-06-26 9:33 Issue with pseudo on 64-bit build host Erik Botö
@ 2013-06-26 13:30 ` Laurentiu Palcu
2013-06-26 17:05 ` Erik Botö
0 siblings, 1 reply; 4+ messages in thread
From: Laurentiu Palcu @ 2013-06-26 13:30 UTC (permalink / raw)
To: Erik Botö; +Cc: openembedded-core
On Wed, Jun 26, 2013 at 11:33:17AM +0200, Erik Botö wrote:
> Hi,
>
> In bitbake.conf FAKEROOTBASEENV is set to contain
> "PSEUDO_LIBDIR=${STAGING_BINDIR_NATIVE}/../lib/pseudo/lib" but on my
> buildhost libpseudo.so is in
> ${STAGING_BINDIR_NATIVE}/../lib/pseudo/lib64.
>
> For me this causes rpm:s that use qemu_run_binary() to do stuff during
> do_rootfs() (using post-install scripts) to fail, since ld.so can't
> find libpseudo.so it gives an error that contains "ERR" which
> package_rpm.bbclass rpm_log_check() picks up.
What's the exact error you're seeing? Is it the one listed below?
ERROR: ld.so: object 'libpseudo.so' from LD_PRELOAD cannot be preloaded:
ignored.
This error appears if we run qemu inside pseudo. That's why we use
PSEUDO_UNLOAD=1 in front of the qemu command. However, qemu_run_binary()
already does that...
More info would be helpful.
Laurentiu
>
> I git confused for a while since the command used in the post-install
> script worked ok in a devshell but not during do_rootfs(), but this is
> due to the fact that LD_LIBRARY_PATH in the devshell contains:
> <mybuilddir>/tmp/sysroots/x86_64-linux/usr/bin/../lib/pseudo/lib64 . I
> couldn't find where this was added to LD_LIBRARY_PATH for devshells
> though.
>
> Cheers,
> Erik Botö
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Issue with pseudo on 64-bit build host
2013-06-26 13:30 ` Laurentiu Palcu
@ 2013-06-26 17:05 ` Erik Botö
2013-06-26 17:43 ` Peter Seebach
0 siblings, 1 reply; 4+ messages in thread
From: Erik Botö @ 2013-06-26 17:05 UTC (permalink / raw)
To: Laurentiu Palcu; +Cc: openembedded-core
On Wed, Jun 26, 2013 at 3:30 PM, Laurentiu Palcu
<laurentiu.palcu@intel.com> wrote:
> On Wed, Jun 26, 2013 at 11:33:17AM +0200, Erik Botö wrote:
>> Hi,
>>
>> In bitbake.conf FAKEROOTBASEENV is set to contain
>> "PSEUDO_LIBDIR=${STAGING_BINDIR_NATIVE}/../lib/pseudo/lib" but on my
>> buildhost libpseudo.so is in
>> ${STAGING_BINDIR_NATIVE}/../lib/pseudo/lib64.
>>
>> For me this causes rpm:s that use qemu_run_binary() to do stuff during
>> do_rootfs() (using post-install scripts) to fail, since ld.so can't
>> find libpseudo.so it gives an error that contains "ERR" which
>> package_rpm.bbclass rpm_log_check() picks up.
>
> What's the exact error you're seeing? Is it the one listed below?
>
> ERROR: ld.so: object 'libpseudo.so' from LD_PRELOAD cannot be preloaded:
> ignored.
Yes, that's the one.
>
> This error appears if we run qemu inside pseudo. That's why we use
> PSEUDO_UNLOAD=1 in front of the qemu command. However, qemu_run_binary()
> already does that...
Yes PSEUDO_UNLOAD=1 should do that, but the hosts libpseudo is not
found when invoking qemu. Therefore the code in pseudo that would
clean the environment of any libpseudo.so in LD_PRELOAD before handing
of to qemu is not run and LD_PRELOAD still contains libpseudo.so in
the qemu environment.
A colleague of mine running 64-bit Arch Linux does not seem to hit
this, but I see it on 64-bit Ubuntu 13.04 and an earlier version
(don't recall that machine's exact version right now and don't have
access to it now). This puzzle me a bit.
>
> More info would be helpful.
I hope I clarified a bit.
Cheers,
Erik
>
> Laurentiu
>
>>
>> I git confused for a while since the command used in the post-install
>> script worked ok in a devshell but not during do_rootfs(), but this is
>> due to the fact that LD_LIBRARY_PATH in the devshell contains:
>> <mybuilddir>/tmp/sysroots/x86_64-linux/usr/bin/../lib/pseudo/lib64 . I
>> couldn't find where this was added to LD_LIBRARY_PATH for devshells
>> though.
>>
>> Cheers,
>> Erik Botö
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Issue with pseudo on 64-bit build host
2013-06-26 17:05 ` Erik Botö
@ 2013-06-26 17:43 ` Peter Seebach
0 siblings, 0 replies; 4+ messages in thread
From: Peter Seebach @ 2013-06-26 17:43 UTC (permalink / raw)
To: openembedded-core
On Wed, 26 Jun 2013 19:05:05 +0200
Erik Botö <erik.boto@pelagicore.com> wrote:
> Yes PSEUDO_UNLOAD=1 should do that, but the hosts libpseudo is not
> found when invoking qemu. Therefore the code in pseudo that would
> clean the environment of any libpseudo.so in LD_PRELOAD before handing
> of to qemu is not run and LD_PRELOAD still contains libpseudo.so in
> the qemu environment.
Hmm. I'm wondering what the order of operations in the shell is. In theory,
nearly all of bitbake should be running with libpseudo loaded, just often in
PSEUDO_DISABLED mode. I wonder whether maybe there's some shells that set
the environment variable up, then fork, and some that fork, then set the
environment variable. That could do it. Pseudo will check the environment
variable on both fork and exec, I believe. But if we are able to end up
getting into a situation where libpseudo.so is in LD_PRELOAD, but doesn't
get found, then yeah, PSEUDO_UNLOAD won't work.
And yes, it should be lib64, not lib, I think.
-s
--
Listen, get this. Nobody with a good compiler needs to be justified.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-06-26 17:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-26 9:33 Issue with pseudo on 64-bit build host Erik Botö
2013-06-26 13:30 ` Laurentiu Palcu
2013-06-26 17:05 ` Erik Botö
2013-06-26 17:43 ` Peter Seebach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox