2

I use gcc-linaro-arm-linux-gnueabihf-2014.05 for cross-compling BeagleBoneBlack (Rev c) on my mac using eclipse.

I used this weblog instructions: http://www.welzels.de/blog/en/arm-cross-compiling-with-mac-os-x/

when I compile the hello world sample it works "ok" on BBB, but the problem is when I compile my full program using pthread and stdio and etc... it fails to run on BBB with the following error:

./NewDCU.elf: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./NewDCU.elf)

for more details about my BBB:

root@arm:/home/ubuntu# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.8/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-19ubuntu1) 
4
  • 2
    The Linaro 2014.05 release is GCC 4.9 - you have 4.8 on the device, so a library version mismatch isn't overly surprising. Possible options include: link statically; try an older 4.8-based cross-toolchain; update the libraries on the BBB - depends what you want, really. Feb 2, 2015 at 12:04
  • how could I update libraries on BBB?
    – mefmef
    Feb 2, 2015 at 12:06
  • 3
    See this question on cross compile of NodeJs, which is the same type of end game. There are multiple ways to solve the problem. It depends on if you are just getting it to work for yourself, a distribution, etc. To start with, the 4.9.2 toolchain has a sysroot directory with the C++ .so that you need on the device. You should be able to safely symlink it, but test things first in a chroot jail. Also look for a populate script; maybe gcc-linaro-arm-linux-gnueabihf-populate. Feb 2, 2015 at 15:59
  • 1
    I tend to just manually copy stuff out of <toolchain>/arm-linux-gnueabihf/lib into <NFS root>/lib/arm-linux-gnueabihf for the board, but that's in the context of making a dynamically-linked BusyBox work on a throwaway filesystem for kernel testing - it's probably a terrible idea on a distro filesystem you actually care about. Feb 2, 2015 at 16:18

1 Answer 1

1

It seems that the problem is related to missmatch of toolchain complier version and my corresponding libraries on BBB.

I downgraded my Linaro toolchain to 4.8 from this link: http://www.welzels.de/blog/projekte/arm-cross-toolchain/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.