为ARM编译MongoDB C ++驱动程序。找不到Boost Libraries

时间:2014-02-25 15:57:28

标签: c++ mongodb boost arm scons

我正在尝试在ARM平台上运行MongoDB驱动程序,但构建系统SCons拒绝我的Boost库。

我用libpath,extrapath和extrapathdyn的不同组合摆弄无济于事。

gwue@Anubis:~/mongo$ scons -j4 --cc=/home/gwue/armgcc/lin/bin/arm-xilinx-linux-gnueabi-gcc --cxx=/home/gwue/armgcc/lin/bin/arm-xilinx-linux-gnueabi-g++ --prefix=/tmp/mongo --sharedclient --use-system-boost --cpppath=/home/gwue/boost1_54 --libpath=/home/gwue/boost1_54/stage/lib --extrapathdyn=/home/gwue/boost1_54/stage/lib --full install-mongoclient

结果:

scons: Reading SConscript files ...
scons version: 2.3.0
python version: 2 7 5 'final' 0
Checking whether the C++ compiler works(cached) yes
Checking whether the C compiler works(cached) yes
Checking if C++ compiler "/home/gwue/armgcc/lin/bin/arm-xilinx-linux-gnueabi-g++" is GCC... (cached) yes
Checking if C compiler "/home/gwue/armgcc/lin/bin/arm-xilinx-linux-gnueabi-gcc" is GCC... (cached) yes
Checking if C compiler supports -Wno-unused-local-typedefs... (cached) yes
Checking if C compiler supports -Wno-unused-function... (cached) yes
Checking if C compiler supports -Wno-unused-private-field... (cached) no
Checking if C compiler supports -Wno-deprecated-declarations... (cached) yes
Checking if C compiler supports -Wno-tautological-constant-out-of-range-compare... (cached) no
Checking if C compiler supports -Wno-unused-const-variable... (cached) no
Checking if C compiler supports -fno-builtin-memcmp... (cached) yes
Checking for __thread... (cached) yes
Checking for C++ header file boost/filesystem/operations.hpp... (cached) yes
Checking for C++ library boost_thread-mt... (cached) no
Checking for C++ library boost_thread... (cached) no
Checking for C++ library boost_filesystem-mt... (cached) no
Checking for C++ library boost_filesystem... (cached) no
Checking for C++ library boost_program_options-mt... (cached) no
Checking for C++ library boost_program_options... (cached) yes
Checking for C++ library boost_system-mt... (cached) no
Checking for C++ library boost_system... (cached) yes
Checking for C header file unistd.h... (cached) yes
Checking whether clock_gettime is declared... (cached) yes
Checking for C library rt... (cached) yes
Checking for C++ header file execinfo.h... (cached) yes
Checking whether backtrace is declared... (cached) yes
Checking whether backtrace_symbols is declared... (cached) yes
Checking whether backtrace_symbols_fd is declared... (cached) yes
Checking for C library pcap... (cached) no
Checking for C library wpcap... (cached) no
Checking if __malloc_hook is declared volatile... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
<snip>
Install file: "build/linux2/cc__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-gcc/cpppath__home_gwue_boost1_54/cxx__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-g++/extrapathdyn__home_gwue_boost1_54_stage_lib/libpath__home_gwue_boost1_54_stage_lib/use-system-boost/client_build/libmongoclient.a" as "/tmp/mongo/lib/libmongoclient.a"
/home/gwue/armgcc/lin/bin/arm-xilinx-linux-gnueabi-g++ -o build/linux2/cc__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-gcc/cpppath__home_gwue_boost1_54/cxx__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-g++/extrapathdyn__home_gwue_boost1_54_stage_lib/libpath__home_gwue_boost1_54_stage_lib/use-system-boost/third_party/shim_boost.o -c -Wnon-virtual-dtor -Woverloaded-virtual -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -Werror -pipe -O3 -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations -fno-builtin-memcmp -D_SCONS -DMONGO_EXPOSE_MACROS -DSUPPORT_UTF8 -DMONGO_OPTIMIZED_BUILD -D_FILE_OFFSET_BITS=64 -DMONGO_HAVE___THREAD -DBOOST_THREAD_VERSION=2 -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_EXECINFO_BACKTRACE -Ibuild/linux2/cc__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-gcc/cpppath__home_gwue_boost1_54/cxx__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-g++/extrapathdyn__home_gwue_boost1_54_stage_lib/libpath__home_gwue_boost1_54_stage_lib/use-system-boost/third_party/snappy -Isrc/third_party/snappy -Ibuild/linux2/cc__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-gcc/cpppath__home_gwue_boost1_54/cxx__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-g++/extrapathdyn__home_gwue_boost1_54_stage_lib/libpath__home_gwue_boost1_54_stage_lib/use-system-boost/third_party/libstemmer_c/include -Isrc/third_party/libstemmer_c/include -Ibuild/linux2/cc__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-gcc/cpppath__home_gwue_boost1_54/cxx__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-g++/extrapathdyn__home_gwue_boost1_54_stage_lib/libpath__home_gwue_boost1_54_stage_lib/use-system-boost/third_party/s2 -Isrc/third_party/s2 -Ibuild/linux2/cc__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-gcc/cpppath__home_gwue_boost1_54/cxx__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-g++/extrapathdyn__home_gwue_boost1_54_stage_lib/libpath__home_gwue_boost1_54_stage_lib/use-system-boost/third_party/pcre-8.30 -Isrc/third_party/pcre-8.30 -Ibuild/linux2/cc__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-gcc/cpppath__home_gwue_boost1_54/cxx__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-g++/extrapathdyn__home_gwue_boost1_54_stage_lib/libpath__home_gwue_boost1_54_stage_lib/use-system-boost -Isrc -Ibuild/linux2/cc__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-gcc/cpppath__home_gwue_boost1_54/cxx__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-g++/extrapathdyn__home_gwue_boost1_54_stage_lib/libpath__home_gwue_boost1_54_stage_lib/use-system-boost/mongo -Isrc/mongo -I/home/gwue/boost1_54 -I/home/gwue/boost1_54/stage/lib/include -Ibuild/linux2/cc__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-gcc/cpppath__home_gwue_boost1_54/cxx__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-g++/extrapathdyn__home_gwue_boost1_54_stage_lib/libpath__home_gwue_boost1_54_stage_lib/use-system-boost/third_party/s2 -Isrc/third_party/s2 -Ibuild/linux2/cc__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-gcc/cpppath__home_gwue_boost1_54/cxx__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-g++/extrapathdyn__home_gwue_boost1_54_stage_lib/libpath__home_gwue_boost1_54_stage_lib/use-system-boost/third_party/snappy -Isrc/third_party/snappy -Ibuild/linux2/cc__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-gcc/cpppath__home_gwue_boost1_54/cxx__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-g++/extrapathdyn__home_gwue_boost1_54_stage_lib/libpath__home_gwue_boost1_54_stage_lib/use-system-boost/third_party/v8/include -Isrc/third_party/v8/include -Ibuild/linux2/cc__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-gcc/cpppath__home_gwue_boost1_54/cxx__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-g++/extrapathdyn__home_gwue_boost1_54_stage_lib/libpath__home_gwue_boost1_54_stage_lib/use-system-boost/third_party/yaml-cpp-0.5.1/include -Isrc/third_party/yaml-cpp-0.5.1/include src/third_party/shim_boost.cpp
ar rc build/linux2/cc__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-gcc/cpppath__home_gwue_boost1_54/cxx__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-g++/extrapathdyn__home_gwue_boost1_54_stage_lib/libpath__home_gwue_boost1_54_stage_lib/use-system-boost/third_party/libshim_boost.a build/linux2/cc__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-gcc/cpppath__home_gwue_boost1_54/cxx__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-g++/extrapathdyn__home_gwue_boost1_54_stage_lib/libpath__home_gwue_boost1_54_stage_lib/use-system-boost/third_party/shim_boost.o
ranlib build/linux2/cc__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-gcc/cpppath__home_gwue_boost1_54/cxx__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-g++/extrapathdyn__home_gwue_boost1_54_stage_lib/libpath__home_gwue_boost1_54_stage_lib/use-system-boost/third_party/libshim_boost.a
Target 'build/linux2/cc__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-gcc/cpppath__home_gwue_boost1_54/cxx__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-g++/extrapathdyn__home_gwue_boost1_54_stage_lib/libpath__home_gwue_boost1_54_stage_lib/use-system-boost/client_build/libmongoclient.so' depends on the availability of a system provided library for 'boost_filesystem', but no suitable library was found during configuration.
scons: *** [build/linux2/cc__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-gcc/cpppath__home_gwue_boost1_54/cxx__home_gwue_armgcc_lin_bin_arm-xilinx-linux-gnueabi-g++/extrapathdyn__home_gwue_boost1_54_stage_lib/libpath__home_gwue_boost1_54_stage_lib/use-system-boost/client_build/libmongoclient.so] Explicit exit, status 1
scons: building terminated because of errors.

我像这样编译了Boost库:

./bootstrap.sh
./b2 --without-python --without-iostreams -j4 toolset=gcc-arm

user-config.jam包含:

using gcc : arm : /home/gwue/armgcc/lin/bin/arm-xilinx-linux-gnueabi-g++ ;

只有在尝试交叉编译时才会出现问题。使用x86_64库和编译器,一切正常。 我怀疑我的ARM Boost库本质上是坏的,因为我们已经在已经存在的项目中使用它们就好了。

关于如何说服scons接受libs的任何想法?

1 个答案:

答案 0 :(得分:0)

我仍然无法让它发挥作用。 至少有一个没有依赖关系的纯实现http://docs.mongodb.org/ecosystem/drivers/c/。 这个编译很好,所以我们可能会采用它。