Closed JonLoveday closed 1 year ago
Thanks for the report! Just to confirm, it looks like this is on a Mac? Can you provide your operating system version?
Usually a shared library issue like this happens when Corrfunc is installed in an environment where a library is available (GSL, in this case) and is then executed in a different environment where that library is not available. So you might want to double-check that you are installing and running in the same shell environment, same modules (if applicable), same conda env, etc.
On the other hand, it looks like we're inserting the GSL path via rpath
here, so I would have expected this to be pretty robust.
@manodeep might have to lend his Mac expertise here!
(I added some formatting to your comment for readability.)
MacOS 12.5
I think I've only got one conda environment (a fresh install on a new machine), and a new install of gsl 2.7 (make installcheck gave no errors).
Corrfunc finds GSL via the gsl-config
executable e.g. here. If you use gsl-config --prefix
, does it show the GSL that you installed?
Seems OK:
(base) loveday@mps024704 gsl-2.7 % gsl-config --prefix
/usr/local
(base) loveday@mps024704 gsl-2.7 % ls /usr/local
bin include munki sbin
etc lib munkireport share
(base) loveday@mps024704 gsl-2.7 % ls /usr/local/lib
libgsl.25.dylib libgsl.la libgslcblas.dylib
libgsl.a libgslcblas.0.dylib libgslcblas.la
libgsl.dylib libgslcblas.a pkgconfig
(base) loveday@mps024704 gsl-2.7 %lsa /usr/local/lib
total 35592
drwxr-xr-x 11 root wheel 352 26 Aug 15:15 .
drwxr-xr-x 10 root wheel 320 26 Aug 15:15 ..
-rwxr-xr-x 1 root wheel 3225164 26 Aug 15:15 libgsl.25.dylib
-rw-r--r-- 1 root wheel 13588280 26 Aug 15:15 libgsl.a
lrwxr-xr-x 1 root wheel 15 26 Aug 15:15 libgsl.dylib -> libgsl.25.dylib
-rwxr-xr-x 1 root wheel 910 26 Aug 15:15 libgsl.la
-rwxr-xr-x 1 root wheel 266368 26 Aug 15:15 libgslcblas.0.dylib
-rw-r--r-- 1 root wheel 1124448 26 Aug 15:15 libgslcblas.a
lrwxr-xr-x 1 root wheel 19 26 Aug 15:15 libgslcblas.dylib -> libgslcblas.0.dylib
-rwxr-xr-x 1 root wheel 937 26 Aug 15:15 libgslcblas.la
drwxr-xr-x 3 root wheel 96 26 Aug 15:15 pkgconfig
(base) loveday@mps024704 gsl-2.7 %
I agree, looks okay. You might try installing from source, although I'm not sure why that would be different. You might also try export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH
(or Mac equivalent), although I would have thought that path would already be there.
@manodeep, can you take a look at this when you get the chance? A quick search brings up this (old) post which suggests the rpath syntax on MacOS is different than on Linux, could be relevant? https://stackoverflow.com/questions/4513799/how-to-set-the-runtime-path-rpath-of-an-executable-with-gcc-under-mac-osx
@JonLoveday If you just want to fix the issue, then the fastest way would be to uninstall Corrfunc, install gsl through conda (conda install -c conda-forge gsl), and then re-install Corrfunc (python -m pip install Corrfunc).
If you want to debug what’s going, then I would first uninstall Corrfunc, and then install Corrfunc from source (ie git clone https://github.com/manodeep/Corrfunc) and then check if the regular install is working through - make && make tests. If that all works out (as expected), then please install the python wrappers with python -m pip —verbose install . &>install.log from the Corrfunc root directory (not sure how to enable verbose with the -m pip). The problem should still remain but at least we will be able to see what’s happening with the install paths.
Many thanks Manodeep. Reinstalling gsl via conda did the trick, and was much faster than installing from source. Cheers, Jon
Great - glad that the issue got sorted!
I just did pip install Corrfunc without problems. However, the tests fail: