0

I am trying to compile this repository: https://github.com/graehl/carmel.

There is a standard makefile for compiling.

Although I have installed the boost library "libboost-all-dev", I encounter such an error:

/usr/bin/ld: cannot find -lboost_random-mt
/usr/bin/ld: cannot find -lboost_timer-mt
/usr/bin/ld: cannot find -lboost_chrono-mt
/usr/bin/ld: cannot find -lboost_system-mt
collect2: error: ld returned 1 exit status
../graehl/graehl.mk:331: recipe for target 'bin/linux/carmel' failed
make: *** [bin/linux/carmel] Error 1

How can I fix the problem?

Thanks,

yusuf
  • 3,591
  • 8
  • 45
  • 86

2 Answers2

1

Try to use this command to searc if in your system there are the needed packages. So if'll have it you could try to compile the project keeping attention how your boots libraries are installed. In README.md is written:

cd carmel; make -j 4 install BOOST_SUFFIX=-mt INSTALL_PREFIX=/usr/local
# BOOST_SUFFIX= depends on how your boost libraries are installed - ls /usr/lib/libboost*.so
(prerequisites: GNU Make (3.8) C++ compiler (GCC 5, clang 3.7, or visual studio 2015 will do) and Boost, which you probably already have on your linux system; for Mac, you can get them from Homebrew. For windows: MSVC2015 should work; you can also use cygwin or mingw.
P.Carlino
  • 661
  • 5
  • 21
  • Thank you Carlino. But I have all the prerequisites. – yusuf Aug 11 '16 at 14:32
  • 1
    Can you show me the output of "dpkg -L libboost-all-dev" – P.Carlino Aug 11 '16 at 15:28
  • 1
    For example first you have to discover where is the boots'libraries : using "dpkg -S boost_random-mt" . i'm using my output that are: " /usr/lib/x86_64-linux-gnu/libboost_random.so.1.58.0". then you have to launch the make command as:cd carmel; make -j 4 install BOOST_SUFFIX=-mt /usr/lib/x86_64-linux-gnu INSTALL_PREFIX=/usr/local – P.Carlino Aug 11 '16 at 19:37
1

So I think that the problem is that you not tell to your linker where is the boots libraries. I suppose that then I readed this question Question So using this command you can know where the libraries are.

dpkg -S <name of library>

for example:

dpkg -S boost_random 

for the -lboost_random-mt

Community
  • 1
  • 1
P.Carlino
  • 661
  • 5
  • 21
  • I am sorry, I am a bit not good in this operating system issues. How can I solve the problem completely? – yusuf Aug 11 '16 at 19:24
  • 1
    In the make file there are a some variables wich contains the boots libraries path. You have to discover the libraries'path using the dpkg -S command and set these variables. – P.Carlino Aug 11 '16 at 19:29
  • for example? Sorry, I am completely dummy in this issue. – yusuf Aug 11 '16 at 19:32
  • I mean, in the makefile. – yusuf Aug 11 '16 at 19:33
  • 1
    when you use make command you can tell how a variable are: so if you write cd carmel; make -j 4 install BOOST_SUFFIX=-mt /usr/lib/x86_64-linux-gnu INSTALL_PREFIX=/usr/local BOOST_SUFFIX is -mt /usr/lib/x86_64-linux-gnu – P.Carlino Aug 11 '16 at 19:45