[Openembedded-architecture] Sharing sstate cache and detecting build host paths in -native recipes

Phil Wise phil at advancedtelematic.com
Wed Mar 29 09:06:00 UTC 2017


Recently we've started using SSTATE_MIRRORS to share intermediate build
output between machines, and have run into a few issues where -native
recipes end up baking in hard-coded paths to their build hosts. One
example would be [1], but many Linux executables hard-code paths to
resources, and I would consider it to be 'normal' Linux behavior.

So far we've fixed this in a whack-a-mole fashion by either changing
code to pass in paths at run time, or by making the recipe explicit
about it's dependency:

SYSROOT_DIR = "${STAGING_DIR_TARGET}"
SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}"
do_configure[vardeps] += "SYSROOT_DIR"


What is the best way to solve this permanently?


Some ideas that come to mind:

a) Explicitly white-list -native recipes that are safe for upload to a
shared sstate mirror.

b) Modify recipes that bake in a path to their sysroot to include this
path in the cache key.

c) Write a script that would grind over a sstate cache and find possibly
broken recipes.

d) Add something to the automatic QA magic that would detect this latent
bug when the recipe is being built.

e) Have a standard way for a -native recipe to signal that it isn't
portable between different staging directories, possibly in conjunction
with option d.

f) Perform some kind of relocation when unpacking the cached objects
(like https://bugzilla.yoctoproject.org/show_bug.cgi?id=9242), but this
might be hard if the path ends up as a string constant.


Best Regards,


Phil

[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=9883

-- 
Phil Wise, ATS Advanced Telematic Systems GmbH
Kantstrasse 162, 10623 Berlin
Managing Directors: Dirk Pöschl, Armin G. Schmidt
Register Court: HRB 151501 B, Amtsgericht Charlottenburg


More information about the Openembedded-architecture mailing list