Skip to content
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

Can't Find gfortran library #3

Open
jshan432 opened this issue Nov 11, 2020 · 4 comments
Open

Can't Find gfortran library #3

jshan432 opened this issue Nov 11, 2020 · 4 comments

Comments

@jshan432
Copy link

Hello,

I am attempting to run SNOPT using the trial libraries. However, when calling SNOPT, the following error occurs.

LoadError: could not load library "/Users/lab_home/Documents/SNOPT/libsnopt7"
dlopen(/Users/lab_home/Documents/SNOPT/libsnopt7.dylib, 1): Library not loaded: /opt/local/lib/libgcc/libgfortran.5.dylib
Referenced from: /Users/lab_home/Documents/SNOPT/libsnopt7.dylib
Reason: image not found

It appears the snopt trial library is looking for the gfortran library in the wrong place? The /opt/local... directory doesn't actually exist on my Mac.

I appreciate any feedback you can give.

@gnowzil
Copy link
Contributor

gnowzil commented Nov 11, 2020

Hi, can you check that gfortran is installed on your computer? If which -a gfortran doesn't show anything, then it's not installed and I would recommend using either macports or homebrew to install on macos.

@jshan432
Copy link
Author

Thank you for getting back to me.

which -a gfortran returns

/usr/local/bin/gfortran
/usr/local/Cellar/gcc/10.2.0/bin/gfortran

and libgfortran.5.dylib exists in /usr/local/Cellar/gcc/10.2.0/lib/gcc/10

@jshan432
Copy link
Author

I found a work around for this issue, but now I get the following error:

ERROR: LoadError: could not load library "/Users/lab_home/Documents/SNOPT/libsnopt7_cpp"
dlopen(/Users/lab_home/Documents/SNOPT/libsnopt7_cpp.dylib, 1): Symbol not found: __ZNSt8ios_base4InitD1Ev
Referenced from: /Users/lab_home/Documents/SNOPT/libsnopt7_cpp.dylib
Expected in: flat namespace
in /Users/lab_home/Documents/SNOPT/libsnopt7_cpp.dylib

I appreciate your help.

@gnowzil
Copy link
Contributor

gnowzil commented Nov 11, 2020

I'm pretty sure in both cases it's due to compiler incompatibility. Our libraries were created using gcc9, it looks like you're using homebrew, which is using gcc10.

Let me get our libraries on gcc10 as well, since that is the current stable release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants