[OE-core] [PATCH v4 2/4] cmake.bbclass: search both sysroot-native and host for native packages

Pascal Bach pascal.bach at siemens.com
Thu Oct 18 15:05:12 UTC 2018


On 17.10.2018 18:24, Burton, Ross wrote:
> I think I figured out why we're seeing odd failures on the
> autobuilder, such as
> https://autobuilder.yoctoproject.org/typhoon/#/builders/15/builds/125.
>
> The important bit of the log is:
>
> File "/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/qemux86-poky-linux-musl/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/lib/python3.5/site-packages/libcomps/__init__.py",
> line 1, in <module>
> from ._libpycomps import *
> ImportError: libpython3.6m.so.1.0: cannot open shared object file: No
> such file or directory
>
> The smoking gun is that oe-core doesn't have Python 3.6, but 3.5.
>
> My suspicion is that for systems where the host has python3-devel
> installed, libcomp-native's cmake is using the host python instead of
> the native python in the sysroot.  I'm not sure yet if BOTH means it
> searches the host before the sysroots, or if it is finding the python
> binary in HOSTTOOLS and then asking that what the paths are.  Either
> way, it ends up linking to the host libpython3.5.so and going into
> sstate.  Another machine in the pool reuses this sstate but it doesn't
> have Python 3.6 installed, so the library link is broken.
That is definitively not the intention here.

For target builds it is pretty clear that there should be no usage of host dependencies.
For native it is not so clear to me. There seems to be some dependencies like the compiler and associated libs.

Maybe there is a way to bring this in a different way that is more selective instead of a general fallback to host as it would be with this patch?

What I'm traying to solve here was to get rid of these two lines in the wireshark recipe [1]:

-DM_INCLUDE_DIR=${includedir} \
-DM_LIBRARY=${libdir} \

As they effectively add /usr/include and /usr/lib to the search path of cmake.

Any toughts?

Pascal

[1] http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-support/wireshark/wireshark_2.6.2.bb?h=master#n62



More information about the Openembedded-core mailing list