Configure: error: boost.filesystem library not found

So, I am trying to install ncmpcpp, although this is github and the first step is to run the sh autogen.sh

script, I ran into a few missing libraries, etc., but I was able to install them and continue working so far. I did some searches and installed a few things that I thought would help fix this, but to no avail.

sudo apt-get install libboost1.55-all-dev

sudo apt-get install libboost-system-dev

sudo apt-get install libboost-system1.54-dev

sudo apt-get install libboost1.54-dev

sudo apt-get install libboost-filesystem-dev

sudo apt-get install libboost-filesystem-dev libboost-thread-dev

The truth is, I don't know enough about Boost or what I'm missing to fix it myself.

This is where the problem starts:

check for boost / filesystem.hpp ... yes

checking main in -lboost_filesystem-mt ... no

configure: error: boost.filesystem library not found

edit: Here are the surrounding lines in '-lboost_filesystem-mt' in the config.log file.

configure: 15510: check main in -lboost_filesystem-mt

configure: 15529: g ++ -o conftest -g -O2 -std = c ++ 0x conftest.cpp -lboost_filesystem-mt> & 5

/ usr / bin / ld: can't find -lboost_filesystem-mt

collect2: error: ld returned 1 exit status

configure: 15529: $? = 1

configure: the failed program was:

| / * confdefs.h * /

... and then it describes the confdefs.h file.

+3


source to share


1 answer


Remove these links from configure.ac

(section "Configuring the update environment"):

AS_IF([test -z "${BOOST_LIB_SUFFIX+x}"], [BOOST_LIB_SUFFIX=-mt])
AC_ARG_VAR([BOOST_LIB_SUFFIX], [Boost library name suffix [default=-mt]])

      

In the old days, the Boost libraries had a suffix -mt

to indicate that they were multithreaded. Debian / Ubuntu dropped years ago. Perhaps other distributions have kept it. Boost library names have never been very standardized anyway, so scripts configure

often try to deal with them, often in broken ways.



You can either delete these two lines or call them like this:

$ BOOST_LIB_SUFFIX="" ./autogen.sh

      

The correct fix is ​​to convert your script to use Boost macros from the Autoconf Archive .

+5


source







All Articles