kasra-hosseini / obspyDMT

A Python toolbox for the query, retrieval, processing and management of seismological data sets, including very large, heterogeneous and/or dynamically growing ones.
http://kasra-hosseini.github.io/obspyDMT/
Other
89 stars 58 forks source link

Compilation of lanczos module fails under Mac OS X 10.10.5 and Xcode 7.0 #24

Closed auerl closed 7 years ago

auerl commented 9 years ago

We tried installing obspyDMT on a Mac (10.10.5) with Xcode 7 using the following steps:

  1. Download anaconda 2.3.0 for mac from http://continuum.io/downloads#all
  2. Install anaconda
  3. source ~/.bash_profile
  4. conda install -c obspy obspy
  5. conda install basemap
  6. git clone https://github.com/kasra-hosseini/obspyDMT.git
  7. pip install ./obspyDMT

When trying to install with pip we get the following compilation error:

gcc -bundle -undefined dynamic_lookup -L//anaconda/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.5-x86_64-2.7/obspyDMT/src/lanczos.o -L/usr/local/lib/gcc/x86_64-apple-darwin14.4.0/5.1.0/../../.. -L//anaconda/lib -lgfortran -o build/lib.macosx-10.5-x86_64-2.7/obspyDMT/lib/obspyDMT.so
ld: library not found for -lgcc_s.10.5
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

Apparently the gcc_s.10.5 library has been renamend with in the latest xcode update.

cd /usr/local/lib sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.4.dylib

and rerunning pip install ./obspyDMT seems to be an acceptable workaround.

Maybe this issue could be resolved with a fix in setup.py?

Cheers,

L.

kasra-hosseini commented 9 years ago

Thanks for reporting this issue! As you have already mentioned, this occurs in installation of lanczos module (an external FORTRAN code in obspyDMT that should be compiled first). I changed the code accordingly. Can I ask you to update your obspyDMT to the latest version and re-try the steps that you mentioned? I hope the issue is already resolved. If not, I would appreciate that if you send me the error message.

Cheers, K