Pergunta

I am trying to install ObsPy with pip.

The installation fails on the cc command below:

cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/obspy/taup/src/emdlv.o build/temp.macosx-10.8-x86_64-2.7/obspy/taup/src/libtau.o build/temp.macosx-10.8-x86_64-2.7/obspy/taup/src/ttimes_subrout.o -lgfortran -o build/lib.macosx-10.8-x86_64-2.7/obspy/lib/libtaup.so

ld: library not found for -lgfortran

This SO question is similar: lgfortran not found, but the solution there was to change the makefile. I don't know how to do that when unsing pip install. I have installed gfortran using homebrew.

Is there a way that I can place a symlink to the existing gfortran lib folder in the location that this command is searching?

Would that location be /usr/local/lib?

Foi útil?

Solução

Heyhey,

there are some solutions. The easiest is to set the LD_LIBRARY_PATH to where the gfortran shared library is located.

locate libgfortran.a

Other then that you can also install the latest git version of ObsPy which should have solved this problem. Go to http://www.obspy.org to get the git URL.

Cheers!

Outras dicas

You can also find the location of the lib using:

sudo find /usr -iname 'libgfortran*.a' | xargs shasum

For me, what solved was setting this in the .pro file:

QMAKE_LIBDIR += /path/to/lib
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top