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

clang update may have broken something to do with atomic #282

Closed
joakim-noah opened this issue May 22, 2016 · 1 comment
Closed

clang update may have broken something to do with atomic #282

joakim-noah opened this issue May 22, 2016 · 1 comment

Comments

@joakim-noah
Copy link
Contributor

joakim-noah commented May 22, 2016

I'm compiling the exact same codebase that I was before with clang 3.8.0-2, but it doesn't link anymore when using -std=c++11, because most object files are now missing __atomic_fetch_add_4. Looking at prior C++ builds, none of the object files had that symbol anywhere and I'm not sure where it's coming from now. I think this is a regression in the latest clang, or possibly libandroid-support-dev, which is the only other package containing headers that was updated. I last updated four days ago, so it's something recent that's broken.

Update: Another example is that I was able to build llvm locally before, but it now fails with this message when building with clang:

-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Failed
-- Looking for __atomic_fetch_add_4 in atomic
-- Looking for __atomic_fetch_add_4 in atomic - not found
CMake Error at cmake/modules/CheckAtomic.cmake:36 (message):
  Host compiler appears to require libatomic, but cannot find it.

That first atomics test passes with g++ 6.1.0, so I tried building llvm with g++, but it barfs on the first file in llvm with many errors.

Update 2: By adding -target armv7-linux-android to my CFLAGS and CXXFLAGS, llvm passes the atomic check and is compiling again. Funny what a big difference that subtle change makes. :)

@fornwall
Copy link
Member

Thanks! Fixed in the 3.8.0-5 version of the clang package now.

@ghost ghost locked and limited conversation to collaborators Oct 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants