Wind River Support Network

HomeDefectsLIN7-204
Fixed

LIN7-204 : Link problem with boost on mips64

Created: Jul 13, 2014    Updated: Mar 31, 2016
Resolved Date: Jul 13, 2014
Found In Version: 7.0
Fix Version: 7.0
Severity: Standard
Applicable for: Wind River Linux 7
Component/s: Userspace

Description

There is a known cross-compile issue with the Boost v1.54 libraries which result in a linker error:

libboost_thread.so: undefined reference to `boost::atomics::detail::lockpool::get_lock_for(void const volatile*)'

See:
  https://svn.boost.org/trac/boost/ticket/9041
  https://svn.boost.org/trac/boost/ticket/8810

I am able to reproduce this with WRL6 on at least MIPS64 targets.

Steps to Reproduce

$ configure --enable-board=qemumips64 \
      --enable-rootfs=glibc_std --enable-kernel=standard \
      --with-layer=wr-kernel/kernel-dev --with-package=gdb,boost \
      --enable-jobs=2 --enable-parallel-pkgbuilds=4 \
      --enable-rm-work=yes --enable-rm-oldimgs=yes --enable-reconfig \
      --with-sstate-dir=/path/to/sstate --with-rcpl-version=0006
$ make export-sdk

Install the SDK and source the env.sh script as usual.

Attempt to build the attached test case and you will see the following:

$ make
mips64-wrs-linux-g++  -meb -mabi=64 -mhard-float --sysroot=/opt/windriver/qemumips64-glibc_std-standard-60p6/sysroots/mips64-wrs-linux  -O2 -pipe -g -feliminate-unused-debug-types -fpermissive  -c -o test.o test.cpp
mips64-wrs-linux-g++  -meb -mabi=64 -mhard-float --sysroot=/opt/windriver/qemumips64-glibc_std-standard-60p6/sysroots/mips64-wrs-linux -Wl,-O1  -o test test.o -lboost_thread -lpthread
/opt/windriver/qemumips64-glibc_std-standard-60p6/sysroots/mips64-wrs-linux/usr/lib64/../lib64/libboost_thread.so: undefined reference to `boost::atomics::detail::lockpool::get_lock_for(void const volatile*)'
collect2: error: ld returned 1 exit status
make: *** [test] Error 1
Live chat
Online