-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fix: macOS ADIOS1 w/ cctools ld64 w/o XCode #1196
base: dev
Are you sure you want to change the base?
Conversation
CMakeLists.txt
Outdated
@@ -563,6 +563,11 @@ if(openPMD_HAVE_ADIOS1) | |||
set_target_properties(openPMD.ADIOS1.Serial PROPERTIES | |||
LINK_FLAGS "-Wl,--exclude-libs,ALL") | |||
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") | |||
check_linker_flag(CXX "-Wl,--exclude-libs,ALL" DARWIN_WO_XCODE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a CMake 3.18+ feature:
- https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4777
- https://cmake.org/cmake/help/latest/module/CheckLinkerFlag.html
Thus:
- need to bump CMake dependency from 3.15+ to 3.18+
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also: should use LINKER:
:
Expands to -Wl,--...
on GCC and to -Xlinker --...
on Clang.
ec470ef
to
f6ed2ef
Compare
478aade
to
972498c
Compare
@@ -459,6 +459,7 @@ set(IO_SOURCE | |||
set(IO_ADIOS1_SEQUENTIAL_SOURCE | |||
src/Error.cpp | |||
src/auxiliary/Filesystem.cpp | |||
src/auxiliary/JSON.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed because TracingJSON
is now used in CommonADIOS1IOHandler.cpp
9443d4b
to
3a15872
Compare
src/ChunkInfo.cpp | ||
src/IO/ADIOS/CommonADIOS1IOHandler.cpp | ||
src/IO/ADIOS/ADIOS1IOHandler.cpp) | ||
src/IO/ADIOS/ADIOS1IOHandler.cpp | ||
src/IO/IOTask.cpp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed because we use openPMD::internal::operationAsString
in CommonADIOS1IOHandler.cpp
59380d0
to
97cdc99
Compare
Some compiler toolchains on macOS do not use the XCode system compiler. For instance, conda-forge uses vanilla clang to build packages. In that case, the symbol hiding instructions we used on macOS were not effective, leading to errors like openPMD#1195. The current patch checks if the toolchain understands GCC/LLVM-ish linker flags on macOS and if it does, it adds them.
97cdc99
to
8e2e327
Compare
Some compiler toolchains on macOS do not use the XCode tools. For instance, conda-forge uses vanilla clang to build packages combined with a cctools
ld64
(similar to the macOS system linker) but without XCode.In that case, the symbol hiding instructions we used on macOS were not effective, leading to errors like #1195.
This also fixes regressions from #1101, similar to #1167.
The current patch checks if the toolchain understands GCC/LLVM/ld64-ish linker flags on macOS and if it does, it adds them.
Attention
llvm-strip
< 14 is also broken, which is used in Conda-Forgecompilers
-CMAKE_STRIP
should usecctools
'strip
command (needs to be set manually): Conda: llvm-strip <= 13 broken on Apple aarch64 M1 AMReX-Codes/pyamrex#35