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

Basic Install instructions for wgrib2 3.5 on MacOS- Error with LD symbols and libwgrib2.dir libwgrib2.dylib #302

Open
theweatherguy opened this issue Dec 8, 2024 · 0 comments

Comments

@theweatherguy
Copy link

I'm running into problems installing wgrib2 3.5 on MacOS (Intel). I've placed the downloaded wgrib2 folder in my /usr/local directory.

I have gcc-14, gfortran and cmake installed via Homebrew.

As is the case with current wgrib2 3.1.3, clang doesn't work so I'm forcing the use of gcc with these instructions
sudo cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++

Here's the entire sequence of commands I'm running to try to install wgrib2 3.5—

cd /usr/local/wgrib2

mkdir build && cd build
sudo cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ .. DCMAKE_INSTALL_PREFIX=install -DCMAKE_PREFIX_PATH=/usr/local/bin
make
make install

It attempts to build, gets to 99% then shows these errors:

ld: symbol(s) not found for architecture x86_64
cc: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [wgrib2/libwgrib2.dylib] Error 1
make[1]: *** [wgrib2/CMakeFiles/wgrib2_lib.dir/all] Error 2
make: *** [all] Error 2

The error seems to be around the file libwgrib2.dylib, wgrib2_lib.dir and ld symbols not found.

Can wgrib2 3.5 be installed on MacOS?

Any help and suggestions about (1) correct directory to install and (2) additional dependency libraries that need to installed via Homebrew would be appreciated.

Thank you in advance.

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

1 participant