[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#31561] [PATCH] gnu: custom-gcc: Fix regex used for matching executa
From: |
Ludovic Courtès |
Subject: |
[bug#31561] [PATCH] gnu: custom-gcc: Fix regex used for matching executables. |
Date: |
Mon, 11 Jun 2018 14:32:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hello,
Alex Vong <address@hidden> 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 <address@hidden>
> 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’.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug#31561] [PATCH] gnu: custom-gcc: Fix regex used for matching executables.,
Ludovic Courtès <=