-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems using cSHTOOLS on macOS #267
Comments
I faced exactly the same issue. I had to use:
in the terminal and then run it. Not very sure about MacOS environment so I don't know why. |
Thanks for the suggestion. I did try manually setting the Library path in the terminal, but that didn't help. All it did was to add a duplicate line to the "Library search paths" above. |
This is what I see
this is after using the export library path to gfortran. As I see in your verbose output, the cellar path to gfortran is not there as it is in mine here. Maybe this will be of some help. |
Interesting. It looks like you are using the default Apple g++ compiler (/usr/bin/g++), which doesn't come with a gfortran library. Then, you link to the gfortran library supplied by homebrew's gcc installation. This does indeed work, but, I would prefer to use homebrew's g++ compiler (/usr/local/bin/g++-10). If you find a way to get this to work, let me know! |
This default is clang; they just symlinked it to appear like gcc. So there wouldn't be a Fortran library, AFAIK. |
I am able to get the SHTOOLS C wrapper functions to compile on macOS, and to run the test suite. However, I need to manually alter the
LIB
string inexamples/cpp/Makefile
in order to find thegfortran
library. This is hindering me to find a common solution so that the tests can be run in github actions and travis on both the macOS and linux platforms.When using
g++-10
(installed via homebrew), I need to manually add the search path-L /usr/local/Cellar/gcc/10.2.0/lib/gcc/10
. This is strange to me, because if I force verbose output when linking, the output says explicitly that this path is in the linker's search path. If I don't add this search path manually, I get errors like this:If I use
g++-9
, I get slightly different, but very similar errors, like this:In contrast, if I try to use Apple's
clang
,g++
orgcc
(located in /usr/bin), I simply get an error that it can't find the gfortran library:It is possible that there is something wrong with the homebrew g++ compiler, and I have opened a discussion here.
The text was updated successfully, but these errors were encountered: