Bug 243959 - Compilation on powerpc fails with __atomic_compare_exchange_8
Summary: Compilation on powerpc fails with __atomic_compare_exchange_8
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.1-STABLE
Hardware: powerpc Any
: --- Affects Only Me
Assignee: freebsd-ppc (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-07 14:56 UTC by Yuri Victorovich
Modified: 2020-04-20 19:00 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2020-02-07 14:56:34 UTC
Testcase: net-p2p/libtorrent-rasterbar, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243958
Comment 1 canardo 2020-02-08 18:43:55 UTC
In bug #242745 related to port editors/libreoffice, there an error `__atomic_load_8'

/usr/local/bin/ld: /usr/ports/editors/libreoffice/work/libreoffice-6.3.4.2/instdir/sdk/lib/libuno_sal.so: undefined reference to `__atomic_load_8'

Is it related ?
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2020-02-08 19:07:44 UTC
(In reply to canardo from comment #1)

> Is it related ?

Seems like it is related.
Comment 3 canardo 2020-02-09 10:33:38 UTC
Same error when building sysutils/bareos-client and sysutils/bareos-server
core/src/lib/libbareos.so.19.2.5: undefined reference to `__atomic_load_8'

(I didn't create dedicated PR for that)
Comment 4 Alfredo Dal'Ava Junior freebsd_committer freebsd_triage 2020-02-11 22:23:24 UTC
On FreeBSD 12 (GCC) you may need to link with libatomic.so (-latomic)

On FreeBSD 13 (LLVM) you shouldn't see this problem when using base cc (clang), as this is expected to be handled by this hhttps://reviews.freebsd.org/D22549
Comment 5 canardo 2020-02-12 06:22:29 UTC
(In reply to Alfredo Dal'Ava Junior from comment #4)

To link with libatomic.so (-latomic), I guess you have to modify the Makefile ?
Could you please describe exactly what to add and where (I'm no developer) ?