GNU bug report logs - #46380
[PATCH] gnu: gccgo: Add version 10.

Previous Next

Package: guix-patches;

Reported by: manolis837 <at> gmail.com

Date: Mon, 8 Feb 2021 12:01:01 UTC

Severity: normal

Tags: patch

Done: Sarah Morgensen <iskarian <at> mgsn.dev>

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 46380 in the body.
You can then email your comments to 46380 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#46380; Package guix-patches. (Mon, 08 Feb 2021 12:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to manolis837 <at> gmail.com:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 08 Feb 2021 12:01:02 GMT) Full text and rfc822 format available.

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

From: manolis837 <at> gmail.com
To: guix-patches <at> gnu.org
Cc: Manolis Ragkousis <manolis837 <at> gmail.com>
Subject: [PATCH] gnu: gccgo: Add version 10.
Date: Mon,  8 Feb 2021 14:00:19 +0200
From: Manolis Ragkousis <manolis837 <at> gmail.com>

* gnu/packages/patches/gcc-10-libgo-runpath.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add patch.
* gnu/packages/gcc.scm (gccgo-10): New package.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/gcc.scm                          | 21 +++++++++++++++++++
 .../patches/gcc-10-libgo-runpath.patch        | 16 ++++++++++++++
 3 files changed, 38 insertions(+)
 create mode 100644 gnu/packages/patches/gcc-10-libgo-runpath.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index f908f51074..302d3e2aa8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1030,6 +1030,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gcc-6-fix-buffer-size.patch	\
   %D%/packages/patches/gcc-6-libsanitizer-mode-size.patch	\
   %D%/packages/patches/gcc-7-libsanitizer-mode-size.patch	\
+  %D%/packages/patches/gcc-10-libgo-runpath.patch		\
   %D%/packages/patches/gcc-libvtv-runpath.patch			\
   %D%/packages/patches/gcc-strmov-store-file-names.patch	\
   %D%/packages/patches/gcc-4-compile-with-gcc-5.patch		 \
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 9b2a5556f6..d113cce2da 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -773,6 +773,27 @@ provides the GNU compiler for the Go programming language."))
               ;; a cyclic dependency.  <http://debbugs.gnu.org/18101>
               #:separate-lib-output? #f))
 
+(define-public gccgo-10
+  (custom-gcc (package
+                (inherit gcc-10)
+                (source
+                 (origin
+                   (inherit (package-source gcc-10))
+                   (patches
+                    (append
+                     (origin-patches (package-source gcc-10))
+                     (search-patches "gcc-10-libgo-runpath.patch")))))
+                (synopsis "Go frontend to GCC")
+                (description
+                 "This package is part of the GNU Compiler Collection and
+provides the GNU compiler for the Go programming language."))
+              "gccgo" '("go")
+              %generic-search-paths
+              ;; Suppress the separate "lib" output, because otherwise the
+              ;; "lib" and "out" outputs would refer to each other, creating
+              ;; a cyclic dependency.  <http://debbugs.gnu.org/18101>
+              #:separate-lib-output? #f))
+
 (define %objc-search-paths
   (list (search-path-specification
          (variable "OBJC_INCLUDE_PATH")
diff --git a/gnu/packages/patches/gcc-10-libgo-runpath.patch b/gnu/packages/patches/gcc-10-libgo-runpath.patch
new file mode 100644
index 0000000000..bf89d7b6d4
--- /dev/null
+++ b/gnu/packages/patches/gcc-10-libgo-runpath.patch
@@ -0,0 +1,16 @@
+gccgo needs libgo but it doesn't have $libdir in its RUNPATH.  This
+patch fixes that.
+
+diff --git a/libgo/Makefile.in b/libgo/Makefile.in
+index b835173585..64e45360aa 100644
+--- a/libgo/Makefile.in
++++ b/libgo/Makefile.in
+@@ -22,6 +22,8 @@
+ 
+ # Process this file with autoreconf to produce Makefile.in.
+ 
++libgo_llgo_la_LDFLAGS = -Wl,-rpath=$(libdir)
++
+ VPATH = @srcdir@
+ am__is_gnu_make = { \
+   if test -z '$(MAKELEVEL)'; then \
-- 
2.30.0





Information forwarded to guix-patches <at> gnu.org:
bug#46380; Package guix-patches. (Mon, 08 Feb 2021 12:08:02 GMT) Full text and rfc822 format available.

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

From: Manolis Ragkousis <manolis837 <at> gmail.com>
To: 46380 <at> debbugs.gnu.org
Subject: Fwd: [PATCH] gnu: gccgo: Add version 10.
Date: Mon, 8 Feb 2021 14:07:01 +0200
[Message part 1 (text/plain, inline)]
Re-sending to correct address


-------- Forwarded Message --------
Subject: Re: [PATCH] gnu: gccgo: Add version 10.
Date: Mon, 8 Feb 2021 14:06:20 +0200
From: Manolis Ragkousis <manolis837 <at> gmail.com>
To: manolis837 <at> gmail.com

This patch is the start of adding a newer gccgo version, based on the
suggestion from Leo Le Bouter, of replace go-1.4 with a newer version of
gccgo which could work on powerpc 64.

Currently the bellow patch fails the build with:

starting phase `validate-runpath'
validating RUNPATH of 170 binaries in
"/gnu/store/h8z1d4qwrabdp7ax73nz7bm9yvxjciy9-gccgo-10.2.0/lib"...
validating RUNPATH of 13 binaries in
"/gnu/store/h8z1d4qwrabdp7ax73nz7bm9yvxjciy9-gccgo-10.2.0/libexec"...
/gnu/store/h8z1d4qwrabdp7ax73nz7bm9yvxjciy9-gccgo-10.2.0/libexec/gcc/x86_64-unknown-linux-gnu/10.2.0/buildid:
error: depends on 'libgo.so.16', which cannot be found in RUNPATH
("/gnu/store/m1lw20jnpmbvlcwn7wkg1z77sqsni0hr-glibc-2.32/lib")
/gnu/store/h8z1d4qwrabdp7ax73nz7bm9yvxjciy9-gccgo-10.2.0/libexec/gcc/x86_64-unknown-linux-gnu/10.2.0/cgo:
error: depends on 'libgo.so.16', which cannot be found in RUNPATH
("/gnu/store/m1lw20jnpmbvlcwn7wkg1z77sqsni0hr-glibc-2.32/lib")
/gnu/store/h8z1d4qwrabdp7ax73nz7bm9yvxjciy9-gccgo-10.2.0/libexec/gcc/x86_64-unknown-linux-gnu/10.2.0/test2json:
error: depends on 'libgo.so.16', which cannot be found in RUNPATH
("/gnu/store/m1lw20jnpmbvlcwn7wkg1z77sqsni0hr-glibc-2.32/lib")
/gnu/store/h8z1d4qwrabdp7ax73nz7bm9yvxjciy9-gccgo-10.2.0/libexec/gcc/x86_64-unknown-linux-gnu/10.2.0/vet:
error: depends on 'libgo.so.16', which cannot be found in RUNPATH
("/gnu/store/m1lw20jnpmbvlcwn7wkg1z77sqsni0hr-glibc-2.32/lib")
validating RUNPATH of 3 binaries in
"/gnu/store/h8z1d4qwrabdp7ax73nz7bm9yvxjciy9-gccgo-10.2.0/bin"...
/gnu/store/h8z1d4qwrabdp7ax73nz7bm9yvxjciy9-gccgo-10.2.0/bin/go: error:
depends on 'libgo.so.16', which cannot be found in RUNPATH
("/gnu/store/m1lw20jnpmbvlcwn7wkg1z77sqsni0hr-glibc-2.32/lib")
/gnu/store/h8z1d4qwrabdp7ax73nz7bm9yvxjciy9-gccgo-10.2.0/bin/gofmt:
error: depends on 'libgo.so.16', which cannot be found in RUNPATH
("/gnu/store/m1lw20jnpmbvlcwn7wkg1z77sqsni0hr-glibc-2.32/lib")
error: in phase 'validate-runpath': uncaught exception:
misc-error #f "RUNPATH validation failed" () #f
phase `validate-runpath' failed after 0.3 seconds
Backtrace:
           9 (primitive-load "/gnu/store/axnbrhz8vjsj6gakdq6a2jargkj…")
In ice-9/eval.scm:
   191:35  8 (_ _)
In guix/build/gnu-build-system.scm:
    898:2  7 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #)
In ice-9/boot-9.scm:
  1736:10  6 (with-exception-handler _ _ #:unwind? _ # _)
In srfi/srfi-1.scm:
    634:9  5 (for-each #<procedure 7fffefe9db40 at guix/build/gnu-b…> …)
In ice-9/boot-9.scm:
  1736:10  4 (with-exception-handler _ _ #:unwind? _ # _)
In guix/build/gnu-build-system.scm:
   919:23  3 (_)
   562:10  2 (validate-runpath #:validate-runpath? _ # _ #:outputs _)
In ice-9/boot-9.scm:
  1669:16  1 (raise-exception _ #:continuable? _)
  1669:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1669:16: In procedure raise-exception:
RUNPATH validation failed


On 2/8/21 2:00 PM, manolis837 <at> gmail.com wrote:
> From: Manolis Ragkousis <manolis837 <at> gmail.com>
> 
> * gnu/packages/patches/gcc-10-libgo-runpath.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add patch.
> * gnu/packages/gcc.scm (gccgo-10): New package.
> ---
>  gnu/local.mk                                  |  1 +
>  gnu/packages/gcc.scm                          | 21 +++++++++++++++++++
>  .../patches/gcc-10-libgo-runpath.patch        | 16 ++++++++++++++
>  3 files changed, 38 insertions(+)
>  create mode 100644 gnu/packages/patches/gcc-10-libgo-runpath.patch
> 
> diff --git a/gnu/local.mk b/gnu/local.mk
> index f908f51074..302d3e2aa8 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1030,6 +1030,7 @@ dist_patch_DATA =						\
>    %D%/packages/patches/gcc-6-fix-buffer-size.patch	\
>    %D%/packages/patches/gcc-6-libsanitizer-mode-size.patch	\
>    %D%/packages/patches/gcc-7-libsanitizer-mode-size.patch	\
> +  %D%/packages/patches/gcc-10-libgo-runpath.patch		\
>    %D%/packages/patches/gcc-libvtv-runpath.patch			\
>    %D%/packages/patches/gcc-strmov-store-file-names.patch	\
>    %D%/packages/patches/gcc-4-compile-with-gcc-5.patch		 \
> diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
> index 9b2a5556f6..d113cce2da 100644
> --- a/gnu/packages/gcc.scm
> +++ b/gnu/packages/gcc.scm
> @@ -773,6 +773,27 @@ provides the GNU compiler for the Go programming language."))
>                ;; a cyclic dependency.  <http://debbugs.gnu.org/18101>
>                #:separate-lib-output? #f))
>  
> +(define-public gccgo-10
> +  (custom-gcc (package
> +                (inherit gcc-10)
> +                (source
> +                 (origin
> +                   (inherit (package-source gcc-10))
> +                   (patches
> +                    (append
> +                     (origin-patches (package-source gcc-10))
> +                     (search-patches "gcc-10-libgo-runpath.patch")))))
> +                (synopsis "Go frontend to GCC")
> +                (description
> +                 "This package is part of the GNU Compiler Collection and
> +provides the GNU compiler for the Go programming language."))
> +              "gccgo" '("go")
> +              %generic-search-paths
> +              ;; Suppress the separate "lib" output, because otherwise the
> +              ;; "lib" and "out" outputs would refer to each other, creating
> +              ;; a cyclic dependency.  <http://debbugs.gnu.org/18101>
> +              #:separate-lib-output? #f))
> +
>  (define %objc-search-paths
>    (list (search-path-specification
>           (variable "OBJC_INCLUDE_PATH")
> diff --git a/gnu/packages/patches/gcc-10-libgo-runpath.patch b/gnu/packages/patches/gcc-10-libgo-runpath.patch
> new file mode 100644
> index 0000000000..bf89d7b6d4
> --- /dev/null
> +++ b/gnu/packages/patches/gcc-10-libgo-runpath.patch
> @@ -0,0 +1,16 @@
> +gccgo needs libgo but it doesn't have $libdir in its RUNPATH.  This
> +patch fixes that.
> +
> +diff --git a/libgo/Makefile.in b/libgo/Makefile.in
> +index b835173585..64e45360aa 100644
> +--- a/libgo/Makefile.in
> ++++ b/libgo/Makefile.in
> +@@ -22,6 +22,8 @@
> + 
> + # Process this file with autoreconf to produce Makefile.in.
> + 
> ++libgo_llgo_la_LDFLAGS = -Wl,-rpath=$(libdir)
> ++
> + VPATH = @srcdir@
> + am__is_gnu_make = { \
> +   if test -z '$(MAKELEVEL)'; then \
> 

[kb09pdc1vgngqm4khf6mgjjp1d1k1n-gccgo-10.2.0.drv.bz2 (application/x-bzip, attachment)]

Reply sent to Sarah Morgensen <iskarian <at> mgsn.dev>:
You have taken responsibility. (Thu, 05 Aug 2021 23:15:01 GMT) Full text and rfc822 format available.

Notification sent to manolis837 <at> gmail.com:
bug acknowledged by developer. (Thu, 05 Aug 2021 23:15:02 GMT) Full text and rfc822 format available.

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

From: Sarah Morgensen <iskarian <at> mgsn.dev>
To: bug#46380 <46380-done <at> debbugs.gnu.org>
Subject: Re: bug#46380: [PATCH] gnu: gccgo: Add version 10.
Date: Thu, 05 Aug 2021 16:14:00 -0700
Superseded by #49019; closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 03 Sep 2021 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 230 days ago.

Previous Next


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