How to install mlpack successfully?
Currently, I am trying to install mlpack to Ubuntu 12.04.
When I executed make install, I got the following error.
[ 0%] Built target mlpack_headers
Linking CXX shared library ../../lib/libmlpack.so
/usr/bin/ld: /usr/local/lib/libboost_program_options.a(cmdline.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libboost_program_options.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [lib/libmlpack.so.1.0] Error 1
make[1]: *** [src/mlpack/CMakeFiles/ Error 2
make: *** [all] Error 2How can I fix this error and install mlpack successfully?
12 Answers
I had the same problem. I re-installed every dependency using
sudo apt-get install libboost-math-dev libboost-program-options-dev libboost-random-dev libboost-test-dev libxml2-dev liblapack-dev libblas-dev libarmadillo-devInside the mlpack folder: execute following command
mkdir build
cd build
cmake ../
makes
sudo make installAfter that to run executables set the path using this Link..... Worked for me.
recompile your boost with -fPIC e.g ./bjam cxxflags=-fPIC --without-python --without-graph_parallel --without-graph --without-wave install