CQMP / Maxent

GNU General Public License v2.0
16 stars 14 forks source link

error while loading shared libraries: libgsl.so.23 on Ubuntu 12 #30

Closed pbakalov closed 7 years ago

pbakalov commented 7 years ago

All tests fail with this error: ./test/default_modelTest: error while loading shared libraries: libgsl.so.23: cannot open shared object file: No such file or directory

One can fix this by doing: $ LD_LIBRARY_PATH=/usr/local/lib/ $ export LD_LIBRARY_PATH

(or add something in that spirit to one's ~/.bashrc).

This doesn't seem to be a very neat workaround + probably it's not how things are intended to work.

Where could the problem be and is there another way to fix that?

P.S. The output of the configuration can be found here.

ryanlevy commented 7 years ago

The GSL manual actually gives that as the solution. For now that'll be a work around, but I think we can force cmake to load the full path and not rely on LD_LIBRARY_PATH

ryanlevy commented 7 years ago

After some digging, it appears this is because in Ubuntu the GSL install path is an implicit search path. No matter what I've tried, I can't seem to get the RPATH for GSL to link under Ubuntu, but it is working for OSX...

egull commented 7 years ago

OK. So what should we do? Would specifying -DGSL_ROOT_DIR=... help and enforce the path?

pbakalov commented 7 years ago

If this is the solution in the GSL manual, maybe it's not such a sloppy workaround, after all.

I guess it's good enough for me. Many thanks!

egull commented 7 years ago

OK. Closing this despite not actually having a decent and useful solution.