2

After I've installed boost for cufflinks, I ran ./configure. I am getting the following error:

checking for exit in -lboost_thread... no
checking for exit in -lboost_thread... (cached) no
checking for exit in -lboost_thread... (cached) no
error: Could not link against boost_thread ! 
5
  • Do you actually have the Boost library installed? What is your operating system, how and which parts of boost did you install?
    – fat-lobyte
    Commented Sep 13, 2012 at 14:39
  • cufflinks.cbcb.umd.edu/tutorial.html
    – aafc
    Commented Sep 13, 2012 at 15:36
  • I installed boost using the instructions in that link. I am on 64-bit CentOS. I installed the headers and the libraries needed to be built, and specified the installation path to ./configure using --with-boost=/path/to/boost
    – aafc
    Commented Sep 13, 2012 at 15:57
  • What is /path/to/boost? Is it <YOUR_BOOST_INSTALL_DIRECTORY> (the one for prefix=) or the location of the boost code itself?
    – fat-lobyte
    Commented Sep 14, 2012 at 7:27
  • It is the location of the boost install. So it has the headers and the compiled library.
    – aafc
    Commented Sep 14, 2012 at 14:50

1 Answer 1

0

check your config.log, it will show you in more detail why it failed:

configure:11032: checking for exit in -lboost_thread
configure:11057: g++ -o conftest -I/home/jcomeau/include  -Wstack-protector -fstack-protector-all -fPIE  -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2  -L/home/jcomeau/lib  -Wl,-z,relro -Wl,-z,now -pie -L/home/jcomeau/lib conftest.cpp -lboost_thread  -lminiupnpc -lminiupnpc -lminiupnpc -lminiupnpc  >&5
/usr/bin/ld: warning: libboost_system.so.1.54.0, needed by /home/jcomeau/lib/libboost_thread.so, not found (try using -rpath or -rpath-link)
/home/jcomeau/lib/libboost_thread.so: undefined reference to `boost::system::system_category()'
/home/jcomeau/lib/libboost_thread.so: undefined reference to `boost::system::generic_category()'
collect2: error: ld returned 1 exit status
configure:11057: $? = 1

in this case I had to change my ./configure command from:

./configure CXXFLAGS="-I$HOME/include" LDFLAGS="-L$HOME/lib"  --prefix=$HOME --with-boost-libdir=$HOME/lib

to:

./configure CXXFLAGS="-I$HOME/include" LDFLAGS="-L$HOME/lib -Wl,-rpath-link,$HOME/lib" --with-boost-libdir=$HOME/lib --prefix=$HOME

in accordance with the advice here: Get rid of "gcc - /usr/bin/ld: warning lib not found"

Not the answer you're looking for? Browse other questions tagged or ask your own question.