[yocto] yocto build cross toolchain issue

Burton, Ross ross.burton at intel.com
Tue Jul 5 02:29:27 PDT 2016


On 5 July 2016 at 10:20, Chandra Mishra (chanmish) <chanmish at cisco.com>
wrote:

>  * -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -static -lnsl -lpthread
> -lm -lrt*
>
> *<TOOLCHAIN_PATH>/sysroots/corei7-64-poky-linux/usr/lib/../lib/librt.a(shm_open.o):
> In function `shm_open':                               *
>
> *<SDK BUILD
> PATH>/build/tmp/work/corei7-64-poky-linux/glibc/2.22-r0/git/rt/../sysdeps/posix/shm_open.c:35:
> undefined reference to `__shm_directory'               *
>

At a guess this is due to --as-needed dropping symbols as unused which then
are used, because --as-needed needs a sorted library list.  Either remove
--as-needed, or try reordering the libraries so that dependencies are in
order.

https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#Importance_of_linking_order
has more context.

In this case I'd start with moving -lpthread to the end of the link line.

Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160705/1b71c9fa/attachment.html>


More information about the yocto mailing list