GNU bug report logs - #31561
[PATCH] gnu: custom-gcc: Fix regex used for matching executables.

Previous Next

Package: guix-patches;

Reported by: Alex Vong <alexvong1995 <at> gmail.com>

Date: Wed, 23 May 2018 07:46:02 UTC

Severity: normal

Tags: patch

Done: Danny Milosavljevic <dannym <at> scratchpost.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 31561 in the body.
You can then email your comments to 31561 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 guix-patches <at> gnu.org:
bug#31561; Package guix-patches. (Wed, 23 May 2018 07:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alex Vong <alexvong1995 <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 23 May 2018 07:46:02 GMT) Full text and rfc822 format available.

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

From: Alex Vong <alexvong1995 <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: alexvong1995 <at> gmail.com
Subject: [PATCH] gnu: custom-gcc: Fix regex used for matching executables.
Date: Wed, 23 May 2018 15:44:59 +0800
[Message part 1 (text/plain, inline)]
Hello,

Some time ago, I tried installing gccgo and couldn't get it to
work. Later I forgot about it. Today, I want to give gccgo a try
again. So I re-encounter the same problem. After some debugging
(building gcc takes so looong!), I figure it out this time! The issue is
that the regex used for removing unneeded binaries also matches "gccgo",
the attached patch should fix the issue.

Some reflection: It took me quite a while to figure out the problem,
since 'delete-file' in (guix build utils) does not print to
stdout/stderr when it deletes a file. Should we have some kind of
tracing for procedures in (guix build utils)?

[0001-gnu-custom-gcc-Fix-regex-used-for-matching-executabl.patch (text/x-diff, inline)]
From 58a1309ff26cb4c16f36e62ddb92b106b6d4c964 Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995 <at> gmail.com>
Date: Wed, 23 May 2018 08:27:10 +0800
Subject: [PATCH] gnu: custom-gcc: Fix regex used for matching executables.

* gnu/packages/gcc.scm (custom-gcc)[arguments]: Fix regex used for matching
broken or conflicting executables to avoid deleting "gccgo".
---
 gnu/packages/gcc.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index ba2fce6d3..5760e9c34 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -602,7 +602,7 @@ as the 'native-search-paths' field."
              (lambda* (#:key outputs #:allow-other-keys)
                (for-each delete-file
                          (find-files (string-append (assoc-ref outputs "out") "/bin")
-                                     ".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc.*)"))
+                                     "(c\\+\\+|cpp|g\\+\\+|gcov|gcc|gcc-.*)$"))
                #t))))))))
 
 (define %generic-search-paths
-- 
2.17.0

[Message part 3 (text/plain, inline)]
Cheers,
Alex
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#31561; Package guix-patches. (Mon, 11 Jun 2018 12:33:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Alex Vong <alexvong1995 <at> gmail.com>
Cc: 31561 <at> debbugs.gnu.org
Subject: Re: [bug#31561] [PATCH] gnu: custom-gcc: Fix regex used for matching
 executables.
Date: Mon, 11 Jun 2018 14:32:47 +0200
Hello,

Alex Vong <alexvong1995 <at> gmail.com> skribis:

> Some time ago, I tried installing gccgo and couldn't get it to
> work. Later I forgot about it. Today, I want to give gccgo a try
> again. So I re-encounter the same problem. After some debugging
> (building gcc takes so looong!), I figure it out this time! The issue is
> that the regex used for removing unneeded binaries also matches "gccgo",
> the attached patch should fix the issue.

Oh, good catch!

> Some reflection: It took me quite a while to figure out the problem,
> since 'delete-file' in (guix build utils) does not print to
> stdout/stderr when it deletes a file. Should we have some kind of
> tracing for procedures in (guix build utils)?

I agree it would have helped in this case, but I’m not sure how to add
it.

> From 58a1309ff26cb4c16f36e62ddb92b106b6d4c964 Mon Sep 17 00:00:00 2001
> From: Alex Vong <alexvong1995 <at> gmail.com>
> Date: Wed, 23 May 2018 08:27:10 +0800
> Subject: [PATCH] gnu: custom-gcc: Fix regex used for matching executables.
>
> * gnu/packages/gcc.scm (custom-gcc)[arguments]: Fix regex used for matching
> broken or conflicting executables to avoid deleting "gccgo".
> ---
>  gnu/packages/gcc.scm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
> index ba2fce6d3..5760e9c34 100644
> --- a/gnu/packages/gcc.scm
> +++ b/gnu/packages/gcc.scm
> @@ -602,7 +602,7 @@ as the 'native-search-paths' field."
>               (lambda* (#:key outputs #:allow-other-keys)
>                 (for-each delete-file
>                           (find-files (string-append (assoc-ref outputs "out") "/bin")
> -                                     ".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc.*)"))
> +                                     "(c\\+\\+|cpp|g\\+\\+|gcov|gcc|gcc-.*)$"))

I think we need to keep the leading “.*” to match things like
‘x86_64-linux-gnu-gcc’.  The rest looks good though.  WDYT?

“guix refresh -l -e '(@@ (gnu packages gcc) gfortran)'” reports 854
dependent, which means we should apply it to ‘staging’.

Thanks, and sorry for the delay!

Ludo’.




bug closed, send any further explanations to 31561 <at> debbugs.gnu.org and Alex Vong <alexvong1995 <at> gmail.com> Request was from Danny Milosavljevic <dannym <at> scratchpost.org> to control <at> debbugs.gnu.org. (Wed, 13 Jun 2018 23:33:02 GMT) Full text and rfc822 format available.

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

This bug report was last modified 5 years and 280 days ago.

Previous Next


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