Closed barracuda156 closed 8 months ago
The fix would be passing -latomic
in Makevars.in conditional on GCC being the compiler and, preferably, on 32-bit platform (or implementing a test for atomics with/without libatomic
). Otherwise it is IMO acceptable to link it just conditional on GCC.
Linking to libatomic seems to be required only in some architectures. So far, only this one has been identified (well, not entirely; we would need further details about your platform, @barracuda156), and therefore the inclusion of -latomic
should be restricted to this platform to avoid breaking other setups that were working perfectly fine.
@Enchufa2 AFAIK, ppc, arm and mips need this for 32-bit versions of archs. I can only test ppc personally, no hardware for the rest. My platform is Darwin.
A quick googling shows that the issue is nothing specific to my platform though: https://github.com/protocolbuffers/protobuf/issues/5219 https://github.com/arvidn/libtorrent/issues/5117
e5bb5789391a110ff15280f7094c5d8413629c1c will likely fail to have a desired effect, since we need to check specifically 8-byte atomics.