You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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()
I tested this with different clang versions. The native Apple clang requires the -c flag, otherwise the linker step fails with undefined symbols. The LLVM clang ranlib (llvm-ranlib) doesn't understand the -c flag and doesn't need it.
The text was updated successfully, but these errors were encountered:
climbfuji
changed the title
Patch for adding -c to ranlib flags must only be applied when using Intel on Apple systems
Patch for adding -c to ranlib flags must not be applied when using llvm-ranlibFeb 8, 2022
Trying to build
develop
or release11.5.0
on macOS with LLVM clang + gfortran:In CMakeLists.txt:
I tested this with different
clang
versions. The native Apple clang requires the-c
flag, otherwise the linker step fails with undefined symbols. The LLVM clang ranlib (llvm-ranlib
) doesn't understand the-c
flag and doesn't need it.The text was updated successfully, but these errors were encountered: