rcurtin_irc changed the topic of #mlpack to: mlpack: a scalable machine learning library (https://www.mlpack.org/) -- channel logs: https://libera.irclog.whitequark.org/mlpack -- NOTE: messages sent here might not be seen by bridged users on matrix, gitter, or slack
sugarbeet has quit [Ping timeout: 268 seconds]
sugarbeet has joined #mlpack
TarekElsayed[m] has joined #mlpack
<TarekElsayed[m]> Did anyone face any issues building mlpack on mac m1?... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/668c573e538f578d68580657a8e1f8613acc5d89>)
<TarekElsayed[m]> I've seen a similar issue on github but this solution <https://github.com/mlpack/mlpack/issues/3155#issuecomment-1048465045> didn't work for me.
<TarekElsayed[m]> I've tried using gcc-13 from brew but I get the same error
<rcurtin[m]> interesting, it looks like you would need to link against LAPACK or BLAS directly
<rcurtin[m]> I'm assuming you're using OS X... I think the linker command needs to include -framework Accelerate
<rcurtin[m]> can you try either adding that to the CMake configuration options, or configure with something like `LDFLAGS="-framework Accelerate" cmake [all the other options]`?
<rcurtin[m]> you can build with VERBOSE=1 make and then you can see what the linker step output actually is, and see if the framework Accelerate got added there
<rcurtin[m]> I thought that our Armadillo configuration scripts would automatically add -framework Accelerate, but maybe not ?
_whitelogger has joined #mlpack
<TarekElsayed[m]> using `-framework Accelerate` seems to solve the problem.
<TarekElsayed[m]> I used the cmake command with the flag and then built the project and the tests and everything seems to be working properly
<TarekElsayed[m]> Thanks!
<rcurtin[m]> I looked through the CMake script that finds Armadillo... it adds the `-framework Accelerate` option only if `libarmadillo.dylib` is not available (specifically, if the preprocessor macro `ARMA_USE_WRAPPER` is not enabled). Basically, `libarmadillo.dylib` is supposed to be a "wrapper" around BLAS and LAPACK functionality, so that you can just link with `-larmadillo` instead of needing, e.g., `-llapack -lblas` or `-framework Accelerate`. But
<rcurtin[m]> I can see in your output that `libarmadillo.dylib` *does* exist... so I am curious, do you have to link against the Accelerate framework even for a simple Armadillo-only program? here's one example program:
<rcurtin[m]> and then I'm curious, to build that successfully, can you do g++ -o test test.cpp -larmadillo, or do you have to do g++ -o test test.cpp -larmadillo -framework Accelerate?