2013-05-23 2 views
6

부스트 버전 1.51을 다운로드하여 빌드하고/usr/local/boost_1_51_0에 넣습니다. mongo-cxx-driver-v2.4도 다운로드했습니다. Makefile이 없으므로이 프로젝트는 새로운 python 빌드 환경을 사용하기 때문에 scons를 실행해야합니다. scons를 실행할 때 boost_thread-mt와 boost_thread를 확인합니다.이 두 가지 모두 "no"를 반환합니다. 당연히, 내가/usr/local 디렉토리에서 부스트를 보지 못하고있다. 내가 Make와 scons 인이 아니기 때문에 mongodb 구축 프로세스를 어떻게하면 향상시킬 수 있습니까?Mongo C++ 클라이언트 라이브러리가 내 부스트를 보지 못합니다.

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 
+1

당신은 cpppath 및 LIBPATH 설정 봤어? 예를 들면 다음과 같습니다. scons --cpppath =/usr/include/boost141/--libpath =/usr/lib64/boost141/ –

+0

그렇지 않습니다. 내가 그걸 줄 께. – user2414654

+0

아직 작동하지 않습니다. 여기에 내 상황은 ... ~/mongo_proj/mongo-cxx-driver-nightly # scons --cpppath =/usr/local/boost_1_51_0/--libpath =/usr/local/boost_1_51_0/stage/lib/ scons : SConscript 파일 읽기 ... C++ 라이브러리 확인 boost_thread-mt ... no C++ 라이브러리 확인 boost_thread ... no 여기서 중지합니다. 다음 는 SCons는이 아닌 이유 boost_thread 라이브러리 ... lrwxrwxrwx 1 루트 루트 182042 2013년 5월 21일 7시 35분 /usr/local/boost_1_51_0/stage/lib/libboost_thread.so 그래서 난 아직 확실하지 않다입니다 내 부스트 라이브러리를보고. – user2414654

답변

0

당신이 libs와 설치 didnt는 추측 바로 다음

는 당신이 시도 할 수 설치 ./b2보다는 ./b2 실행 임?

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

1
저도 같은 문제가되었다

, 나는 다운로드 나는 내가

를 실행하는 C++ 드라이버가 디렉토리에

sudo apt-get install libboost-all-dev 

그런 다음 실행은/usr/포함/boost_1_57_0에 부스트를 추출

sudo scons --extrapath=/usr/include/boost_1_57_0 
0

이 문제는 해결되었습니다.

SCons에서는 부스트 라이브러리를 테스트하기위한 순서가 잘못되었습니다.

열고 SConstruct 파일과 다음 줄을 변경 :

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

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

환호를,

+0

이전 답을 달았습니다. –

관련 문제