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

OSX Clang OpenMP fails on -latomic #1494

Open
KrisThielemans opened this issue Aug 23, 2024 · 0 comments
Open

OSX Clang OpenMP fails on -latomic #1494

KrisThielemans opened this issue Aug 23, 2024 · 0 comments
Assignees
Labels

Comments

@KrisThielemans
Copy link
Collaborator

KrisThielemans commented Aug 23, 2024

To prevent problems on Linux clang, I inserted

STIR/src/CMakeLists.txt

Lines 139 to 142 in e03fbd0

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# work around https://gitlab.kitware.com/cmake/cmake/-/issues/26037
set (OpenMP_EXE_LINKER_FLAGS OpenMP::OpenMP_CXX -latomic)
message(STATUS "OpenMP Linker flags for Clang: ${OpenMP_EXE_LINKER_FLAGS}")

However, this gives linking problems on OSX clang on conda in conda-forge/stir-feedstock#121

ld: library not found for -latomic

Ideally we'd convert this to a link test.

See also llvm/llvm-project#73361 for the upstream problem.

@KrisThielemans KrisThielemans self-assigned this Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant