cocaine/cocaine-core

Can't find libboost-{system,filesystem,thread} on make

brianclements opened this issue · 4 comments

I'm trying to put together a Dockerfile to automate all the build steps listed in the wiki and also just for isolation purposes to work out the kinks in the build process. So far it's going OK, but I get some problems with the compiler not being able to find some libboost packages:

make -j$(grep -c 'processor' /proc/cpuinfo)
 ---> Running in 0a84091afcd2
Scanning dependencies of target cocaine-core
Building CXX object CMakeFiles/cocaine-core.dir/src/actor.cpp.o
.......(lots of building)......
Building CXX object CMakeFiles/cocaine-core.dir/src/services/storage.cpp.o
Building CXX object CMakeFiles/cocaine-core.dir/src/session.cpp.o
Building CXX object CMakeFiles/cocaine-core.dir/src/storages/files.cpp.o
Building CXX object CMakeFiles/cocaine-core.dir/src/unique_id.cpp.o
Linking CXX shared library libcocaine-core.so
/bin/ld: cannot find -lboost_system-mt
/usr/bin/ld: cannot find -lboost_filesystem-mt
/usr/bin/ld: cannot find -lboost_thread-mt
collect2: error: ld returned 1 exit status

*** [CMakeFiles/cocaine-core.dir/all] Error 2

A google search found that there was a recent renaming of some of the boost packages (leaving off the trailing "-mt"). My container is running saucy, so it's probably pulling the most recent packages, are there specific older versions you think I should use to bypass that naming error?

...as a followup, specifying libboost-filesystem1.53-dev in the debian/control file fixed the first two errors: -lboost_system-mt and -lboost_filesystem-mt. But when trying to mess with libboost-thread, libboost-thread1.49-dev and libboost-thread1.53-dev where "too-old" and threw this different error:

-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found libarchive: /usr/lib/x86_64-linux-gnu/libarchive.so
-- Found libbfd: /usr/lib/libbfd.so
CMake Error at /usr/share/cmake-2.8/Modules/FindBoost.cmake:1126 (message):
Unable to find the requested Boost libraries.
Boost version: 1.53.0
Boost include path: /usr/include
The following Boost libraries could not be found:
     boost_thread
Some (but not all) of the required Boost libraries were found.  You may
need to install these additional Boost libraries.  Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or     BOOST_ROOT
to the location of Boost.
Call Stack (most recent call first):
CMakeLists.txt:26 (FIND_PACKAGE)

and then libboost-thread-dev aka libboost-thread1.54-dev threw the original error.

OK so another follow-up. In my Dockerfile, I was using Ubuntu saucy, and that was throwing all the version errors, but using Ubuntu raring gave zero issues. So perhaps this should be included somewhere for people wanting to hack at it?

Hi,

I think I know a way to fix it for every possible Ubuntu version, I'm going to try it and if it fixes the issue, push it to the master.

Should be fixed by 7f32f38