Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 925672 - media-libs/noise-suppression-for-voice-1.03 fails to compile: ld.lld: error: undefined symbol: __atomic_store
Summary: media-libs/noise-suppression-for-voice-1.03 fails to compile: ld.lld: error: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Rick Farina (Zero_Chaos)
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-02-28 08:09 UTC by Agostino Sarubbo
Modified: 2024-03-29 18:47 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,60.45 KB, text/plain)
2024-02-28 08:09 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-02-28 08:09:55 UTC
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
Comment 1 Agostino Sarubbo gentoo-dev 2024-02-28 08:09:56 UTC
Created attachment 886143 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2024-02-28 08:09:57 UTC
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
Comment 3 Larry the Git Cow gentoo-dev 2024-03-28 04:01:29 UTC
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(-)
Comment 4 Larry the Git Cow gentoo-dev 2024-03-29 18:47:49 UTC
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(-)