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)
Summary: [Tracker] Libatomic-related build failures on 32-bit arches (non-x86)
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
Depends on: 453704 551956 688574 727546 734606 740464 770748 782811 639678 668002 719662 720806 727652 734628 738642 764662 778455
  Show dependency tree
Reported: 2020-05-07 01:23 UTC by Sam James
Modified: 2021-05-09 07:20 UTC (History)
2 users (show)

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


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:

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 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.