<p>Hello,</p>

<p>I have been trying to build MLPACK w/ Matlab bindings. I did the usual steps as shown below to build MEX files. But, I've been constantly facing a compilation problem that I couldn't understand. There seems some sort of problem calling the right libmlpack.so.</p>

<p>So, I commented out following codes from src/mlapack/CMakeLists.txt</p>

<p>set_target_properties(mlpack<br>
  PROPERTIES<br>
  VERSION 1.0<br>
  SOVERSION 1<br>
)</p>

<p>The first cmake step went well without complaints.</p>

<p>User1@pla1:~/mlpack-1.0.12/build$ cmake -D MATLAB_BINDINGS=ON ../<br>
-- The C compiler identification is GNU 4.8.2<br>
-- The CXX compiler identification is GNU 4.8.2<br>
-- Check for working C compiler: /usr/bin/cc<br>
-- Check for working C compiler: /usr/bin/cc -- works<br>
-- Detecting C compiler ABI info<br>
-- Detecting C compiler ABI info - done<br>
-- Check for working CXX compiler: /usr/bin/c++<br>
-- Check for working CXX compiler: /usr/bin/c++ -- works<br>
-- Detecting CXX compiler ABI info<br>
-- Detecting CXX compiler ABI info - done<br>
-- Found Armadillo: /usr/lib/libarmadillo.so (found suitable version "5.200.1", required is "3.6.0") <br>
-- Armadillo libraries: /usr/lib/libarmadillo.so<br>
CMake Warning at CMakeLists.txt:88 (message):<br>
  This is a 64-bit system, but Armadillo was compiled without 64-bit index<br>
  support.  Consider recompiling Armadillo with ARMA_64BIT_WORD to enable<br>
  64-bit indices (large matrix support).  MLPACK will still work without<br>
  ARMA_64BIT_WORD defined, but will not scale to matrices with more than 4<br>
  billion elements.</p>

<p>-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found suitable version "2.9.1", minimum required is "2.6.0") <br>
-- Boost version: 1.54.0<br>
-- Found the following Boost libraries:<br>
--   program_options<br>
--   unit_test_framework<br>
--   random<br>
-- Found Subversion: /usr/bin/svn (found version "1.8.8") <br>
-- Found MATLAB mex compiler: /usr/local/MATLAB/R2015a/bin/mex<br>
-- MATLAB root: /usr/local/MATLAB/R2015a<br>
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.6") <br>
-- Configuring done<br>
-- Generating done<br>
-- Build files have been written to: /home/User1/mlpack-1.0.12/build</p>

<p>But, upon executing make, the process stopped without successfully building files:</p>

<p>Scanning dependencies of target mlpack_headers<br>
Moving header files to include/mlpack/<br>
[  0%] Built target mlpack_headers<br>
Scanning dependencies of target mlpack<br>
[  1%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/dists/discrete_distribution.cpp.o<br>
[  2%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/dists/gaussian_distribution.cpp.o<br>
[  2%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/dists/laplace_distribution.cpp.o<br>
[  3%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/kernels/epanechnikov_kernel.cpp.o<br>
[  4%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/kernels/pspectrum_string_kernel.cpp.o<br>
[  5%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/math/lin_alg.cpp.o<br>
[  5%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/math/random.cpp.o<br>
[  6%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/optimizers/aug_lagrangian/aug_lagrangian_test_functions.cpp.o<br>
.....<br>
.....<br>
.....<br>
[ 44%] Built target range_search<br>
Scanning dependencies of target allkrann<br>
[ 44%] Building CXX object src/mlpack/methods/rann/CMakeFiles/allkrann.dir/allkrann_main.cpp.o<br>
Linking CXX executable ../../../../bin/allkrann<br>
[ 44%] Built target allkrann<br>
Scanning dependencies of target man<br>
[ 45%] Generating man pages from built executables.<br>
Generating man page for fastmks...<br>
Generating man page for sparse_coding...<br>
Generating man page for linear_regression...<br>
Generating man page for lars...<br>
Generating man page for allknn...<br>
Generating man page for hmm_loglik...<br>
Generating man page for nca...<br>
Generating man page for nbc...<br>
...<br>
...<br>
...<br>
[ 45%] Built target man<br>
Scanning dependencies of target gmm_mex<br>
[ 46%] Building CXX object src/mlpack/bindings/matlab/gmm/CMakeFiles/gmm_mex.dir/gmm.o<br>
Building with 'g++'.<br>
Warning: You are using gcc version '4.8.2'. The version of gcc is not supported. The version currently supported with MEX is '4.7.x'. For a list of currently supported compilers see: <a href="http://www.mathworks.com/support/compilers/current_release">http://www.mathworks.com/support/compilers/current_release</a>.<br>
Warning: You are using gcc version '4.8.2-19ubuntu1)'. The version of gcc is not supported. The version currently supported with MEX is '4.7.x'. For a list of currently supported compilers see: <a href="http://www.mathworks.com/support/compilers/current_release">http://www.mathworks.com/support/compilers/current_release</a>.<br>
MEX completed successfully.<br>
Linking CXX shared library ../../../../../matlab/gmm_mex.mexa64<br>
Unknown MEX argument '-Wl,-rpath,/home/jaelim/mlpack-1.0.12/build/lib:'.<br>
make[2]: *** [matlab/gmm_mex.mexa64] Error 255<br>
make[1]: *** [src/mlpack/bindings/matlab/gmm/CMakeFiles/gmm_mex.dir/all] Error 2<br>
make: *** [all] Error 2</p>

<p>Any idea how to fix this problem?<br>
Thanks!</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/440">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFPBK5DOAVbFW52-SubHz7CGQqXGjks5oN5RAgaJpZM4EuQFI.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/mlpack/mlpack/issues/440"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>