[PATCH v1] gnu: glibc/hurd: Hide to prevent warning

  • Done
  • quality assurance status badge
Details
4 participants
  • Jakob Kirsch
  • Jonas Meeuws
  • yelninei
  • Simon Tournier
Owner
unassigned
Submitted by
Jakob Kirsch
Severity
normal

Debbugs page

J
J
Jakob Kirsch wrote on 18 Mar 10:46 -0700
(address . guix-patches@gnu.org)
Z9mxdInFZ81EAXne@kernelpanicroom
When dealing with the glibc package, you will often see the following warning:

warning: ambiguous package specification `glibc'
warning: choosing glibc@2.39 from gnu/packages/base.scm:915:2

This is due to the fact that Hurd glibc is exported. A simple fix is to declare it as a hidden-package.

* gnu/packages/base.scm: (glibc/hurd): Hide

Change-Id: I3785a2d35e1c9b4efa039dbba7f379ae052dc69a
---
gnu/packages/base.scm | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)

Toggle diff (36 lines)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 4c96ffa1a4..e8d502de8d 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1663,17 +1663,18 @@ (define-public which
(license gpl3+))) ; some files are under GPLv2+

(define-public glibc/hurd
- (package/inherit glibc
- (source
- (origin
- (inherit (package-source glibc))
- (patches
- (append (origin-patches (package-source glibc))
- (search-patches "glibc-hurd-pthread_setcancelstate.patch"
- "glibc-hurd64-fault.patch"
- "glibc-hurd64-intr-msg-clobber.patch"
- "glibc-hurd64-sgms-context.patch"
- "glibc-hurd64-gcc-14.2-tls-bug.patch")))))))
+ (hidden-package
+ (package/inherit glibc
+ (source
+ (origin
+ (inherit (package-source glibc))
+ (patches
+ (append (origin-patches (package-source glibc))
+ (search-patches "glibc-hurd-pthread_setcancelstate.patch"
+ "glibc-hurd64-fault.patch"
+ "glibc-hurd64-intr-msg-clobber.patch"
+ "glibc-hurd64-sgms-context.patch"
+ "glibc-hurd64-gcc-14.2-tls-bug.patch"))))))))

(define-public glibc/hurd-headers
(package/inherit glibc/hurd

base-commit: fa39695bbc0c5f79838cbca55d55eebd821a8efa
--
2.48.1
J
J
Jonas Meeuws wrote on 30 Jun 04:30 -0700
(address . 77103@debbugs.gnu.org)
2603bb9d-9ddb-4919-9384-855cd5746ece@gmail.com
I find that `guix build glibc`, with or without version spec, currently
builds either glibc or glibc/hurd *at random*.
S
S
Simon Tournier wrote on 22 Aug 05:10 -0700
87ect3y2u2.fsf@gmail.com
Hi,

CC: Hurd team. :-)

On Tue, 18 Mar 2025 at 18:46, Jakob Kirsch via Guix-patches via <guix-patches@gnu.org> wrote:
Toggle quote (53 lines)
> When dealing with the glibc package, you will often see the following warning:
>
> warning: ambiguous package specification `glibc'
> warning: choosing glibc@2.39 from gnu/packages/base.scm:915:2
>
> This is due to the fact that Hurd glibc is exported. A simple fix is to declare it as a hidden-package.
>
> * gnu/packages/base.scm: (glibc/hurd): Hide
>
> Change-Id: I3785a2d35e1c9b4efa039dbba7f379ae052dc69a
> ---
> gnu/packages/base.scm | 23 ++++++++++++-----------
> 1 file changed, 12 insertions(+), 11 deletions(-)
>
> diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
> index 4c96ffa1a4..e8d502de8d 100644
> --- a/gnu/packages/base.scm
> +++ b/gnu/packages/base.scm
> @@ -1663,17 +1663,18 @@ (define-public which
> (license gpl3+))) ; some files are under GPLv2+
>
> (define-public glibc/hurd
> - (package/inherit glibc
> - (source
> - (origin
> - (inherit (package-source glibc))
> - (patches
> - (append (origin-patches (package-source glibc))
> - (search-patches "glibc-hurd-pthread_setcancelstate.patch"
> - "glibc-hurd64-fault.patch"
> - "glibc-hurd64-intr-msg-clobber.patch"
> - "glibc-hurd64-sgms-context.patch"
> - "glibc-hurd64-gcc-14.2-tls-bug.patch")))))))
> + (hidden-package
> + (package/inherit glibc
> + (source
> + (origin
> + (inherit (package-source glibc))
> + (patches
> + (append (origin-patches (package-source glibc))
> + (search-patches "glibc-hurd-pthread_setcancelstate.patch"
> + "glibc-hurd64-fault.patch"
> + "glibc-hurd64-intr-msg-clobber.patch"
> + "glibc-hurd64-sgms-context.patch"
> + "glibc-hurd64-gcc-14.2-tls-bug.patch"))))))))
>
> (define-public glibc/hurd-headers
> (package/inherit glibc/hurd
>
> base-commit: fa39695bbc0c5f79838cbca55d55eebd821a8efa
> --
> 2.48.1

Hurd team, what do you think about this patch?

Cheers,
simon
Y
Y
yelninei wrote on 23 Aug 06:16 -0700
(name . Simon Tournier)(address . zimon.toutoune@gmail.com)
OYHKOcZ--F-9@tutamail.com
Hi,


Aug 22, 2025, 13:50 by zimon.toutoune@gmail.com:

Toggle quote (7 lines)
> Hi,
>
> CC: Hurd team. :-)
>
> Hurd team, what do you think about this patch?
>

Since the core-packages-team merge glibc/hurd is an alias for glibc.
See 72dbcff9377d693ba2fe7e8563d7e40de6e19765

I don't think this is an issue currently but it might become one again when additional patches are added to glibc/hurd 

Toggle quote (4 lines)
> Cheers,
> simon
>
>
S
S
Simon Tournier wrote on 25 Aug 02:47 -0700
(address . yelninei@tutamail.com)
87349flokz.fsf@gmail.com
Hi,

On Sat, 23 Aug 2025 at 15:16, yelninei--- via Guix-patches via <guix-patches@gnu.org> wrote:

Toggle quote (3 lines)
> I don't think this is an issue currently but it might become one again
> when additional patches are added to glibc/hurd 

Well, I propose to close this patch until the issue potentially shows up
again. :-)

Once the issue appears again, maybe open a Pull Request on Codeberg
referencing this past thread.

Feel free to reopen if I’m missing something.

Cheers,
simon
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 77103@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 77103
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch