undefined reference to `__atomic_load_8' on ARMv6
envgap__PurpleI2P__i2pd-897
01 / FAILURE SIGNATURE
As reported upstream
HTTPServer.cpp:(.text+0x7e2c): 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
1853263f6c73a5cee8f6686bedda3af5bf3cf6d5- Manifest
build/CMakeLists.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
PurpleI2P/i2pd #897 · read the original issue
Hello!
I encountered the following linker problem with the [recent](https://github.com/PurpleI2P/i2pd/releases/tag/2.14.0) i2pd sources:
```
HTTPServer.cpp:(.text+0x7e2c): undefined reference to `__atomic_load_8'
I2PControl.cpp:(.text+0xddc): undefined reference to `__atomic_load_8'
I2PControl.cpp:(.text+0xe74): undefined reference to `__atomic_load_8'
NTCPSession.cpp:(.text+0x5a00): undefined reference to `__atomic_fetch_add_8'
TransitTunnel.cpp:(.text+0x5c): undefined reference to `__atomic_fetch_add_8'
Transports.cpp:(.text+0x4bc): undefined reference to `__atomic_load_8'
SSUSession.cpp:(.text+0x370): undefined reference to `__atomic_fetch_add_8'
```
and so on.
So I had to add the `-latomic` to the following [line](https://github.com/PurpleI2P/i2pd/blob/openssl/build/CMakeLists.txt#L443) in the `CMakeLists.txt` in order to build the executable:
`target_link_libraries( "${PROJECT_NAME}" libi2pd i2pdclient ${DL_LIB} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MINGW_EXTRA} ${DL_LIB} -latomic )`
I doubt this is a correct solution -- just reporting the result. This issue looks very similar to [another](https://github.com/PurpleI2P/i2pd/issues/285) one which was closed some time ago, but for another CPU architecture. So it might be worth making some kind of a universal solution to it.
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]