Mongo C ++ Client Library Doesn't See My Enhancement

I downloaded Boost version 1.51, built it, and put it in / usr / local / boost _1_51_0. I also downloaded mongo-cxx-driver-v2.4. Since the Makefile does not exist, I have to run scons since this project uses the new python build environment. When I run scons, it checks boost_thread-mt and boost_thread, both of which return no. Obviously, he does not see that I have support in the / usr / local directory. Since I am Make and not a marriage person, how do I get the mongodb build process to see my boost version?

routerwc:~/mongo_proj/mongo-cxx-driver-nightly # scons --cpppath=/usr/local/boost_1_51_0/ --libpath=/usr/local/boost_1_51_0/stage/lib/ scons: Reading SConscript files ... Checking for C++ library boost_thread-mt... no Checking for C++ library boost_thread... no routerwc:~/mongo_proj/mongo-cxx-driver-nightly # cat config.log file /root/mongo_proj/mongo-cxx-driver-nightly/SConstruct,line 70: Configure(confdir = .sconf_temp) scons: Configure: Checking for C++ library boost_thread-mt....sconf_temp/conftest_0.cpp <- | | | |int |main() { | |return 0; |} | g++ -o .sconf_temp/conftest_0.o -c -O3 -pthread -D_SCONS -DMONGO_EXPOSE_MACROS -Ibuild -Ibuild/mongo .sconf_temp/conftest_0.cpp g++ -o .sconf_temp/conftest_0 -Wl,--as-needed -Wl,-zdefs -pthread .sconf_temp/conftest_0.o -lboost_thread-mt /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lboost_thread-mt collect2: ld returned 1 exit status scons: Configure: no scons: Configure: Checking for C++ library boost_thread....sconf_temp/conftest_1.cpp <- | | | |int |main() { | |return 0; |} | g++ -o .sconf_temp/conftest_1.o -c -O3 -pthread -D_SCONS -DMONGO_EXPOSE_MACROS -Ibuild -Ibuild/mongo .sconf_temp/conftest_1.cpp g++ -o .sconf_temp/conftest_1 -Wl,--as-needed -Wl,-zdefs -pthread .sconf_temp/conftest_1.o -lboost_thread /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lboost_thread collect2: ld returned 1 exit status scons: Configure: no 
+6
source share
3 answers

I had the same problem, I load and extract boost in / usr / include / boost _1_57_0, then I run

 sudo apt-get install libboost-all-dev 

Then in the directory I have C ++ drivers, I run

 sudo scons --extrapath=/usr/include/boost_1_57_0 
+1
source

I assume you did not install libs, just ran. / b 2, not. / b 2 install

Can you try the following?

scons --extrapath="/usr/local/boost_1_51_0/,/usr/local/boost_1_51_0/stage"

0
source

I am solving this problem.

In SCons, the order of checking boost libraries is incorrect.

Open the SConstruct file and change the following line:

 boostLibs = [ "regex", "thread", "system" ] 

to

 boostLibs = [ "system", "regex", "thread" ] 

Greetings

0
source

Source: https://habr.com/ru/post/945704/


All Articles