[mlpack] linker error in mlpack installation

Gilles Barges gbarges at free.fr
Thu Dec 5 01:10:54 EST 2013


Hi Ryan,

Le 4 déc. 2013 à 19:12, Ryan Curtin a écrit :

>> 1) I have to disable BLAS/LAPACK in Armadillo to link mlpack.dylib
>> 
>> 2) after making mlpack, I install it (/usr/local/...)
>> 
>> 3) build my prog, launch it, it fails on inv() : BLAS is missing
>> 
>> 4) I _activate again_ BLAS/LAPACK in Armadillo and re-build my program
>> 
>> 5) my programs works !
> 
> Ok, so what I think is happening here is that you are not using any
> parts of mlpack that use BLAS/LAPACK, but you are using Armadillo
> functionality that depends on BLAS/LAPACK (you are calling inv()
> somewhere in your program?).

Not at all !
inv() is called by mlpack::gmm:phi() to compute the inverse covariance matrix (I'm training HMM with GMM)

> When you re-build your program, are you linking with -lblas -llapack
> -larmadillo, or just -larmadillo?

none of these !
on Mac OSX, you have to link with : -framework Acceletate
without that, the linker misses _ddot_, _dgemm_ …
adding -lblas -llpapack doesn't help
-framework Accelerate seems mandatory and sufficient.
I didn't need to add -l armadillo
but Armadillo is header-only code, libarmadillo.dylib seems to contains only a binding for wrapping Blas/Lapack functions,
ie linking with -armadillo instead of -lblas - lapack  … or something like that 
$ nm /usr/lib/libarmadillo.dylib
                 U dyld_stub_binder
$ 


but remember this thread is about installing mlpack without hacking temporarilly Armadillo headers...

have a nice day
--
Gilles Barges.






More information about the mlpack mailing list