mlpack / ensmallen

A header-only C++ library for numerical optimization --

Home Page:http://ensmallen.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with running ensmallen tests

BJWiley233 opened this issue · comments

When trying to compile ensmallen I get issue that lib/x86_64-linux-gnu/libarmadillo.so needs libhdf5.so.103. This file is in my anaconda library and I can compile armadillo programs after setting LD_LIBRARY_PATH=/home/user/anaconda3/lib but cannot install ensmallen as tests fail. The only file in lib/x86_64-linux-gnu is libhdf5_serial.so.103. There is no libhdf5.so.103

Seemed to install with running make in between calls cmake . and sudo make install worked. Is this correct that we can to call make? For armadillo it was just cmake . and sudo make install. If so can you update the README?

make install will run make first if that hasn't be done before, so it should be the same, wondering if that is a permission issue, since you call make install as root. Wondering if ensmallen is picking up another armadillo installation, do you have armadillo installed outside the conda env?

I installed Armadillo headers from source. The issue is that installing libhdf5-103 with ubuntu is that there is no libhdf5.so.103 file. They seem to install to a serial folder with links to library names like libhdf5_serial.so.103 so I linked to the anaconda hdf5 library as I was planning on using the Python install of mlpack anyway. Everything works fine now and running make before make install for ensmallen. Only issue is my gcc compiler runs out of memory when installing mlpack but that is another issue.

I guess you installed armadillo using conda? Do you use the conda-forge channel?

Sorry I meant to say I installed armadillo sources with cmake and make install from the tar.gz on their website. Then compiling works when setting ld library to the anaconda libhdf5.so.103 and their example compiles.

To me it looks like the LD_LIBRARY_PATH is different between root and none root. I'll see if I can reproduce the issue, if I build armadillo from source.

Another way I was able to make it work was to create a symbolic link for libhdf5.so.103 in the hdf5/serial/lib folder to the libhdf5_serial.so.103 that gets installed with apt. Then in cmake call for setting up build for armadillo was to also pass those includes and libraries to -D. As in cmake -D HDF5_INCLUDE_DIRS=/usr/include/hdf5/serial -D HDF5_LIBRARIES=/usr/lib/x86_64-linux-gnu/hdf5/serial/lib/libhdf5.so.103 . so that it puts those before anaconda's. Basically on ubuntu since the name is different FindHDF5.cmake finds libhdf5.so.103 in the anaconda libraries.

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! 👍