[mlpack] linker error in mlpack installation
Ryan Curtin
gth671b at mail.gatech.edu
Mon Dec 9 15:40:49 EST 2013
On Thu, Dec 05, 2013 at 07:10:54AM +0100, Gilles Barges wrote:
> 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...
Ok, I'm very confused by what's going on here. Can you tell me the
version (exact) of OS X that you are using, the version of your
compiler, XCode, and Armadillo, so that I can try to reproduce this? If
I can reproduce it, I can probably dig deeper and find out what the
actual issue is.
--
Ryan Curtin | "The mighty hand of vengeance, sent down to strike
ryan at igglybob.com | the unroadworthy!" - The Nightrider
More information about the mlpack
mailing list