GNU bug report logs - #54915
[PATCH] Guile rejects empty vendor in GNU triplets, as used by NetBSD

Previous Next

Package: guile;

Reported by: Taylor R Campbell <campbell+guile <at> mumble.net>

Date: Wed, 13 Apr 2022 15:31:03 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54915 in the body.
You can then email your comments to 54915 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#54915; Package guile. (Wed, 13 Apr 2022 15:31:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Taylor R Campbell <campbell+guile <at> mumble.net>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Wed, 13 Apr 2022 15:31:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Taylor R Campbell <campbell+guile <at> mumble.net>
To: bug-guile <at> gnu.org
Subject: [PATCH] Guile rejects empty vendor in GNU triplets, as used by NetBSD
Date: Wed, 13 Apr 2022 11:26:44 +0000
[Message part 1 (text/plain, inline)]
NetBSD uses an empty vendor string in a GNU target triplet, like
`x86_64--netbsd' or `armv7--netbsdelf-eabihf'; it's been like this
since the mid-'90s.  (Before that, NetBSD omitted the vendor
altogether, so if x86_64 existed then it might have been
`x86_64-netbsd'.)

This runs afoul of a rule in guile's validate-target in
module/system/base/target.scm that requires all components to be
nonempty, so pkgsrc's guile build has been carrying around a
workaround -- just for guile, not for any other packages I know of --
for ages.  Without the workaround in pkgsrc:

>   BOOTSTRAP(stage0) GUILEC ice-9/eval.go
> Backtrace:
>            7 (apply-smob/1 #<boot-closure 736f6474ff80 (_ _)> #<exc?> ?)
>            6 (apply-smob/1 #<boot-closure 736f2e2fbd80 ()>)
>            5 (apply-smob/0 #<thunk 736f2e2fbe40>)
>            4 (primitive-eval ((@ (ice-9 control) %) (begin (# #) ?)))
>            3 (apply-smob/1 #<boot-closure 736f63786a80 ()>)
>            2 (apply-smob/1 #<boot-closure 736f265a9500 ()>)
>            1 (scm-error misc-error #f "~A ~S" ("invalid target" "?") #)
>            0 (apply-smob/1 #<boot-closure 736f6474ff40 (_ . _)> # #f ?)
> 
> ERROR: In procedure apply-smob/1:
> invalid target "x86_64--netbsd"

The attached patch relaxes validate-target so it accepts an empty
vendor string (but still requires all other components to be nonempty
as before).  With the patch and without the workaround in pkgsrc,
guile builds happily.
[emptyvendor.patch (text/plain, attachment)]

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Thu, 16 Jun 2022 07:44:02 GMT) Full text and rfc822 format available.

Notification sent to Taylor R Campbell <campbell+guile <at> mumble.net>:
bug acknowledged by developer. (Thu, 16 Jun 2022 07:44:02 GMT) Full text and rfc822 format available.

Message #10 received at 54915-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Taylor R Campbell <campbell+guile <at> mumble.net>
Cc: 54915-done <at> debbugs.gnu.org
Subject: Re: bug#54915: [PATCH] Guile rejects empty vendor in GNU triplets,
 as used by NetBSD
Date: Thu, 16 Jun 2022 09:43:12 +0200
Hi,

Taylor R Campbell <campbell+guile <at> mumble.net> skribis:

>>From 12440a85559c3de5e6bced9c9377f3d5d7f5948e Mon Sep 17 00:00:00 2001
> From: Taylor R Campbell <campbell+guile <at> mumble.net>
> Date: Wed, 13 Apr 2022 09:51:08 +0000
> Subject: [PATCH] Allow empty vendor string in GNU target triplets.
>
> NetBSD and pkgsrc have been using an empty vendor string since the
> mid-'90s, such as x86_64--netbsd.  pkgsrc has been carrying around a
> workaround just the guile build for a long time.  (Before that,
> NetBSD omitted the vendor altogether, so if x86_64 existed then it
> might have been `x86_64-netbsd', but that caused more problems.)
> This change makes Guile accept an empty vendor string so workarounds
> are no longer necessary.
>
> * module/system/base/target.scm (validate-target): Allow empty vendor
> string in GNU target triplets.

I added tests in cross-compilation.test and committed.

Thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 14 Jul 2022 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.