https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: media-libs/noise-suppression-for-voice-1.03 fails to compile. Discovered on: amd64 (internal ref: clang-lld_tinderbox) System: CLANG-LLD (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CLANG-LLD) Info about the issue: https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0014
Created attachment 886143 [details] build.log build log and emerge --info
Error(s) that match a know pattern in addition to what has been reported in the summary: FAILED: src/common/common_plugin_tests src/common/common_plugin_tests_tests-b12d07c.cmake /var/tmp/portage/media-libs/noise-suppression-for-voice-1.03/work/noise-suppression-for-voice-1.03_build/src/common/common_plugin_tests_tests-b12d07c.cmake ld.lld: error: undefined symbol: __atomic_store
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bdff1dfb5cdf6d3c34be3108c514cbdd00eb2e1 commit 5bdff1dfb5cdf6d3c34be3108c514cbdd00eb2e1 Author: Kacper Słomiński <kacper.slominski72@gmail.com> AuthorDate: 2024-03-28 03:50:11 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-03-28 04:00:34 +0000 media-libs/noise-suppression-for-voice: Fix build with Clang Closes: https://bugs.gentoo.org/925672 Signed-off-by: Kacper Słomiński <kacper.slominski72@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/35957 Signed-off-by: Sam James <sam@gentoo.org> .../noise-suppression-for-voice-1.03.ebuild | 11 ++++++++++- .../noise-suppression-for-voice-9999.ebuild | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec90f4c3a4e0ef9841dede7b18df90e2aceafd45 commit ec90f4c3a4e0ef9841dede7b18df90e2aceafd45 Author: Eli Schwartz <eschwartz93@gmail.com> AuthorDate: 2024-03-28 03:47:10 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-03-29 18:45:05 +0000 flag-o-matic.eclass: simplify implementation and work in all cases It curently uses some magic test to decide whether handcrafted code works with or without -latomic. But it can claim that -latomic is not needed for that case, while it is still needed for other cases. > okay so append-atomic-flags does not work for me in this case > noise-suppression-for-voice is doing `struct RnNoiseStats { uint32_t a, b, c, d; }; std::atomic<RnNoiseStats> m_stats;` > not just a single large integer It is simplest to always add -latomic when an ebuild gets that deep feeling that yeah, it would like some atomics please. The downsides to listing a linker library are exactly: - it might be unavailable - it might be unneeded And the former case is trivial to solve -- this function already does so -- while the latter case has a sanctioned approach that is already used for other intrinsic compiler libraries, but not for atomic "because the build system would have a hard time if we had to build atomic early on" which isn't a very good reason to break ebuilds which aren't building sys-devel/gcc. As a side benefit, we now handle -latomic such that a package which requires it, but only for parts of the installed package, does not overlink to libatomic in *all* binaries/libraries, even if the default LDFLAGS are overridden and the global -Wl,--as-needed disappears. Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358 Bug: https://bugs.gentoo.org/820101 Bug: https://bugs.gentoo.org/925672 Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> eclass/flag-o-matic.eclass | 80 +++++++++++----------------------------------- 1 file changed, 19 insertions(+), 61 deletions(-)