2010-03-05 6 views
5
내가 수동으로 홈 디렉토리에 부스트를 컴파일하는 경우 나는 autoconf-archive macros의 지원으로, 부스트 라이브러리를 감지하고 시스템 전체 부스트 라이브러리와 함께 잘 작동하지만, 실패의 autoconf를 사용하고

: 당신이 할 수autoconf가 부스트를 제대로 감지하지 못하는 이유는 무엇입니까?

[email protected]:~/devel/spectra2$ ./configure --with-boost=/home/sb/local/ 
checking for a BSD-compatible install... /usr/bin/install -c 
checking whether build environment is sane... yes 
checking for a thread-safe mkdir -p... /bin/mkdir -p 
checking for gawk... no 
checking for mawk... mawk 
checking whether make sets $(MAKE)... yes 
checking build system type... i686-pc-linux-gnu 
checking host system type... i686-pc-linux-gnu 
checking for style of include used by make... GNU 
checking for gcc... gcc 
checking for C compiler default output file name... a.out 
checking whether the C compiler works... yes 
checking whether we are cross compiling... no 
checking for suffix of executables... 
checking for suffix of object files... o 
checking whether we are using the GNU C compiler... yes 
checking whether gcc accepts -g... yes 
checking for gcc option to accept ISO C89... none needed 
checking dependency style of gcc... gcc3 
checking for library containing strerror... none required 
checking for g++... g++ 
checking whether we are using the GNU C++ compiler... yes 
checking whether g++ accepts -g... yes 
checking dependency style of g++... gcc3 
checking for boostlib >= 1.31.0... yes 
checking whether the Boost::Program_Options library is available... yes 
checking for exit in -lboost_program_options... yes 
checking whether the Boost::Filesystem library is available... yes 
checking for exit in -lboost_filesystem... no 
checking for exit in -lboost_filesystem... (cached) no 
checking for exit in -lboost_filesystem... (cached) no 
configure: error: Could not link against boost_filesystem ! 

보라, 몇몇 라이브러리는 괜찮 았지만, 부스트 파일 시스템에서는 실패한다. ~/local/lib의 내용은 다음과 같습니다.

[email protected]:~$ ls -1 /home/sb/local/lib/ 
libboost_filesystem.a 
libboost_filesystem.so 
libboost_filesystem.so.1.42.0 
libboost_program_options.a 
libboost_program_options.so 
libboost_program_options.so.1.42.0 
libboost_system.a 
libboost_system.so 
libboost_system.so.1.42.0 
libboost_thread.a 
libboost_thread.so 
libboost_thread.so.1.42.0 

라이브러리가 있습니다. 나는 boost-1.39와 boost-1.42를 시도해 보았는데, 다른 결과는 없었습니다. 왜 이런 일이 일어 났습니까? 뭔가 잊었 니?

답변

3

boost-1.39 libboost_filesystem은 libboost_system에 의존하기 때문에. 1.39 이전에는 boost_filesystem에만 연결할 수 있었지만 이후 버전에서는 두 파일 모두에 링크해야했습니다.

아마도 귀하의 실수와 관련이 있습니다.

+0

추측은 맞습니다 : 부스트 시스템이 설치되어 있고 configure.ac에 체크가되어 있지만 부스트 파일 시스템 검사가있었습니다. 주문을 전환하면 모든 것이 의도 한대로 작동합니다. 이것은 autoconf-archive의 작은 문서 문제입니다. – Kjir

+1

@Dmitry Yudakov 진술에 대한 링크/참조를 제공해주십시오. – Qsiris

1

나는 boost.m4이 Autoconf Macro Archive에서 사용 가능한 Boost 매크로보다 훨씬 튼튼하다는 것을 발견했다. 단순히 boost.m4로 마이그레이션하면 행운을 누릴 수 있습니다.

관련 문제