Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 956710 - sys-libs/libnvme-1.14 fails to build on musl
Summary: sys-libs/libnvme-1.14 fails to build on musl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2025-05-27 12:50 UTC by Brayan M. Salazar
Modified: 2025-05-27 13:09 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,17.08 KB, text/x-log)
2025-05-27 12:50 UTC, Brayan M. Salazar
Details
Patch solving it (001-fix-glibc-specific-include.patch,559 bytes, patch)
2025-05-27 12:51 UTC, Brayan M. Salazar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brayan M. Salazar 2025-05-27 12:50:36 UTC
Created attachment 929795 [details]
build.log

sys-libs/libnvme-1.14 includes a glibc-specific header that makes it impossible to build on musl. I managed to build it with a tiny patch telling the compiler not to include it if it's not being compiled against glibc.
Comment 1 Brayan M. Salazar 2025-05-27 12:51:57 UTC
Created attachment 929796 [details, diff]
Patch solving it
Comment 2 Alfred Wingate 2025-05-27 12:55:07 UTC
Upstream merged a patch just removing the include entirely.
Comment 3 Alfred Wingate 2025-05-27 12:56:58 UTC
This is also a secondary bug as the build system added building examples as an option and it is currently unconditionally enabled.

https://github.com/linux-nvme/libnvme/pull/1014
Comment 4 Alfred Wingate 2025-05-27 12:58:22 UTC
(In reply to Alfred Wingate from comment #3)
> This is also a secondary bug as the build system added building examples as
> an option and it is currently unconditionally enabled.
> 
> https://github.com/linux-nvme/libnvme/pull/1014

Correction, this change isn't tagged. So the new build option is for the next version.
Comment 5 Brayan M. Salazar 2025-05-27 13:00:22 UTC
(In reply to Alfred Wingate from comment #4)
> (In reply to Alfred Wingate from comment #3)
> > This is also a secondary bug as the build system added building examples as
> > an option and it is currently unconditionally enabled.
> > 
> > https://github.com/linux-nvme/libnvme/pull/1014
> 
> Correction, this change isn't tagged. So the new build option is for the
> next version.

I see it'll be solved, thank you so much Alfred!
Comment 6 Brayan M. Salazar 2025-05-27 13:01:22 UTC
I guess I'm closing this bug as resolved.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-27 13:02:25 UTC
We still need to backport it (which is why he didn't close it).
Comment 8 Larry the Git Cow gentoo-dev 2025-05-27 13:09:18 UTC
The bug has been closed via the following commit(s):

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

commit 473f1c93f5092d5214d4c7fd253ff561c34a0bb1
Author:     Alfred Wingate <parona@protonmail.com>
AuthorDate: 2025-05-27 13:05:49 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-05-27 13:08:39 +0000

    sys-libs/libnvme: drop unnecessary glibc specific inlude
    
    Closes: https://bugs.gentoo.org/956710
    Signed-off-by: Alfred Wingate <parona@protonmail.com>
    Part-of: https://github.com/gentoo/gentoo/pull/42280
    Closes: https://github.com/gentoo/gentoo/pull/42280
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/libnvme-1.14-remove-glibc-include.patch  | 29 ++++++++++++++++++++++
 sys-libs/libnvme/libnvme-1.14.ebuild               |  4 +++
 2 files changed, 33 insertions(+)