* [bug#31561] [PATCH] gnu: custom-gcc: Fix regex used for matching executables.
@ 2018-05-23 7:44 Alex Vong
2018-06-11 12:32 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Alex Vong @ 2018-05-23 7:44 UTC (permalink / raw)
To: 31561; +Cc: alexvong1995
[-- Attachment #1.1: Type: text/plain, Size: 630 bytes --]
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)?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-custom-gcc-Fix-regex-used-for-matching-executabl.patch --]
[-- Type: text/x-diff, Size: 1086 bytes --]
From 58a1309ff26cb4c16f36e62ddb92b106b6d4c964 Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@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
[-- Attachment #1.3: Type: text/plain, Size: 14 bytes --]
Cheers,
Alex
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [bug#31561] [PATCH] gnu: custom-gcc: Fix regex used for matching executables.
2018-05-23 7:44 [bug#31561] [PATCH] gnu: custom-gcc: Fix regex used for matching executables Alex Vong
@ 2018-06-11 12:32 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2018-06-11 12:32 UTC (permalink / raw)
To: Alex Vong; +Cc: 31561
Hello,
Alex Vong <alexvong1995@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@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’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-11 12:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-23 7:44 [bug#31561] [PATCH] gnu: custom-gcc: Fix regex used for matching executables Alex Vong
2018-06-11 12:32 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.