Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 893142

Summary: dev-libs/jemalloc-5.3.0-r1 cannot build with LLVM+Musl: jemalloc.h:254:32: error: exception specification in declaration does not match previous declaration
Product: Gentoo Linux Reporter: Josh Klar (klardotsh) <josh>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/jemalloc/jemalloc/pull/2338
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: jemalloc-5.3.0-r1 build.log
emerge --info

Description Josh Klar (klardotsh) 2023-02-03 21:12:46 UTC
Created attachment 849786 [details]
jemalloc-5.3.0-r1 build.log

This impacts anyone trying to use +jemalloc on packages when building up from the current musl-llvm-openrc stage3. This appears to be a flavor of the issue reported in GitHub jemalloc/jemalloc PR #2338 (I can't post links yet - despite being a long time Gentoo user off and on, I've never needed to register here :) )

For now I've had to just mask the package completely locally, even building with -O0 doesn't fix (not that I expected it would based on the errors, but since other jemalloc errors have been fixed with that, I gave it a shot).
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-04 11:15:14 UTC
What a compliment! :)

Could you include emerge --info for all of these bugs (+ going forward too)? Thanks!
Comment 2 Alex Fan archtester 2023-02-16 07:40:06 UTC
I can reproduce. musl doesn't have the nothrow attribute on those std malloc functions. Simply removing these attribute on jemalloc should fix it, like what Mac and BSD did.
Comment 3 Alex Fan archtester 2023-02-16 07:41:10 UTC
Created attachment 851528 [details]
emerge --info
Comment 4 Larry the Git Cow gentoo-dev 2023-03-20 05:36:05 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=466520df0a775cdc311a4642bdc4d3a309af573d

commit 466520df0a775cdc311a4642bdc4d3a309af573d
Author:     Violet Purcell <vimproved@inventati.org>
AuthorDate: 2023-03-18 00:02:52 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-03-20 05:30:56 +0000

    dev-libs/jemalloc: backport musl fix (PR 2338)
    
    Closes: https://bugs.gentoo.org/893142
    Signed-off-by: Violet Purcell <vimproved@inventati.org>
    Closes: https://github.com/gentoo/gentoo/pull/30199
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/jemalloc-5.3.0-backport-pr-2338.patch    | 83 ++++++++++++++++++++++
 dev-libs/jemalloc/jemalloc-5.3.0-r1.ebuild         |  3 +-
 2 files changed, 85 insertions(+), 1 deletion(-)