Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 721344 (libatomic-linking) - [Tracker] Libatomic-related build failures on 32-bit arches (non-x86) and riscv
Summary: [Tracker] Libatomic-related build failures on 32-bit arches (non-x86) and riscv
Status: CONFIRMED
Alias: libatomic-linking
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Other
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://www.mail-archive.com/bug-auto...
Whiteboard:
Keywords:
Depends on: 551956 734606 770748 802162 820104 902777 911759 918981 923177 926265 453704 518582 639678 668002 688574 719662 720806 727546 727652 734628 738642 740464 764662 778455 782811 790590 790689 803470 803473 806472 809830 820095 820101 827203 828065 830286 832675 832816 833372 835003 836125 836951 837740 847904 857804 860078 864421 872959 895308 906638 912341
Blocks: riscv-keywording
  Show dependency tree
 
Reported: 2020-05-07 01:23 UTC by Sam James
Modified: 2024-03-06 14:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-05-07 01:23:57 UTC
Typical errors look like:
>proto_http.c:(.text+0xbfc): undefined reference to `__atomic_fetch_add_8'

gyakovlev has investigated this here: https://bugs.gentoo.org/719662#c3.

The gist is that libatomic is not always part of libstdc++. It looks like this is the case on non-x86 32 bit arches, but arm in at least some of these bugs has already been identified by upstream and handled in their build system.

Patches should be trivial in just adding -latomic on ppc/other 32-bit arches. With --as-needed in LDFLAGS, it shouldn't matter if we add it when it's unnecessary, I think.

We may need to come up with a neat macro/conditional to cleanly match only e.g. ppc and not ppc64.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-05-07 01:32:21 UTC
I have assigned this to base-system@ for now because it seems to be an autoconf bug exposed by newer versions of GCC (>= 8).

Please reassign if you feel this is not appropriate.
Comment 2 Georgy Yakovlev archtester gentoo-dev 2020-05-07 01:44:02 UTC
ppc32 check should generally be

> defined(__powerpc__) && !defined(__powerpc64__)

because __powerpc__ also defined on ppc64 hosts.