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

Undefined symbols on macOS with Intel compiler due to common symbols #620

Closed
kgerheiser opened this issue Jan 15, 2022 · 0 comments · Fixed by #628
Closed

Undefined symbols on macOS with Intel compiler due to common symbols #620

kgerheiser opened this issue Jan 15, 2022 · 0 comments · Fixed by #628
Assignees
Labels

Comments

@kgerheiser
Copy link
Contributor

kgerheiser commented Jan 15, 2022

This has come up in various libraries before (bufr, upp). Need to add this to the top-level CMakeLists.txt:

if(APPLE)
  # The linker on macOS does not include `common symbols` by default
  # Passing the -c flag includes them and fixes an error with undefined symbols
  set(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> -c <TARGET>")
  set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -c <TARGET>")
endif()
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Feb 7, 2022
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Feb 7, 2022
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Feb 11, 2022
GeorgeGayno-NOAA added a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Feb 17, 2022
GeorgeGayno-NOAA added a commit that referenced this issue Feb 17, 2022
The linker on macOS does not include `common symbols` by default.
The top level CMakeLists.txt file was updated to fix this.

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

Successfully merging a pull request may close this issue.

2 participants