BeagleBoneBlack交叉编译Mac错误

时间:2015-02-02 11:45:23

标签: c++ arm cross-compiling beagleboneblack

我使用gcc-linaro-arm-linux-gnueabihf-2014.05使用eclipse在我的mac上交叉编译BeagleBoneBlack(Rev c)。

我使用了这个博客说明:http://www.welzels.de/blog/en/arm-cross-compiling-with-mac-os-x/

当我编译hello world示例时,它在BBB上运行“ok”,但问题是当我使用pthread和stdio等编译我的完整程序时......它无法在BBB上运行,并出现以下错误:

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

有关我的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) 

1 个答案:

答案 0 :(得分:1)

似乎问题与工具链编译器版本与BBB上相应库的不匹配有关。

我通过此链接将我的Linaro工具链降级为4.8: http://www.welzels.de/blog/projekte/arm-cross-toolchain/