Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 931778 - dev-libs/mimalloc-2.1.4 fails to build in llvm system due to libatomic
Summary: dev-libs/mimalloc-2.1.4 fails to build in llvm system due to libatomic
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthew Smith
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-05-12 03:54 UTC by mojyack
Modified: 2024-05-20 08:12 UTC (History)
3 users (show)

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


Attachments
emerge --info (file_931778.txt,6.42 KB, text/plain)
2024-05-12 04:50 UTC, mojyack
Details
build log (temp.tar.gz,800.00 KB, application/gzip)
2024-05-12 04:50 UTC, mojyack
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mojyack 2024-05-12 03:54:30 UTC
Commit a8f1993453bb362f73c31b5eaa122f2ee1adf4c5 adds -DMI_USE_LIBATOMIC=ON
But it breaks build on llvm system, which has no libatomic.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-12 04:08:17 UTC
Full build.log and emerge --info please.
Comment 2 mojyack 2024-05-12 04:50:00 UTC
Created attachment 892750 [details]
emerge --info
Comment 3 mojyack 2024-05-12 04:50:55 UTC
Created attachment 892751 [details]
build log
Comment 4 Matthew Smith gentoo-dev 2024-05-14 07:32:21 UTC
I added -DMI_USE_LIBATOMIC=ON to force -libatomic to fix Bug 923177, but I did not think about llvm/compiler-rt.

Maybe the ebuild should check to see if libatomic exists first, just like what append-atomic-flags does?
Comment 5 mojyack 2024-05-20 00:43:07 UTC
Bug 923177 has been fixed in upstream.
so I think this hack will no longer needed from the next version.
Comment 6 Larry the Git Cow gentoo-dev 2024-05-20 08:11:10 UTC
The bug has been referenced in the following commit(s):

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

commit cb65f4903f9b72a0ac51b6192762d659009baf4d
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-05-20 08:10:19 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-05-20 08:10:52 +0000

    dev-libs/mimalloc: add 2.1.6
    
    Includes a note to cleanup the libatomic hack in the next release.
    
    Bug: https://bugs.gentoo.org/923177
    Bug: https://bugs.gentoo.org/931778
    Closes: https://bugs.gentoo.org/930519
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/mimalloc/Manifest              |  1 +
 dev-libs/mimalloc/mimalloc-2.1.6.ebuild | 39 +++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79560e44184ed0241f7199722cf8c1dd3207b256

commit 79560e44184ed0241f7199722cf8c1dd3207b256
Author:     Matthew Smith <matthew@gentoo.org>
AuthorDate: 2024-05-17 08:57:18 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-05-20 08:10:51 +0000

    dev-libs/mimalloc: conditionally add -latomic
    
    Some systems do not have libatomic, so forcing its use causes build
    errors.
    
    Bug: https://bugs.gentoo.org/931778
    Signed-off-by: Matthew Smith <matthew@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/36716
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/mimalloc/mimalloc-2.1.4.ebuild | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-20 08:12:49 UTC
Thank you!