teuben / nemo

a Stellar Dynamics Toolbox (Not Everybody Must Observe)
https://astronemo.readthedocs.io
GNU General Public License v2.0
57 stars 42 forks source link

MacOSX issues #10

Closed jcldc closed 6 years ago

jcldc commented 6 years ago

gnu compilers : 4.9.x

BUT impossible to create a nemo binary, exemple mknemo tsf cannot compile because compiler complains with message :

ld: unknown option: --no-as-needed
collect2: error: ld returned 1 exit status
make: *** [tsf] Error 1

This bad compilation option comes from file $NEMOLIB/makedefs file...

#  Another option is to add -Wl,--no-as-needed to CFLAGS
#  This is the current default in configure (to use it)
#  Comment the next line if you do not want this, or use --without-dso
NEMO_CFLAGS1 = -Wl,--no-as-needed
teuben commented 6 years ago

This must be an environment issue. On two of my cases I didn't have configure produce this option in the makedefs file. One case is 10.12 with the HPC.sourceforge.net compiler (7.1.0) and the other is 10.13 (high sierra) with the compiler via HomeBrew. I still have some minor issues, but I did get > 200 working executables in $NEMOBIN.

It also remains to be seen if this odd option is still needed under Linux.

teuben commented 6 years ago

the default in configure is --with-dso, but it seems on e.g. Ubuntu 17.10 this is not needed anymore, so now made the default to go without. If the test install script is used, for a mac it will already turn off this flag (dso=0).

If you can, test again, it should now work and we can close this issue.

jcldc commented 6 years ago

Ok great, works like a charm now on my MAC (10.13) with gcc 4.9.4 (macport). I guess you can close this issue.