Git rev: master/6c5d7f1fb276cbe0a461ece6c8f0ca17a478fa8c Image location: https://autobuilder.yoctoproject.org/pub/nightly/20160605-1/ Steps: 1. Download kernel, rootfs tarball and toolchain from https://autobuilder.yoctoproject.org/pub/nightly/20160605-1/ 2. Install toolchain and set the environment: $ ./poky-glibc-x86_64-core-image-sato-armv5e-toolchain-2.1+snapshot.sh Poky (Yocto Project Reference Distro) SDK installer version 2.1+snapshot ======================================================================== Enter target directory for SDK (default: /opt/poky/2.1+snapshot): You are about to install the SDK to "/opt/poky/2.1+snapshot". Proceed[Y/n]? Extracting SDK.........................................................................done Setting it up...done SDK has been successfully set up and is ready to be used. Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. $ . /opt/poky/2.1+snapshot/environment-setup-armv5e-poky-linux-gnueabi $ . /opt/poky/2.1+snapshot/environment-setup-armv5e-poky-linux-gnueabi $ which runqemu-extract-sdk /opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/runqemu-extract-sdk 3. Extract the rootfs tarball: $ runqemu-extract-sdk core-image-sato-sdk-qemuarm-20160605225219.rootfs.tar.bz2 rootfs Creating directory /home/build/rootfs Extracting rootfs tarball using pseudo... /opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/pseudo -P /opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr tar -C "/home/build/rootfs" --numeric-owner -xjf "core-image-sato-sdk-qemuarm-20160605225219.rootfs.tar.bz2" tar: relocation error: /opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/pseudo/lib64/../../../../lib/libpthread.so.0: symbol __libc_vfork, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference Warning: I don't see many files in /home/build/rootfs Please double-check the extraction worked as intended This issue happens on all hosts ( Ubuntu 14.04 x86_64, openSUSE x86_64 and Debian 8 i686)
my findings so far: 1. It can be easily reproduced by running pseudo: $ /opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/pseudo -P /opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr /bin/bash: relocation error: /opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/pseudo/lib64/../../../../lib/libpthread.so.0: symbol __libc_vfork, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference 2. __libc_vfork exists in libc from the toolchain: $ objdump -T /opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/pseudo/lib64/../../../../lib/libc.so.6 | grep __libc_vfork 00000000000b7a70 g DF .text 000000000000004b GLIBC_PRIVATE __libc_vfork 3. __libc_vfork doesn't exist in the host libc: $ objdump -T /lib64/libc.so.6 | grep __libc_vfork
There is a mismatch in linux loader versions: $ ldd /opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/pseudo linux-vdso.so.1 (0x00007ffd6aff8000) libpthread.so.0 => /opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/../../lib/libpthread.so.0 (0x00007f9804fe7000) libdl.so.2 => /opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/../../lib/libdl.so.2 (0x00007f9804de2000) libc.so.6 => /opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/../../lib/libc.so.6 (0x00007f9804a40000) /opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f9805206000) $ readlink /opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/lib/ld-linux-x86-64.so.2 ld-2.23.90.so $ readlink /lib64/ld-linux-x86-64.so.2 ld-2.19.so What i don't understand is why toolchain loader refers to the host one: /opt/poky/2.1+snapshot/sysroots/x86_64-pokysdk-linux/lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f9805206000)
The problem here is there are two libc versions involved, the one in the SDK which is newer and the host system libc which is older. When you run something like "pseudo bash", its loading both versions of libc and they have conflicting symbols, for example vfork() is an IFUNC in recent libc. This is where the mismatched syymbols come from. Ed found the problem was introduced by: https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=01cbd46ac5b215bd8b8b1378881ef0bdf61ba177 which adds LDFLAGS. These include rpath entries in the nativesdk case. If we run "chrpath -d libpseudo.so" and remove the RPATH entry things then work as expected since it no longer finds two different libcs. This is likely the best solution for now. The rpath entries are old and may not be needed with our modern libc/libdl approach so we could look at removing them as a future optimisation in M2.
Adding seebs so he's at least aware of the issues you can run into with pseudo here.
Sent patch for review: http://lists.openembedded.org/pipermail/openembedded-core/2016-June/122971.html
The fix has been merged into poky master: https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=8f7f8f7cfa80dc2e1af721388946a28cfdaca1dc
Verified with 2.2 M2 rc1 build git rev: master/36feb38045b7a2af86ece147fec54b0db3bf491f