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

CMakeLists.txt: check for atomic library #765

Closed
wants to merge 1 commit into from
Closed

CMakeLists.txt: check for atomic library #765

wants to merge 1 commit into from

Conversation

ffontaine
Copy link

@ffontaine ffontaine commented Dec 27, 2019

On some architectures, atomic binutils are provided by the libatomic
library from gcc. Linking with libatomic is therefore necessary,
otherwise the build fails with:

[100%] Linking CXX executable leveldbutil
/home/fabrice/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/7.4.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: libleveldb.a(env_posix.cc.o): in function `leveldb::(anonymous namespace)::Limiter::Acquire()':
env_posix.cc:(.text+0x124): undefined reference to `__atomic_fetch_sub_4'

This is often for example the case on sparcv8 32 bit.

Fixes:

Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com

On some architectures, atomic binutils are provided by the libatomic
library from gcc. Linking with libatomic is therefore necessary,
otherwise the build fails with:

[100%] Linking CXX executable leveldbutil
/home/fabrice/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/7.4.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: libleveldb.a(env_posix.cc.o): in function `leveldb::(anonymous namespace)::Limiter::Acquire()':
env_posix.cc:(.text+0x124): undefined reference to `__atomic_fetch_sub_4'

This is often for example the case on sparcv8 32 bit.

Fixes:
 - http://autobuild.buildroot.org/results/01d5a50581ac9e9b46f40e6f9665f74897db5e6f

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
@pwnall
Copy link
Member

pwnall commented Jul 13, 2020

Sorry, this seems like a platform-specific build configuration detail. Please consider patching CMake, or maintaining your own build configuration.

@pwnall pwnall closed this Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants