2010-03-05 20 views
5

ich autoconf bin mit Boost-Bibliotheken zu erfassen, mit der Unterstützung der autoconf-archive macros und sie arbeiten mit systemweiten boost Bibliotheken in Ordnung, aber nicht, wenn ich manuell Schub in meinem Home-Verzeichnis kompilieren: SieWarum erkennt Autoconf Boost nicht richtig?

[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 ! 

Wie können siehe, es erkennt einige Bibliotheken gut, aber es schlägt mit Boost-Dateisystem fehl. Dies sind die Inhalte von ~/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 

So ist die Bibliothek da. Ich habe versucht mit Boost-1.39 und Boost-1.42 mit keinem anderen Ergebnis, irgendeine Idee, warum ist das passiert? Habe ich etwas vergessen?

Antwort

3

Da boost-1.39 libboost_filesystem von libboost_system abhängt. Vor 1.39 konnten Sie nur auf boost_filesystem verlinken, in späteren Versionen müssen Sie auf beide verlinken.

Vielleicht hat es etwas mit Ihrem Fehler zu tun.

+0

Ihre Vermutung ist richtig: Boost-System ist installiert und es gibt eine Überprüfung dafür in der configure.ac, aber es war nach der Überprüfung für Boost-Dateisystem. Wenn ich die Bestellung umstelle, funktioniert alles wie gewünscht. Dies ist auch eine kleine Dokumentation Problem in autoconf-Archiv – Kjir

+1

@Dmitry Yudakov Bitte geben Sie einen Link/Verweis für Ihre Aussage. – Qsiris

1

Ich habe gefunden boost.m4 viel robuster als die Boost-Makros aus dem Autoconf Macro Archive. Sie können viel Glück haben, einfach zu boost.m4 zu migrieren.

Verwandte Themen