[poky] perl binary hard-code path hurts sstate

Chris Larson clarson at kergoth.com
Fri Dec 17 05:49:35 PST 2010


On Thu, Dec 16, 2010 at 10:29 PM, Tian, Kevin <kevin.tian at intel.com> wrote:
> (change the title to better reflect the ongoing thread)
>
> sstate.bbclass solves the absolute path issue by encoding a special pattern
> (FIXMESTAGINGDIR) in all sysroot paths captured in plain text files (headers,
> config files, etc.), and then replace them with new path when installing into a
> different directory. This works well until below issue is reported.
>
> The problem is that perl includes absolute path inside its binary:
>        xxx/usr/lib/perl/5.8.8/CORE/libperl.so
> (Nitin, please correct me whether this is the actual case)
>
> I'm not sure how to work around it to allow a successful sstate reuse.
>
> On the other hand, perhaps we could introduce some blacklist to mark some
> packages not sstate-able? I think such case is rare. After rebuilding perl from
> scratch in the new build dir, the error disappears and the build is continuing.
> I'll see whether there're other similar issues cross the build.

These sorts of issues aren't new, or fun, sadly.  We've run into many
like this using packaged staging.  We had to use the variable to
disable packaged-staging for exactly this reason, so something similar
for sstate would indeed be useful for this.  Most of us lack the time
to patch upstreams with true package relocatability, unfortunately.
Note that there are cases where projects will obey environment
variables to override the hardcoded default paths, and in those cases
one can generate wrappers for native/cross/nativesdk binary
execution.. not ideal, but gets the job done, and there's a
convenience function for generating them in the upstream OE classes.

In the past, I've used a script that rebuilt every recipe, one by one,
with all of its dependencies prebuilt using a different build path.
Something like that would likely be useful for catching these sorts of
issues with sstate as well.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics



More information about the poky mailing list