mardi 5 mai 2015

Installed boost-system is not available

I have a problem with my configure script: If I run ./configure, I get:

checking whether the Boost::Filesystem library is available... yes
checking for exit in -lboost_filesystem... yes
checking whether the Boost::System library is available... no
checking whether the Boost::Program_Options library is available... yes
checking for exit in -lboost_program_options... yes
checking whether the Boost::Unit_Test_Framework library is available... no
checking whether the Boost::Regex library is available... yes
checking for exit in -lboost_regex... yes
checking whether the Boost::ASIO library is available... yes

But I definitely have installed libboost-system1.55-dev, because Aptitude says so.

If I run make, I get:

/usr/bin/ld: network.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv
//usr/lib/x86_64-linux-gnu/libboost_system.so.1.55.0: error adding symbols: DSO missing from command line

I am currently running under Debian Jessie.

Here are some parts of my configure.ac:

AX_BOOST_BASE([1.55],, [AC_MSG_ERROR([boost 1.55 is needed, but it was not found in your system])])
AX_BOOST_FILESYSTEM
AX_BOOST_SYSTEM
AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_UNIT_TEST_FRAMEWORK
AX_BOOST_REGEX
AX_BOOST_ASIO
AX_BOOST_THREAD

BOOST_LDLIBS="$BOOST_LDFLAGS $BOOST_FILESYSTEM_LIB $BOOST_THREAD_LIBRARY $BOOST_PROGRAM_OPTIONS_LIB $BOOST_REGEX_LIB $BOOST_SYSTEM"
AC_SUBST(BOOST_LDLIBS)

Interestingly everything compiles, if I change the line BOOST_LDLIBS in configure.ac to:

BOOST_LDLIBS="$BOOST_LDFLAGS $BOOST_FILESYSTEM_LIB $BOOST_THREAD_LIBRARY $BOOST_PROGRAM_OPTIONS_LIB $BOOST_REGEX_LIB $BOOST_SYSTEM -lboost_system"

But I don't want this, because this is a very dirty hack.

Aucun commentaire:

Enregistrer un commentaire