You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Debian, builds for libkiwix are failing on armel, mipsel, and a few other architectures because of a missing link to atomic.
The error is something like:
/usr/bin/ld: src/25a6634@@kiwix@sha/server_request_context.cpp.o: in function `std::__atomic_base<unsignedlonglong>::fetch_add(unsignedlonglong, std::memory_order)':/usr/include/c++/9/bits/atomic_base.h:541: undefined reference to `__atomic_fetch_add_8'
collect2: error: ld returned 1 exit status
Searching around a bit, it seems we just need to add -latomic for those architectures. See e.g. how redis fixed this in redis/redis#6275 / redis/redis@f5d4853
Some architectures, specifically armel, mipsel, m68k & powerpc in
Debian, need to explicitly link to atomic.
Use meson to see if the target's CPU family is one of those, and if so,
pass -latomic to the linker.
Tested on armel and mipsel machines to verify passing -latomic works, and
on armhf and amd64 to ensure normal builds aren't broken.
Fixes#371.
On Debian, builds for libkiwix are failing on armel, mipsel, and a few other architectures because of a missing link to
atomic
.The error is something like:
Here are the full build logs: https://buildd.debian.org/status/package.php?p=libkiwix&suite=experimental
Searching around a bit, it seems we just need to add
-latomic
for those architectures. See e.g. how redis fixed this in redis/redis#6275 / redis/redis@f5d4853For meson I think we can use https://mesonbuild.com/Reference-manual.html#build_machine-object to vary what we link against.
The text was updated successfully, but these errors were encountered: