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

8-byte atomics check in CMakeLists is broken: it does not pass -latomic flag when it is required #657

Open
barracuda156 opened this issue Jan 16, 2024 · 0 comments

Comments

@barracuda156
Copy link

It appears from CMakeLists that there is a check for atomics support and a need for libatomic, but it does not do anything. The required flag is not passed, and linking fails:

Undefined symbols:
  "___atomic_fetch_add_8", referenced from:
      __ZN14HttpDataStreamC4Ev in HttpDataStream.cpp.o
ld: symbol(s) not found
collect2: error: ld returned 1 exit status

Configure does something crazy :)

-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Failed
-- Looking for __atomic_load_8 in atomic
-- Looking for __atomic_load_8 in atomic - found
-- Performing Test HAVE_CXX_ATOMICS64_WITH_LIB
-- Performing Test HAVE_CXX_ATOMICS64_WITH_LIB - Success
-- Performing Test LLVM_HAS_ATOMICS
-- Performing Test LLVM_HAS_ATOMICS - Success

So despite HAVE_CXX_ATOMICS64_WITHOUT_LIB - Failed, it does not pass -latomic. I have no idea why and what it tried to check for LLVM, when GCC is used and compiler-rt is not even installed.

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