From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Nieuwenhuizen Subject: bug#37549: guix build bootstrap-tarballs installed but strip-install failed Date: Sun, 29 Sep 2019 13:33:41 +0200 Message-ID: <87v9tb2v6y.fsf@gnu.org> References: <20190929070712.GA127225@PhantoNv4ArchGx.localdomain> <878sq74glk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:48372) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEXTl-00086x-Ds for bug-guix@gnu.org; Sun, 29 Sep 2019 07:35:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iEXTi-00012J-Cy for bug-guix@gnu.org; Sun, 29 Sep 2019 07:35:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43604) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iEXTi-000123-7p for bug-guix@gnu.org; Sun, 29 Sep 2019 07:35:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iEXTi-0001t3-2w for bug-guix@gnu.org; Sun, 29 Sep 2019 07:35:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <878sq74glk.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Sun, 29 Sep 2019 11:05:59 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Bengt Richter Cc: 37549@debbugs.gnu.org --=-=-= Content-Type: text/plain Jan Nieuwenhuizen writes: > Bengt Richter writes: >> I tried >> guix build bootstrap-tarballs > > Yes, sadly that's not supported on current master. It should work on > core-updates. So I tried that and found it fails in similar ways. The attached patches resurrect the creation of bootstrap tarballs. Note that plain mes (./pre-inst-env guix build mes) still does not build; that also needs #37550. Greetings, janneke --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-bootstrap-mescc-tools-Use-mescc-tools-0.5.2-mescc-to.patch >From 74607653378ca1bcfed6a415a7432fd2a8af7105 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 29 Sep 2019 10:36:46 +0200 Subject: [PATCH 1/3] bootstrap: mescc-tools: Use mescc-tools-0.5.2, mescc-tools. * gnu/packages/mes.scm (mescc-tools-0.5.2): New variable; rename from mescc-tools. (mescc-tools): Rename from mescc-tools-0.6.1. Fix build. * gnu/packages/make-bootstrap.scm (%mescc-tools-static): Inherit fixed mescc-tools-0.5.2. --- gnu/packages/make-bootstrap.scm | 25 +------------------------ gnu/packages/mes.scm | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 29 deletions(-) diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index 4594e2fe36..8db551b3a7 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -594,34 +594,11 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." #t)))) (inputs `(("gcc" ,%gcc-static))))) -;; One package: build + remove store references -;; (define %mescc-tools-static-stripped -;; ;; A statically linked Mescc Tools with store references removed, for -;; ;; bootstrap. -;; (package -;; (inherit mescc-tools) -;; (name "mescc-tools-static-stripped") -;; (arguments -;; `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) -;; "CC=gcc -static") -;; #:test-target "test" -;; #:phases (modify-phases %standard-phases -;; (delete 'configure) -;; (add-after 'install 'strip-store-references -;; (lambda _ -;; (let* ((out (assoc-ref %outputs "out")) -;; (bin (string-append out "/bin"))) -;; (for-each (lambda (file) -;; (let ((target (string-append bin "/" file))) -;; (format #t "strippingg `~a'...~%" target) -;; (remove-store-references target))) -;; '( "M1" "blood-elf" "hex2")))))))))) - ;; Two packages: first build static, bare minimum content. (define %mescc-tools-static ;; A statically linked MesCC Tools. (package - (inherit mescc-tools) + (inherit mescc-tools-0.5.2) (name "mescc-tools-static") (arguments `(#:system "i686-linux" diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm index e1cb736b82..3f76eeb886 100644 --- a/gnu/packages/mes.scm +++ b/gnu/packages/mes.scm @@ -34,7 +34,8 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix licenses) - #:use-module (guix packages)) + #:use-module (guix packages) + #:use-module (guix utils)) (define-public nyacc-0.86 (package @@ -134,7 +135,8 @@ Guile.") (home-page "https://gnu.org/software/mes") (license gpl3+))) -(define-public mescc-tools +(define-public mescc-tools-0.5.2 + ;; Mescc-tools used for bootstrap. (let ((commit "bb062b0da7bf2724ca40f9002b121579898d4ef7") (revision "0") (version "0.5.2")) @@ -166,9 +168,9 @@ get_machine.") (home-page "https://savannah.nongnu.org/projects/mescc-tools") (license gpl3+)))) -(define-public mescc-tools-0.6.1 +(define-public mescc-tools (package - (inherit mescc-tools) + (inherit mescc-tools-0.5.2) (name "mescc-tools") (version "0.6.1") (source (origin @@ -180,4 +182,9 @@ get_machine.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "06jpvq6xfjzn2al6b4rdwd3zv3h4cvilc4n9gqcnjr9cr6wjpw2n")))))) + "06jpvq6xfjzn2al6b4rdwd3zv3h4cvilc4n9gqcnjr9cr6wjpw2n")))) + (arguments + (substitute-keyword-arguments (package-arguments mescc-tools-0.5.2) + ((#:make-flags flags) + `(list (string-append "PREFIX=" (assoc-ref %outputs "out")) + "CC=gcc")))))) -- 2.23.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-bootstrap-mes-Add-mes-0.19.patch >From 98382db4246a418b9e85a65f3e1a292fa5001e91 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 29 Sep 2019 10:39:40 +0200 Subject: [PATCH 2/3] bootstrap: mes: Add mes-0.19. * gnu/packages/mes.scm (mes-0.19): New variable. (mes): Inherit it. * gnu/packages/make-bootstrap.scm (%mes-minimal): Likewise. --- gnu/packages/make-bootstrap.scm | 35 +-------------------------------- gnu/packages/mes.scm | 27 ++++++++++++++++++++----- 2 files changed, 23 insertions(+), 39 deletions(-) diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index 8db551b3a7..b1c4feb4f4 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -633,45 +633,12 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." #t)))) (inputs `(("mescc-tools" ,%mescc-tools-static))))) -;; (define-public %mes-minimal-stripped -;; ;; A minimal Mes without documentation dependencies, for bootstrap. -;; (let ((triplet "i686-unknown-linux-gnu")) -;; (package -;; (inherit mes) -;; (name "mes-minimal-stripped") -;; (native-inputs -;; `(("guile" ,guile-2.2))) -;; (arguments -;; `(#:system "i686-linux" -;; #:strip-binaries? #f -;; #:configure-flags '("--mes") -;; #:phases -;; (modify-phases %standard-phases -;; (delete 'patch-shebangs) -;; (add-after 'install 'strip-install -;; (lambda _ -;; (let* ((out (assoc-ref %outputs "out")) -;; (share (string-append out "/share"))) -;; (delete-file-recursively (string-append out "/lib/guile")) -;; (delete-file-recursively (string-append share "/guile")) -;; (delete-file-recursively (string-append share "/mes/scaffold")) - -;; (for-each delete-file -;; (find-files -;; (string-append share "/mes/lib") "\\.(h|c)")) - -;; (for-each (lambda (dir) -;; (for-each remove-store-references -;; (find-files (string-append out "/" dir) -;; ".*"))) -;; '("bin" "share/mes"))))))))))) - ;; Two packages: first build static, bare minimum content. (define-public %mes-minimal ;; A minimal Mes without documentation. (let ((triplet "i686-unknown-linux-gnu")) (package - (inherit mes) + (inherit mes-0.19) (name "mes-minimal") (native-inputs `(("guile" ,guile-2.2))) diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm index 3f76eeb886..a01e98b855 100644 --- a/gnu/packages/mes.scm +++ b/gnu/packages/mes.scm @@ -38,6 +38,7 @@ #:use-module (guix utils)) (define-public nyacc-0.86 + ;; Nyacc used for bootstrap. (package (name "nyacc") (version "0.86.0") @@ -91,22 +92,23 @@ extensive examples, including parsers for the Javascript and C99 languages.") (inputs `(("guile" ,guile-2.2))))) -(define-public mes +(define-public mes-0.19 + ;; Mes used for bootstrap. (package (name "mes") - (version "0.20") + (version "0.19") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/mes/" "mes-" version ".tar.gz")) (sha256 (base32 - "04pajp8v31na34ls4730ig5f6miiplhdvkmsb9ls1b8bbmw2vb4n")))) + "15h4yhaywdc0djpjlin2jz1kzahpqxfki0r0aav1qm9nxxmnp1l0")))) (build-system gnu-build-system) (supported-systems '("i686-linux" "x86_64-linux")) (propagated-inputs - `(("mescc-tools" ,mescc-tools) - ("nyacc" ,nyacc))) + `(("mescc-tools" ,mescc-tools-0.5.2) + ("nyacc" ,nyacc-0.86))) (native-inputs `(("guile" ,guile-2.2) ,@(let ((target-system (or (%current-target-system) @@ -135,6 +137,21 @@ Guile.") (home-page "https://gnu.org/software/mes") (license gpl3+))) +(define-public mes + (package + (inherit mes-0.19) + (version "0.20") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/mes/" + "mes-" version ".tar.gz")) + (sha256 + (base32 + "04pajp8v31na34ls4730ig5f6miiplhdvkmsb9ls1b8bbmw2vb4n")))) + (propagated-inputs + `(("mescc-tools" ,mescc-tools) + ("nyacc" ,nyacc))))) + (define-public mescc-tools-0.5.2 ;; Mescc-tools used for bootstrap. (let ((commit "bb062b0da7bf2724ca40f9002b121579898d4ef7") -- 2.23.0 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0003-bootstrap-bash-Update-for-bash-5.0.patch Content-Transfer-Encoding: quoted-printable >From a7bc0810e89013c4b908e29ed0d97ca8317c7ad7 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 29 Sep 2019 12:01:51 +0200 Subject: [PATCH 3/3] bootstrap: bash: Update for bash-5.0. * gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch: Remove. * gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.patch: New file. * gnu/packages/make-bootstrap.scm (static-bash-for-bootstrap): Update to use it. * gnu/local.mk (dist_patch_DATA): Likewise. --- gnu/local.mk | 4 +-- gnu/packages/make-bootstrap.scm | 2 +- .../patches/bash-4.4-linux-pgrp-pipe.patch | 30 ---------------- .../bash-reproducible-linux-pgrp-pipe.patch | 34 +++++++++++++++++++ 4 files changed, 37 insertions(+), 33 deletions(-) delete mode 100644 gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch create mode 100644 gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.= patch diff --git a/gnu/local.mk b/gnu/local.mk index 9bd1e8882b..18a25e6bc7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -11,7 +11,7 @@ # Copyright =C2=A9 2016 Ben Woodcroft # Copyright =C2=A9 2016, 2017, 2018, 2019 Alex Vong # Copyright =C2=A9 2016, 2017, 2018, 2019 Efraim Flashner -# Copyright =C2=A9 2016, 2017 Jan Nieuwenhuizen +# Copyright =C2=A9 2016, 2017, 2018, 2019 Jan (janneke) Nieuwenhuizen # Copyright =C2=A9 2017, 2018, 2019 Tobias Geerinckx-Rice # Copyright =C2=A9 2017, 2018 Cl=C3=A9ment Lassieur # Copyright =C2=A9 2017 Mathieu Othacehe @@ -706,7 +706,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/avidemux-install-to-lib.patch \ %D%/packages/patches/awesome-reproducible-png.patch \ %D%/packages/patches/azr3.patch \ - %D%/packages/patches/bash-4.4-linux-pgrp-pipe.patch \ + %D%/packages/patches/bash-reproducible-linux-pgrp-pipe.patch \ %D%/packages/patches/bash-completion-directories.patch \ %D%/packages/patches/bastet-change-source-of-unordered_set.patch \ %D%/packages/patches/bazaar-CVE-2017-14176.patch \ diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.= scm index b1c4feb4f4..3a664fd94f 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -164,7 +164,7 @@ for `sh' in $PATH, and without nscd, and with static NS= S modules." (source (origin (inherit (package-source static-bash)) (patches - (cons (search-patch "bash-4.4-linux-pgrp-pipe.patch") + (cons (search-patch "bash-reproducible-linux-pgrp-pipe.patc= h") (origin-patches (package-source static-bash)))))))) =20 (define %static-inputs diff --git a/gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch b/gnu/pack= ages/patches/bash-4.4-linux-pgrp-pipe.patch deleted file mode 100644 index 0d03d7ce37..0000000000 --- a/gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch +++ /dev/null @@ -1,30 +0,0 @@ -Unconditionally enable PGRP_PIPE on Linux (the kernel), regardless of -the kernel version in use on the build machine. - ---- configure.ac.orig 1969-12-31 19:00:00.000000000 -0500 -+++ configure.ac 2019-08-11 22:28:26.038841961 -0400 -@@ -1092,9 +1092,7 @@ - solaris2*) LOCAL_CFLAGS=3D-DSOLARIS ;; - lynxos*) LOCAL_CFLAGS=3D-DRECYCLES_PIDS ;; - linux*) LOCAL_LDFLAGS=3D-rdynamic # allow dynamic loading -- case "`uname -r`" in -- 2.[[456789]]*|[[34]]*) AC_DEFINE(PGRP_PIPE) ;; -- esac ;; -+ AC_DEFINE(PGRP_PIPE) ;; - *qnx6*) LOCAL_CFLAGS=3D"-Dqnx -Dqnx6" LOCAL_LIBS=3D"-lncurses" ;; - *qnx*) LOCAL_CFLAGS=3D"-Dqnx -F -3s" LOCAL_LDFLAGS=3D"-3s" LOCAL_LIBS=3D= "-lunix -lncurses" ;; - powerux*) LOCAL_LIBS=3D"-lgen" ;; ---- configure.orig 1969-12-31 19:00:00.000000000 -0500 -+++ configure 2019-08-11 22:28:10.166763255 -0400 -@@ -16064,10 +16064,7 @@ - solaris2*) LOCAL_CFLAGS=3D-DSOLARIS ;; - lynxos*) LOCAL_CFLAGS=3D-DRECYCLES_PIDS ;; - linux*) LOCAL_LDFLAGS=3D-rdynamic # allow dynamic loading -- case "`uname -r`" in -- 2.[456789]*|[34]*) $as_echo "#define PGRP_PIPE 1" >>confdefs.h -- ;; -- esac ;; -+ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;; - *qnx6*) LOCAL_CFLAGS=3D"-Dqnx -Dqnx6" LOCAL_LIBS=3D"-lncurses" ;; - *qnx*) LOCAL_CFLAGS=3D"-Dqnx -F -3s" LOCAL_LDFLAGS=3D"-3s" LOCAL_LIBS=3D= "-lunix -lncurses" ;; - powerux*) LOCAL_LIBS=3D"-lgen" ;; diff --git a/gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.patch b= /gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.patch new file mode 100644 index 0000000000..8a03c4d982 --- /dev/null +++ b/gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.patch @@ -0,0 +1,34 @@ +Unconditionally enable PGRP_PIPE on Linux (the kernel), regardless of +the kernel version in use on the build machine. + +diff -purN bash-5.0-orig/configure bash-5.0/configure +--- configure 1970-01-01 01:00:00.000000000 +0100 ++++ configure 2019-09-29 11:51:42.664518665 +0200 +@@ -16312,11 +16312,7 @@ solaris2.10*) LOCAL_CFLAGS=3D-DSOLARIS ;; + solaris2*) LOCAL_CFLAGS=3D-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=3D-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=3D-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 1.*|2.[0123]*) : ;; +- *) $as_echo "#define PGRP_PIPE 1" >>confdefs.h +- ;; +- esac ;; ++ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;; + netbsd*|openbsd*) LOCAL_CFLAGS=3D"-DDEV_FD_STAT_BROKEN" ;; + *qnx[67]*) LOCAL_LIBS=3D"-lncurses" ;; + *qnx*) LOCAL_CFLAGS=3D"-Dqnx -F -3s" LOCAL_LDFLAGS=3D"-3s" LOCAL_LIBS=3D= "-lunix -lncurses" ;; +diff -purN bash-5.0-orig/configure.ac bash-5.0/configure.ac +--- configure.ac 1970-01-01 01:00:00.000000000 +0100 ++++ configure.ac 2019-09-29 11:51:10.692026225 +0200 +@@ -1108,10 +1108,7 @@ solaris2.10*) LOCAL_CFLAGS=3D-DSOLARIS ;; + solaris2*) LOCAL_CFLAGS=3D-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=3D-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=3D-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 1.*|2.[[0123]]*) : ;; +- *) AC_DEFINE(PGRP_PIPE) ;; +- esac ;; ++ AC_DEFINE(PGRP_PIPE) ;; + netbsd*|openbsd*) LOCAL_CFLAGS=3D"-DDEV_FD_STAT_BROKEN" ;; + *qnx[[67]]*) LOCAL_LIBS=3D"-lncurses" ;; + *qnx*) LOCAL_CFLAGS=3D"-Dqnx -F -3s" LOCAL_LDFLAGS=3D"-3s" LOCAL_LIBS=3D= "-lunix -lncurses" ;; --=20 2.23.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=--