Raspbian build fails due to need for libatomic
envgap__capnproto__capnproto-1448
01 / FAILURE SIGNATURE
As reported upstream
/usr/bin/ld: ./.libs/libcapnp.so: undefined reference to `__atomic_load_8'
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
b55af93a71011ab7323401be8de8dd6bb0fcb38d- Manifest
c++/src/kj/CMakeLists.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
capnproto/capnproto #1448 · read the original issue
I'm building CapnP 0.9.1 from source on a new Raspberry Pi 4 running Raspbian (because apt only has version 0.7.) ``` $ curl -O https://capnproto.org/capnproto-c++-0.9.1.tar.gz $ tar zxf capnproto-c++-0.9.1.tar.gz $ cd capnproto-c++-0.9.1 $ ./configure $ make -j6 check $ sudo make install ``` Everything went fine until the final "sudo make install" step: ``` ... libtool: link: g++ -I./src -I./src -DKJ_HEADER_WARNINGS -DCAPNP_HEADER_WARNINGS -DCAPNP_INCLUDE_DIR=\"/usr/local/include\" -pthread -O2 -DNDEBUG -pthread -DKJ_HAS_ZLIB -pthread -o .libs/capnp src/capnp/compiler/module-loader.o src/capnp/compiler/capnp.o ./.libs/libcapnpc.so ./.libs/libcapnp-json.so ./.libs/libcapnp.so ./.libs/libkj.so -lpthread -pthread /usr/bin/ld: ./.libs/libcapnp.so: undefined reference to `__atomic_load_8' /usr/bin/ld: ./.libs/libcapnp.so: undefined reference to `__atomic_store_8’ ``` After some googling I found that the fix is to link with libatomic -- I simply changed `LIBS` in the Makefile (`LIBS = -lpthread -latomic`), but I'm aware the Makefile is generated by autoconf; I'm not sure where the list of libraries actually comes from.
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]