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: 453704 551956 688574 727546 734606 770748 790689 802162 803470 806472 820101 820104 828065 639678 668002 719662 720806 727652 734628 738642 740464 764662 778455 782811 790590 803473 809830 820095 827203 830286
Blocks: riscv-keywording
  Show dependency tree
 
Reported: 2020-05-07 01:23 UTC by Sam James
Modified: 2021-12-30 11:12 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-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-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.