[mlpack] C++ mlpack sample program compilation issue on a new ubuntu box

Marcus Edel marcus.edel at fu-berlin.de
Mon Mar 2 05:13:44 EST 2015


Hello Prabhdeep,

(I cc'ed the mailing list, so that more people are involved and can help to find a
(solution.)

It looks like your problem isn't related to Jaskaran problem. It seems to be
very specific to your Ubuntu setup. My first guess is that your BLAS alternative
is set to Refblas or Openblas, while your LAPACK alternative is set to ATLAS as
mentioned in the following bug report:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=638236

Maybe you are able to solve the issue by updating you alternatives?

Hopefully this is helpful. Feel free to respond if you are still having issues
and we will take a deeper look into the problem.

Thanks,
Marcus

> On 02 Mar 2015, at 05:13, prabhdeep singh <prabhdeep3114 at gmail.com> wrote:
> 
> Hi Marcus,
> 
> Thanks for the quick response. I tried the above statement for the same cpp and csv files and the g++ compiler was unable to link to liblapack. I have attached the error log.
>  
> I also tried :
> g++ covariance_comp.cpp -I/usr/include/libxml2/ -lxml2 -llapack -L/usr/lib/ -larmadillo -L/usr/local/lib/ -lmlpack
> but to the same effect (except that the path to liblapack.so was changed to the file in gcc library).
> 
> 
> Thanks,
> Prabhdeep
> 
> On Mon, Mar 2, 2015 at 5:11 AM, Marcus Edel <marcus.edel at fu-berlin.de <mailto:marcus.edel at fu-berlin.de>> wrote:
> Hello Jaskaran,
> 
> I could reproduce the results with the given command. I solved the issue by
> using the following command:
> 
> g++ covariance_comp.cpp -I/usr/include/libxml2/ -lxml2 -L/usr/lib/ -larmadillo
> -L/usr/local/lib/ -lmlpack
> 
> Notice the position of the covariance_comp.cpp file, it doesn't has to be the
> first parameter, but don't put the source file at the end of the command line.
> 
> Hopefully this is helpful. Feel free to respond if you are still having issues.
> 
> Thanks,
> Marcus
> 
>> On 01 Mar 2015, at 21:17, Jaskaran Singh <jaskaranvirdi1 at gmail.com <mailto:jaskaranvirdi1 at gmail.com>> wrote:
>> 
>> Hi Ryan and Marcus
>> 
>> It seems Prabhdeep too is also facing the same compilation problem with the sample programs.I guess many others  are facing such problem as they have just built mlpack from source and tested the working of already existing executables like alknn but not the sample programs.
>> 
>> I have already tried everything on Ubuntu 12.04 LTS as mentioned in my lengthy discussion with Ryan.
>> This time I tried everything with Ubuntu 14.04 LTS(On virtualbox) but still the same error of undefined references to mlpack functions.
>> 
>> Hoping for a positive response.
>> 
>> On 27 February 2015 at 17:56, Jaskaran Singh <jaskaranvirdi1 at gmail.com <mailto:jaskaranvirdi1 at gmail.com>> wrote:
>> Hi Ryan
>> I installed Ubuntu 14.04.2 LTS in a virtual box VM with host OS Ubuntu 12.04 LTS.
>> I am still getting the same problem of undefined symbols.The error output is there in the  results.txt file.
>> 
>> Here are the steps to reproduce the problem:
>>    sudo apt-get update
>>   sudo apt-get install libboost-math-dev libboost-program-options-dev libboost-random-dev libboost-test-dev libxml2-dev libarmadillo-dev
>> tar -xzf mlpack-1.0.12.tar.gz 
>>       cd mlpack-1.0.12/
>>      mkdir build
>>      cd build/
>>      cmake ../
>>      sudo apt-get install cmake
>>      cmake ../
>>      sudo apt-get install g++
>>      g++ --version
>>      clear
>>      cmake ../
>>      doxygen
>>      sudo apt-get install doxygen
>>      clear
>>      cmake ../
>>      txt2man
>>      sudo apt-get install txt2man
>>      clear
>>      cmake ../
>>      make
>>      sudo make install
>>      export LD_LIBRARY_PATH=/usr/local/lib/
>>      cd
>>      cd mlpack_code_examples/
>>      g++ -Wl,-t -v -I /usr/include/libxml2/ -lxml2 -L /usr/lib/ -larmadillo -L /usr/local/lib/ -lmlpack covariance_comp.cpp&>results.txt
>> 
>> The contents of mlpack_code_examples folder is attached below.(covariance_comp.cpp and data.csv).
>> 
>> Related tickets which I found on Trac:
>> 
>> http://www.mlpack.org/trac/ticket/268 <http://www.mlpack.org/trac/ticket/268>
>> http://www.mlpack.org/trac/ticket/311 <http://www.mlpack.org/trac/ticket/311>
>> 
>> My system configuration:
>> Memory:512MB
>> Processor:Intel i5 at 2.3Ghz
>> OS-64bit
>> 
>> I had no problems during the make and make install process.
>> The procedure I followed was exactly what is mentioned here:
>> www.mlpack.org/doxygen.php?doc=build.html <http://www.mlpack.org/doxygen.php?doc=build.html>
>> 
>> Hoping for a positive response.
>> 
>> 
>> Cheers
>> Jaskaran Singh Virdi
>> Final Year Undergrad Computer Science
>> IIT Ropar
>> GitHub:https://github.com/jaskaran1 <https://github.com/jaskaran1>
>> 
>> 
>> 
>> Cheers
>> Jaskaran Singh Virdi
>> Final Year Undergrad Computer Science
>> IIT Ropar
>> GitHub:https://github.com/jaskaran1 <https://github.com/jaskaran1><results.txt><covariance_comp.cpp><data.csv>
> 
> 
> <errorlog.txt>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack/attachments/20150302/1895bef1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5136 bytes
Desc: not available
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack/attachments/20150302/1895bef1/attachment-0001.bin>


More information about the mlpack mailing list