hpparvi / PyTransit

Fast and easy exoplanet transit light curve modelling.
GNU General Public License v2.0
99 stars 23 forks source link

Failed installation (Mac) #26

Closed tomgreene closed 5 years ago

tomgreene commented 6 years ago

I cloned the repository per your README.md and then installed gfortran from https://gcc.gnu.org/wiki/GFortranBinaries, installing gfortran6.3 for my macOS Sierra (10.12) machine.

I then attempted to build PyTransit with the provided command: $ python setup.py config_fc --fcompiler=gnu95 --opt="-Ofast" --f90flags="-cpp -fopenmp -march=native -mno-avx" build

All was OK until I got many errors due to symbols not being found:

... /usr/local/bin/gfortran -Wall -g -L/usr/local/lib build/temp.macosx-10.7-x86_64-3.5/build/src.macosx-10.7-x86_64-3.5/pytransit/gimenez_fmodule.o build/temp.macosx-10.7-x86_64-3.5/build/src.macosx-10.7-x86_64-3.5/fortranobject.o build/temp.macosx-10.7-x86_64-3.5/src/gimenez.o build/temp.macosx-10.7-x86_64-3.5/build/src.macosx-10.7-x86_64-3.5/pytransit/gimenez_f-f2pywrappers2.o -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin16/6.3.0 -L/Users/tgreene/anaconda/envs/astro3/lib -lgomp -lm -lgfortran -o build/lib.macosx-10.7-x86_64-3.5/pytransit/gimenez_f.cpython-35m-darwin.so Undefined symbols for architecture x86_64: "_GOMP_parallel", referenced from: _gimenez_MODalpha.constprop.6 in gimenez.o gimenez_MOD_alpha in gimenez.o _gimenez_MOD_gimenezm in gimenez.o gimenez_MOD_eval_lerp in gimenez.o "_PyArg_ParseTupleAndKeywords", referenced from: _f2py_rout_gimenez_f_gimenez_init_arrays in gimenez_fmodule.o _f2py_rout_gimenez_f_gimenez_eval_lerp in gimenez_fmodule.o _f2py_rout_gimenez_f_gimenez_eval in gimenez_fmodule.o _f2py_rout_gimenez_f_gimenez_gimenez_m in gimenez_fmodule.o _f2py_rout_gimenez_f_gimenez_alpha in gimenez_fmodule.o _f2py_rout_gimenez_f_gimenez_jacobi in gimenez_fmodule.o (etc...) ld: symbol(s) not found for architecture x86_64 ...

The same errors occurred when I tried installing on another Mac running OS X 10.11 and gfortran6.1. I'd appreciate any help in resolving this.

hpparvi commented 6 years ago

Hi Tom,

Can you check that you have libgomp somewhere where the linker can find it? I'm using gfortran installed with brew (running on macOS 10.13 with GFortran 6.3) and have no trouble with the compilation, so this might be an issue with the fortran installation.

tomgreene commented 6 years ago

Hi Hannu,

Thanks for your quick reply.

Here is what I have: $ ls -l /usr/local/gfortran/lib/libgomp* ...2016-05-06 14:28 libgomp.1.dylib ...2016-05-06 14:28 libgomp.a ...2018-07-06 07:46 libgomp.dylib -> libgomp.1.dylib ...2016-05-06 14:28 libgomp.la ...2016-05-06 14:28 libgomp.spec

So it looks like libgomp is there. I also copied the files to /usr/lib/local and got the same result. Any other ideas?

tomgreene commented 6 years ago

oops... I now see that "_GOMP_parallel" IS found OK if I put it in /usr/local/lib or if I change the command to: $ /usr/local/bin/gfortran -Wall -g -L/usr/local/gfortran/lib build/temp.macosx...

However I still have all of the _Py... symbols not found. Those are not in /usr/local/lib. Any ideas on how to make them available to the linker?

hpparvi commented 5 years ago

Hi Tom,

Did you manage to sort this out in the end?

Cheers, Hannu

tomgreene commented 5 years ago

Hello Hannu,

Thanks for getting back to me on this. Yes, I did eventually get a transit light curve simulator working, but I ended up using BATMAN instead.

Cheers,

Tom


Tom Greene (thomas.p.greene@nasa.gov) Ames Research Center, MS 245-6, Moffett Field, CA 94035, USA Voice & text: +1 650 539 5244 (rings office & mobile) FAX: 650 604 6779

On Wed, 23 Jan 2019, Hannu Parviainen wrote:

Hi Tom,

Did you manage to sort this out in the end?

Cheers, Hannu

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.[AbGKNm0nk_P-qg7fvoOyzLMxydor0Xzcks5vGM4OgaJpZM4VErV3.gif]

hpparvi commented 5 years ago

Ok :)