odes
odes copied to clipboard
Linker issue during fedora installation: missing -L$ SUNDIALS_INST/lib64 compiler flag
Fedora 31 x86_64, Python 3.7, openblas from fedora repo, scikits.odes ver. 2.6.1
Sundials 5.1.0 (as recomended) installed to $HOME/opt/sundials/:
cmake -DLAPACK_ENABLE=ON -DSUNDIALS_INDEX_SIZE=64 -DCMAKE_INSTALL_PREFIX=$HOME/opt/sundials/ ../sundials-5.1.0/
make install
For my setup, snippet above installs libraries to lib64 subdirectory not lib/
After that pip fails due to ld cannot locate sundials libraries:
export SUNDIALS_INST=$HOME/opt/sundials
pip3 install scikits.odes
<...>
gcc -pthread -shared -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -g build/temp.linux-x86_64-3.7/scikits/odes/sundials/common_defs.o -L/home/my_user/opt/sundials/lib -L/usr/lib64 -L/usr/lib64 -lsundials_nvecserial -lsundials_sunlinsollapackband -lsundials_sunlinsollapackdense -lsundials_sunlinsolband -lsundials_sunlinsoldense -lsundials_sunlinsolpcg -lsundials_sunlinsolspbcgs -lsundials_sunlinsolspfgmr -lsundials_sunlinsolspgmr -lsundials_sunlinsolsptfqmr -lsundials_sunmatrixband -lsundials_sunmatrixdense -lsundials_sunmatrixsparse -lopenblas -lopenblas -lpython3.7m -o build/lib.linux-x86_64-3.7/scikits/odes/sundials/common_defs.cpython-37m-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -lsundials_nvecserial
/usr/bin/ld: cannot find -lsundials_sunlinsollapackband
/usr/bin/ld: cannot find -lsundials_sunlinsollapackdense
<...>
So we can see there's only -L/home/my_user/opt/sundials/lib library path and no lib64 one.
Exporting LD_LIBRARY_PATH didn't help.
But when I created link ln -s $SUNDIALS_INST/lib64/ $SUNDIALS_INST/lib , installation worked well.