[oe] STAGING_LIBDIR_NATIVE needed in bitbake.conf

Mike (mwester) mwester at dls.net
Tue Aug 7 09:14:04 UTC 2007


----- Original Message ----- 
From: "Richard Purdie" <rpurdie at rpsys.net>
To: <openembedded-devel at openembedded.org>
Sent: Tuesday, August 07, 2007 3:52 AM
Subject: Re: [oe] STAGING_LIBDIR_NATIVE needed in bitbake.conf


> On Tue, 2007-08-07 at 08:22 +0200, Marcin Juszkiewicz wrote:

> > It should be done in classes/native.bbclass not in ncurses-native. The
> > problem is wider as there are few distributions which have host versions
> > of stuff other then OE use as native. As a result building of native
> > stuff which depend on native libraries can fail - when you will set
> > LD_LIBRARY_PATH in native.bbclass then it should work.
>
> Just to be clear, this is a problem with ncurses-native? If so,
> STAGING_LIBDIR_NATIVE == STAGING_LIBDIR due to native.bbclass anyway so
> we don't need the _NATIVE version?

No, this is a problem with ncurses, not ncurses-native.  The issue arises
because ncurses-native builds a utility (dynamically linked), and stages
same along with it's library.  This staged utility is executed during the
do_install task of ncurses itself, and that's the point at which it fails if
LD_LIBRARY_PATH is not set.  It's gone unnoticed, I suspect, because up to
recently the utility has successfully dynamically linked to the host's copy
of that library instead of the one in staging.

So LD_LIBRARY_PATH needs only to be set for ncurses, not for ncurses-native
(but since ncurses-native includes ncurses, it ends up set (harmlessly) for
ncurses-native as well).

> We'd only need a _NATIVE version if our cross compiled packages needed
> to reference something there explicitly (like they do some of the
> binaries). DoO we need to do that (and if so, which package and why)?

I think they do -- how else do the dynamically-linked executables in staging
find their shared libraries?

Of course, using staticly-linked executables in staging will solve *this*
problem -- but it creates major headaches for utilities such as fakeroot,
which require that everything be dynamically-linked.

> Setting LD_LIBRARY_PATH for native.bbclass sounds like a worthwhile
> experiment...
>
> Cheers,
>
> Richard


Thanks,
Mike (mwester)





More information about the Openembedded-devel mailing list