ProjectISP / ISP

Integrated Seismic Program (software development)
45 stars 10 forks source link

gfortran error running elemse in GitHub on Mac #9

Open shicks-seismo opened 2 years ago

shicks-seismo commented 2 years ago

Error message:

(ISP) sph1r17@NOCS04167J-2 green_source % ./elemse dyld[2992]: Library not loaded: /usr/local/lib/libgfortran.4.dylib Referenced from: /Users/sph1r17/programs/ISP/isp/mti/green_source/elemse Reason: tried: '/usr/local/lib/libgfortran.4.dylib' (no such file), '/usr/lib/libgfortran.4.dylib' (no such file) zsh: abort ./elemse

Solution:

  1. locate libgfortran.4.dylib Output:

/Users/Shared/Previously Relocated Items/Security/anaconda3/envs/SRCtest/lib/libgfortran.4.dylib /Users/Shared/Previously Relocated Items/Security/anaconda3/envs/eqcorrscan/lib/libgfortran.4.dylib /Users/Shared/Previously Relocated Items/Security/anaconda3/envs/hypoddpy/lib/libgfortran.4.dylib /Users/Shared/Previously Relocated Items/Security/anaconda3/envs/obspy/lib/libgfortran.4.dylib /Users/Shared/Previously Relocated Items/Security/anaconda3/envs/py2.7/lib/libgfortran.4.dylib /Users/Shared/Previously Relocated Items/Security/anaconda3/envs/pygmt/lib/libgfortran.4.dylib /Users/Shared/Previously Relocated Items/Security/anaconda3/pkgs/libgfortran-4.0.0-0/lib/libgfortran.4.dylib /Users/Shared/Previously Relocated Items/Security/anaconda3/pkgs/libgfortran-4.0.0-2/lib/libgfortran.4.dylib /Users/sph1r17/opt/anaconda3/envs/isp/lib/libgfortran.4.dylib /Users/sph1r17/opt/anaconda3/envs/rsudp/lib/libgfortran.4.dylib

  1. ln -s /Users/sph1r17/opt/anaconda3/envs/isp/lib/libgfortran.4.dylib /usr/local/lib/libgfortran.4.dylib
rcabdia commented 2 years ago

Hello Steve, you are right. I found some issues in Mac computers related to the compilation of BayesianIsola. More precisely ISP try to compile ./isp/mti/green_source/elemse.for and gr_xyz. As you said, sometimes it couldn't be found the library libgfortran.4.dylib.

However, before doing the symlink that you suggest, Users must install inside ISP condo environment the compilers.

conda install -c conda-forge compilers, otherwise there will not that library opt/anaconda3/envs/isp/lib/libgfortran.4.dylib to link it.

Many thanks