[MacPorts] #62848: redis @6.2.3: Undefined symbols ___atomic_compare_exchange_8 ___atomic_fetch_add_8 ___atomic_load_8
MacPorts
noreply at macports.org
Thu Jun 9 14:46:33 UTC 2022
#62848: redis @6.2.3: Undefined symbols ___atomic_compare_exchange_8
___atomic_fetch_add_8 ___atomic_load_8
-------------------------+------------------------------
Reporter: ryandesign | Owner: dgilman
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 2.6.4
Resolution: fixed | Keywords: snowleopard i386
Port: redis |
-------------------------+------------------------------
Comment (by kencu):
So the way to fix this libatomic thing is:
use a clang that has i386 atomics enabled (see above. clang used to
default to having atomics enabled in clang_rt, then the default changed we
had to specifically enable it again .. I think I fixed all or nearly all
of them).
or, only when building with gcc (or more specifically, when building
against libgcc, which contains libatomic), add -latomic to the linker
flags.
It is indeed some spaghetti to cover off all these permutations. Quite a
few configure scripts will test to see if adding libatomic is required to
support atomics.
For those that don't, in practical terms, what we usually do is something
like this pseudo-code:
{{{
if {test for compiler being gcc} {
configure.ldflags-append -latomic
}
}}}
--
Ticket URL: <https://trac.macports.org/ticket/62848#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list