[PATCH 00/18] Add support for powerpc64le-linux (wip-ppc64le-for-master)

  • Done
  • quality assurance status badge
Details
4 participants
  • Chris Marusich
  • Efraim Flashner
  • Léo Le Bouter
  • Christopher Baines
Owner
unassigned
Submitted by
Chris Marusich
Severity
normal
C
C
Chris Marusich wrote on 16 Mar 2021 07:28
(address . guix-patches@gnu.org)(name . Chris Marusich)(address . cmmarusich@gmail.com)
20210316062805.2890883-1-cmmarusich@gmail.com
This patch series comes from the wip-ppc64le-for-master branch. This
branch contains commits that add support for a new system type,
powerpc64le-linux. The powerpc64le-linux system can be run on
freedom-friendly hardware like the Talos II and Blackbird family of
POWER9 systems built by Raptor Computing Systems. These patches add
support for Guix only, not for Guix System; Guix System support will
come later.

These patches are specifically crafted so they do not rebuild the
world for existing architectures. Therefore, they can be applied
directly to master. I have verified that, after applying these
patches to master, I am able to build (on a Debian ppc64le GNU/Linux
system) a release binary of Guix for the powerpc64le-linux system
successfully. Additionally, I am able to install this release binary
and do "guix pull" successfully in a fresh Debian ppc64le GNU/Linux
VM, and I am able to build and run GNU Hello in that VM using the
newly pulled Guix.

I think these patches are ready to apply to master, and I hope they
will be included in the next release. Many thanks to Léo Le Bouter
and Efraim Flashner for their help in making these changes. Please
review and let me know if there is anything that can be done better.

Chris Marusich (11):
gnu: bootstrap: Add support for powerpc64le-linux.
utils: Add target-powerpc? procedure.
gnu: gcc-4.7: On powerpc64le, fix /lib64 references.
gnu: gcc-boot0: Enable 128-bit long double for POWER9.
gnu: binutils-final: Support more Power architectures.
Add powerpc64le-linux as a supported Guix architecture.
syscalls: Fix clone on powerpc64le-linux.
syscalls: Fix RNDADDTOENTCNT on powerpc64le-linux.
ci: %cross-targets: Add powerpc64le-linux-gnu.
utils: Fix target-64bit? on powerpc64le-linux.
gnu: sed: Make it build on SELinux-enabled kernels.

Efraim Flashner (1):
gnu: binutils-final: Provide bash for binary on powerpc-linux.

Leo Le Bouter (6):
gnu: glibc: Fix ldd path on powerpc*.
gnu: bdb-4.8: Fix configure on powerpc64le-linux.
gnu: guile-avahi: Fix compilation on powerpc64le-linux.
gnu: texlive-bin: Fix compilation on powerpc64le*.
gnu: texlive-latex-base: Fix compilation on powerpc64le*.
gnu: libelf: Fix compilation for powerpc64le-linux.

Makefile.am | 4 +-
etc/guix-install.sh | 4 ++
gnu/ci.scm | 1 +
gnu/local.mk | 1 +
gnu/packages/base.scm | 32 +++++++++++++++-
gnu/packages/bootstrap.scm | 39 +++++++++++++++++++-
gnu/packages/commencement.scm | 28 ++++++++++++--
gnu/packages/dbm.scm | 6 +++
gnu/packages/elf.scm | 5 +++
gnu/packages/gcc.scm | 38 +++++++++++++++----
gnu/packages/guile-xyz.scm | 4 ++
gnu/packages/patches/glibc-ldd-powerpc.patch | 10 +++++
gnu/packages/tex.scm | 26 ++++++++++---
guix/build/syscalls.scm | 8 +++-
guix/packages.scm | 4 +-
guix/utils.scm | 8 +++-
m4/guix.m4 | 3 +-
tests/guix-build.sh | 6 ++-
18 files changed, 201 insertions(+), 26 deletions(-)
create mode 100644 gnu/packages/patches/glibc-ldd-powerpc.patch

--
2.26.2
C
C
Chris Marusich wrote on 16 Mar 2021 07:44
[PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux.
(address . 47182@debbugs.gnu.org)(name . Chris Marusich)(address . cmmarusich@gmail.com)
20210316064511.2891553-1-cmmarusich@gmail.com
The bootstrap tarballs used by these bootstrap packages were created via the
following steps:

- Create a new x86_64 VM using QEMU.
- Use
to install Guix System 1.2.0 in the VM.
- Run: guix pull --no-substitutes --commit=662e7e28d576ada91fc9dec7d27c100666114f03
- Run: guix build --no-substitutes --target=powerpc64le-linux-gnu bootstrap-tarballs

With the exception of gcc-static, all bootstrap binaries contained in these
tarballs can be built reproducibly. Unfortunately, gcc-static is not always
reproducible when everything is built from source on separate machines.
Despite investigation efforts, the cause remains unclear, so we have decided
to move forward with these binaries to unblock further bootstrapping work.
For details, see https://bugs.gnu.org/41669.

* gnu/packages/bootstrap.scm (%bootstrap-executables)
(bootstrap-executable-file-name, bootstrap-guile-url-path)
(bootstrap-guile-hash, %bootstrap-coreutils&co, %bootstrap-binutils)
(%bootstrap-glibc, %bootstrap-gcc): Add entries for powerpc64le-linux.
(%bootstrap-executable-base-urls): Add an entry for alpha.gnu.org.
---
gnu/packages/bootstrap.scm | 39 +++++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)

Toggle diff (138 lines)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index c39e60ec8bc..c598cedc0ae 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -5,6 +5,8 @@
;;; Copyright © 2018, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2019 Carl Dong <contact@carldong.me>
;;; Copyright © 2019 Léo Le Bouter <lle-bout@zaclys.net>
+;;; Copyright © 2020 Jakub K?dzio?ka <kuba@kadziolka.net>
+;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -122,16 +124,27 @@
("tar"
,(base32 "06gmqdjq3rl8lr47b9fyx4ifnm5x56ymc8lyryp1ax1j2s4y5jb4"))
("xz"
- ,(base32 "09j1d69qr0hhhx4k4ih8wp00dfc9y4rp01hfg3vc15yxd0jxabh5")))))
+ ,(base32 "09j1d69qr0hhhx4k4ih8wp00dfc9y4rp01hfg3vc15yxd0jxabh5")))
+ ("powerpc64le-linux"
+ ("bash"
+ ,(base32 "1kiw7n6mkdy2x9in97646nb7aiayxr090ws1hbrlazah3fjqi6nj"))
+ ("mkdir"
+ ,(base32 "04dpvi231zcl40ig048vqqnyvmnkw1byrm1q1qqvs1f0g16yhrrk"))
+ ("tar"
+ ,(base32 "150c8948cz8r208g6qgn2dn4f4zs5kpgbpbg6bwag6yw42rapw2l"))
+ ("xz"
+ ,(base32 "0v5738idy9pqzcbrjdpxi5c6qs5m78zrpsydmrpx5cfcfzbkxzjh")))))
(define %bootstrap-executable-base-urls
;; This is where the bootstrap executables come from.
'("https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/bootstrap/"
+ "https://alpha.gnu.org/gnu/guix/bootstrap/"
"http://lilypond.org/janneke/guix/"))
(define (bootstrap-executable-file-name system program)
"Return the FILE-NAME part of url where PROGRAM can be found for SYSTEM."
(match system
+ ("powerpc64le-linux" (string-append system "/20210106/" program))
("i586-gnu" (string-append system "/20200326/" program))
(_ (string-append system "/" program
"?id=44f07d1dc6806e97c4e9ee3e6be883cc59dc666e"))))
@@ -332,6 +345,8 @@ or false to signal an error."
"/20150101/guile-2.0.11.tar.xz")
("i586-gnu"
"/20200326/guile-static-stripped-2.0.14-i586-pc-gnu.tar.xz")
+ ("powerpc64le-linux"
+ "/20210106/guile-static-stripped-2.0.14-powerpc64le-linux-gnu.tar.xz")
(_
"/20131110/guile-2.0.9.tar.xz"))))
@@ -346,6 +361,8 @@ or false to signal an error."
(base32 "0fzp93lvi0hn54acc0fpvhc7bvl0yc853k62l958cihk03q80ilr"))
("armhf-linux"
(base32 "1mi3brl7l58aww34rawhvja84xc7l1b4hmwdmc36fp9q9mfx0lg5"))
+ ("powerpc64le-linux"
+ (base32 "1rnyfz5q38jyvxddj617443bnnzql4vw0mxzqpj8wz48wx4bhbq0"))
("aarch64-linux"
(base32 "1giy2aprjmn5fp9c4s9r125fljw4wv6ixy5739i5bffw4jgr0f9r"))
("i586-gnu"
@@ -479,6 +496,8 @@ $out/bin/guile --version~%"
"/20150101/static-binaries.tar.xz")
("aarch64-linux"
"/20170217/static-binaries.tar.xz")
+ ("powerpc64le-linux"
+ "/20210106/static-binaries-0-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/static-binaries-0-i586-pc-gnu.tar.xz")
(_
@@ -498,6 +517,9 @@ $out/bin/guile --version~%"
("aarch64-linux"
(base32
"18dfiq6c6xhsdpbidigw6480wh0vdgsxqq3xindq4lpdgqlccpfh"))
+ ("powerpc64le-linux"
+ (base32
+ "0afs2j9z2d1hjq42myz4iwjh0aqgzf59inifw87x6b6p1z9wv92v"))
("i586-gnu"
(base32
"17kllqnf3fg79gzy9ansgi801c46yh9c23h4d923plvb0nfm1cfn"))
@@ -547,6 +569,8 @@ $out/bin/guile --version~%"
"/20150101/binutils-2.25.tar.xz")
("aarch64-linux"
"/20170217/binutils-2.27.tar.xz")
+ ("powerpc64le-linux"
+ "/20210106/binutils-static-stripped-2.34-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/binutils-static-stripped-2.34-i586-pc-gnu.tar.xz")
(_
@@ -566,6 +590,9 @@ $out/bin/guile --version~%"
("aarch64-linux"
(base32
"111s7ilfiby033rczc71797xrmaa3qlv179wdvsaq132pd51xv3n"))
+ ("powerpc64le-linux"
+ (base32
+ "1klxy945c61134mzhqzz2gbk8w0n8jq7arwkrvz78d22ff2q0cwz"))
("i586-gnu"
(base32
"11kykv1kmqc5wln57rs4klaqa13hm952smkc57qcsyss21kfjprs"))
@@ -622,6 +649,8 @@ $out/bin/guile --version~%"
"/20150101/glibc-2.20.tar.xz")
("aarch64-linux"
"/20170217/glibc-2.25.tar.xz")
+ ("powerpc64le-linux"
+ "/20210106/glibc-stripped-2.31-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/glibc-stripped-2.31-i586-pc-gnu.tar.xz")
(_
@@ -641,6 +670,9 @@ $out/bin/guile --version~%"
("aarch64-linux"
(base32
"07nx3x8598i2924rjnlrncg6rm61c9bmcczbbcpbx0fb742nvv5c"))
+ ("powerpc64le-linux"
+ (base32
+ "1a1df6z8gkaq09md3jy94lixnh20599p58p0s856p10xwjaqr1iz"))
("i586-gnu"
(base32
"14ddm10lpbas8bankmn5bcrlqvz1v5dnn1qjzxb19r57vd2w5952"))
@@ -713,6 +745,8 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
"/20150101/gcc-4.8.4.tar.xz")
("aarch64-linux"
"/20170217/gcc-5.4.0.tar.xz")
+ ("powerpc64le-linux"
+ "/20210106/gcc-stripped-5.5.0-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/gcc-stripped-5.5.0-i586-pc-gnu.tar.xz")
(_
@@ -732,6 +766,9 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
("aarch64-linux"
(base32
"1ar3vdzyqbfm0z36kmvazvfswxhcihlacl2dzdjgiq25cqnq9ih1"))
+ ("powerpc64le-linux"
+ (base32
+ "151kjsai25vz2s667bgzpisx8f281fpl3n9pxz2yrp9jlnadz3m1"))
("i586-gnu"
(base32
"1j2zc58wzil71a34h7c70sd68dmqvcscrw3rmn2whq79vd70zvv5"))
--
2.26.2
C
C
Chris Marusich wrote on 16 Mar 2021 07:44
[PATCH 02/18] utils: Add target-powerpc? procedure.
(address . 47182@debbugs.gnu.org)(name . Chris Marusich)(address . cmmarusich@gmail.com)
20210316064511.2891553-2-cmmarusich@gmail.com
* guix/utils.scm (target-powerpc?): New exported procedure.
---
guix/utils.scm | 6 ++++++
1 file changed, 6 insertions(+)

Toggle diff (33 lines)
diff --git a/guix/utils.scm b/guix/utils.scm
index 21e3460b2c7..fc57620319e 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2018, 2020 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -79,6 +80,7 @@
target-arm32?
target-aarch64?
target-arm?
+ target-powerpc?
target-64bit?
cc-for-target
cxx-for-target
@@ -541,6 +543,10 @@ a character other than '@'."
(%current-system))))
(or (target-arm32? target) (target-aarch64? target)))
+(define* (target-powerpc? #:optional (target (or (%current-target-system)
+ (%current-system))))
+ (string-prefix? "powerpc" target))
+
(define* (target-64bit? #:optional (system (or (%current-target-system)
(%current-system))))
(any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "ppc64")))
--
2.26.2
C
C
Chris Marusich wrote on 16 Mar 2021 07:44
[PATCH 03/18] gnu: gcc-4.7: On powerpc64le, fix /lib64 references.
(address . 47182@debbugs.gnu.org)(name . Chris Marusich)(address . cmmarusich@gmail.com)
20210316064511.2891553-3-cmmarusich@gmail.com

* gnu/packages/gcc.scm (gcc-4.7)[#:phases][pre-configure]: When the
gcc/config/rs6000 directory exists, replace "/lib64" with "/lib" in all files
within it. Note that this fix will be picked up by any package that re-uses
the pre-configure phase from gcc-4.7 (e.g., all the usual gcc packages).
(make-libstdc++)[#:phases][fix-rs6000-libdir]: New phase, which does the same
as above. It was necessary to duplicate the fix here because make-libstdc++
does not re-use the pre-configure phase from gcc-4.7.
---
gnu/packages/gcc.scm | 38 +++++++++++++++++++++++++++++++-------
1 file changed, 31 insertions(+), 7 deletions(-)

Toggle diff (71 lines)
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 4d5aaa70701..3ea8695cf18 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -3,13 +3,14 @@
;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014, 2015, 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2015, 2016, 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -273,6 +274,14 @@ where the OS part is overloaded to denote a specific ABI---into GCC
~a"
libc line))))
+ ;; TODO: Make this unconditional in core-updates.
+ ,@(if (target-powerpc?)
+ `((when (file-exists? "gcc/config/rs6000")
+ ;; Force powerpc libdir to be /lib and not /lib64
+ (substitute* (find-files "gcc/config/rs6000")
+ (("/lib64") "/lib"))))
+ `())
+
;; Don't retain a dependency on the build-time sed.
(substitute* "fixincludes/fixincl.x"
(("static char const sed_cmd_z\\[\\] =.*;")
@@ -598,12 +607,27 @@ using compilers other than GCC."
(name "libstdc++")
(arguments
`(#:out-of-source? #t
- #:phases (alist-cons-before
- 'configure 'chdir
- (lambda _
- (chdir "libstdc++-v3")
- #t)
- %standard-phases)
+ #:phases
+ ;; TODO: Use the target-powerpc arm for everyone.
+ ,(if (target-powerpc?)
+ `(modify-phases %standard-phases
+ ;; Force rs6000 (i.e., powerpc) libdir to be /lib and not /lib64.
+ (add-before 'chdir 'fix-rs6000-libdir
+ (lambda _
+ (when (file-exists? "gcc/config/rs6000")
+ (substitute* (find-files "gcc/config/rs6000")
+ (("/lib64") "/lib")))
+ #t))
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "libstdc++-v3")
+ #t)))
+ `(alist-cons-before 'configure 'chdir
+ (lambda _
+ (chdir "libstdc++-v3")
+ #t)
+ %standard-phases))
+
#:configure-flags `("--disable-libstdcxx-pch"
,(string-append "--with-gxx-include-dir="
(assoc-ref %outputs "out")
--
2.26.2
C
C
Chris Marusich wrote on 16 Mar 2021 07:44
[PATCH 05/18] gnu: gcc-boot0: Enable 128-bit long double for POWER9.
(address . 47182@debbugs.gnu.org)(name . Chris Marusich)(address . cmmarusich@gmail.com)
20210316064511.2891553-5-cmmarusich@gmail.com
* gnu/packages/commencement.scm (gcc-boot0) [#:configure-flags]: Add
--with-long-double-128 when the boot triplet is "powerpc64le-guix-linux-gnu",
instead of "powerpc64le-linux-gnu", which is incorrect. The actual triplet
used during bootstrapping is "powerpc64le-guix-linux-gnu".
---
gnu/packages/commencement.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 93b0c508822..86bc7a602da 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Timothy Sample <samplet@ngyro.com>
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
+;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2818,7 +2819,8 @@ exec " gcc "/bin/" program
"--disable-shared"
"--enable-languages=c,c++"
- ,@(if (equal? "powerpc64le-linux-gnu" (boot-triplet))
+ ;; boot-triplet inserts "guix" in the triplet.
+ ,@(if (equal? "powerpc64le-guix-linux-gnu" (boot-triplet))
;; On POWER9 (little endian) glibc needs the
;; 128-bit long double type.
'("--with-long-double-128")
--
2.26.2
C
C
Chris Marusich wrote on 16 Mar 2021 07:45
[PATCH 07/18] gnu: binutils-final: Support more Power architectures.
(address . 47182@debbugs.gnu.org)(name . Chris Marusich)(address . cmmarusich@gmail.com)
20210316064511.2891553-7-cmmarusich@gmail.com
* gnu/packages/commencement.scm (binutils-final)[arguments]: When checking if
the system is a Power architecture, instead of hard-coding "powerpc-linux",
use the target-powerpc? procedure so it works on more Power architectures.
[inputs]: Likewise.
---
gnu/packages/commencement.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index c0732bbf62d..d4511ed9148 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3516,14 +3516,14 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
#:implicit-inputs? #f
#:allowed-references
,@(match (%current-system)
- ("powerpc-linux"
+ ((? target-powerpc?)
`(("out" ,glibc-final ,static-bash-for-glibc)))
(_
`(("out" ,glibc-final))))
,@(package-arguments binutils)))
(inputs
(match (%current-system)
- ("powerpc-linux"
+ ((? target-powerpc?)
`(("bash" ,static-bash-for-glibc)
,@(%boot2-inputs)))
(_ (%boot2-inputs))))))
--
2.26.2
C
C
Chris Marusich wrote on 16 Mar 2021 07:44
[PATCH 06/18] gnu: binutils-final: Provide bash for binary on powerpc-linux.
(address . 47182@debbugs.gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
20210316064511.2891553-6-cmmarusich@gmail.com
From: Efraim Flashner <efraim@flashner.co.il>

* gnu/packages/commencement.scm (binutils-final)[arguments]: On
powerpc-linux allow a reference to static-bash-for-glibc.
[inputs]: On powerpc-linux add static-bash-for-glibc.
---
gnu/packages/commencement.scm | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 86bc7a602da..c0732bbf62d 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3514,9 +3514,19 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(arguments
`(#:guile ,%bootstrap-guile
#:implicit-inputs? #f
- #:allowed-references ("out" ,glibc-final)
+ #:allowed-references
+ ,@(match (%current-system)
+ ("powerpc-linux"
+ `(("out" ,glibc-final ,static-bash-for-glibc)))
+ (_
+ `(("out" ,glibc-final))))
,@(package-arguments binutils)))
- (inputs (%boot2-inputs))))
+ (inputs
+ (match (%current-system)
+ ("powerpc-linux"
+ `(("bash" ,static-bash-for-glibc)
+ ,@(%boot2-inputs)))
+ (_ (%boot2-inputs))))))
(define libstdc++
;; Intermediate libstdc++ that will allow us to build the final GCC
--
2.26.2
C
C
Chris Marusich wrote on 16 Mar 2021 07:45
[PATCH 08/18] gnu: bdb-4.8: Fix configure on powerpc64le-linux.
(address . 47182@debbugs.gnu.org)
20210316064511.2891553-8-cmmarusich@gmail.com
From: Leo Le Bouter <lle-bout@zaclys.net>

* gnu/packages/dbm.scm (bdb-4.8)[arguments]: Modify 'configure phase to append
"--build=powerpc64le-unknown-linux-gnu" to configure's flags when compiling for
powerpc64le-linux.

Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
---
gnu/packages/dbm.scm | 6 ++++++
1 file changed, 6 insertions(+)

Toggle diff (26 lines)
diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm
index 82647c0c283..2dd51efb8c9 100644
--- a/gnu/packages/dbm.scm
+++ b/gnu/packages/dbm.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2016, 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -74,6 +75,11 @@
'("--build=aarch64-unknown-linux-gnu")
'())
+ ;; Bdb doesn't recognize powerpc64le as an architecture.
+ ,@(if (string=? "powerpc64le-linux" (%current-system))
+ '("--build=powerpc64le-unknown-linux-gnu")
+ '())
+
,@(if (%current-target-system) ; cross building
'((string-append "--host=" target))
'())
--
2.26.2
C
C
Chris Marusich wrote on 16 Mar 2021 07:44
[PATCH 04/18] gnu: glibc: Fix ldd path on powerpc*.
(address . 47182@debbugs.gnu.org)
20210316064511.2891553-4-cmmarusich@gmail.com
From: Leo Le Bouter <lle-bout@zaclys.net>

This should avoid some problems, such as "not a dynamic executable" errors.

* gnu/packages/patches/glibc-ldd-powerpc.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/base.scm: (glibc)[native-inputs]: Add it.
[arguments]: When building for powerpc* apply it.
* gnu/packages/commencement.scm (glibc-final-with-bootstrap-bash,
glibc-final)[native-inputs]: Add patch conditionally.

This patch has been adjusted to apply to master.

Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
---
gnu/local.mk | 1 +
gnu/packages/base.scm | 16 +++++++++++++++-
gnu/packages/commencement.scm | 10 +++++++++-
gnu/packages/patches/glibc-ldd-powerpc.patch | 10 ++++++++++
4 files changed, 35 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/glibc-ldd-powerpc.patch

Toggle diff (106 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index cf8849cf598..4bd333e56f2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1120,6 +1120,7 @@ dist_patch_DATA = \
%D%/packages/patches/glibc-hurd-mach-print.patch \
%D%/packages/patches/glibc-hurd-magic-pid.patch \
%D%/packages/patches/glibc-hurd-signal-sa-siginfo.patch \
+ %D%/packages/patches/glibc-ldd-powerpc.patch \
%D%/packages/patches/glibc-ldd-x86_64.patch \
%D%/packages/patches/glibc-locales.patch \
%D%/packages/patches/glibc-locales-2.28.patch \
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 9aa69cfe773..7c5ac61f01c 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
-;;; Copyright © 2016, 2017, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016, 2018 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
@@ -15,6 +15,8 @@
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>
+;;; Copyright © 2020 Chris Marusich <cmmarusich@gmail.com>
+;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -890,6 +892,14 @@ the store.")
files)))
#t)))
+ ,@(if (target-powerpc?)
+ '((add-after 'unpack 'apply-patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((patch (assoc-ref inputs
+ "powerpc64le-patch")))
+ (invoke "patch" "--force" "-p1"
+ "-i" patch)))))
+ '())
,@(if (hurd-target?)
'((add-after 'install 'augment-libc.so
(lambda* (#:key outputs #:allow-other-keys)
@@ -911,6 +921,10 @@ the store.")
("gettext" ,gettext-minimal)
("python" ,python-minimal)
+ ,@(if (target-powerpc?)
+ `(("powerpc64le-patch" ,@(search-patches
+ "glibc-ldd-powerpc.patch")))
+ '())
,@(if (hurd-target?)
`(("mig" ,mig)
("perl" ,perl))
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 432910d7a30..93b0c508822 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3313,7 +3313,11 @@ memoized as a function of '%current-system'."
`(("bison" ,bison-boot0)
("texinfo" ,texinfo-boot0)
("perl" ,perl-boot0)
- ("python" ,python-boot0)))
+ ("python" ,python-boot0)
+ ,@(if (target-powerpc?)
+ `(("powerpc64le-patch" ,@(search-patches
+ "glibc-ldd-powerpc.patch")))
+ '())))
(inputs
`( ;; The boot inputs. That includes the bootstrap libc. We don't want
;; it in $CPATH, hence the 'pre-configure' phase above.
@@ -3464,6 +3468,10 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
;; This time we need 'msgfmt' to install all the libc.mo files.
(native-inputs `(,@(package-native-inputs glibc-final-with-bootstrap-bash)
+ ,@(if (target-powerpc?)
+ `(("powerpc64le-patch" ,@(search-patches
+ "glibc-ldd-powerpc.patch")))
+ '())
("gettext" ,gettext-boot0)))
(propagated-inputs
diff --git a/gnu/packages/patches/glibc-ldd-powerpc.patch b/gnu/packages/patches/glibc-ldd-powerpc.patch
new file mode 100644
index 00000000000..8e899ee99b8
--- /dev/null
+++ b/gnu/packages/patches/glibc-ldd-powerpc.patch
@@ -0,0 +1,10 @@
+diff -r -U3 a/sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed b/sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed
+--- a/sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed 1970-01-01 01:00:00.000000000 +0100
++++ b/sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed 2020-02-29 00:15:41.080000000 +0100
+@@ -11,5 +11,5 @@
+ # this works for /lib64/ld64.so.x and /lib/ld.so.x as input
+ s_lib64_lib_
+ s_64\.so_\.so_
+-s_^RTLDLIST=\(.*lib\)\(/[^/]*\)\(\.so\.[0-9.]*\)[[:blank:]]*$_RTLDLIST="\1\2\3 \164\264\3"_
++s_^RTLDLIST=\(.*lib\)\(/[^/]*\)\(\.so\.[0-9.]*\)[[:blank:]]*$_RTLDLIST="\1\2\3 \1\264\3"_
+
--
2.26.2
C
C
Chris Marusich wrote on 16 Mar 2021 07:45
[PATCH 09/18] gnu: guile-avahi: Fix compilation on powerpc64le-linux.
(address . 47182@debbugs.gnu.org)
20210316064511.2891553-9-cmmarusich@gmail.com
From: Leo Le Bouter <lle-bout@zaclys.net>

* gnu/packages/guile-xyz.scm (guile-avahi)[arguments]: Parallel builds fail on
powerpc64le-linux. Set "#:parallel-build?" to "#f".

Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
---
gnu/packages/guile-xyz.scm | 4 ++++
1 file changed, 4 insertions(+)

Toggle diff (24 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 2e02f6f4821..449c36e08f0 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -35,6 +35,7 @@
;;; Copyright © 2020, 2021 pukkamustard <pukkamustard@posteo.net>
;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -4284,6 +4285,9 @@ errors.")
,@%gnu-build-system-modules)
#:make-flags
'("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings
+ ;; Parallel builds fail on powerpc64le-linux.
+ ;; See https://lists.nongnu.org/archive/html/guile-avahi-bugs/2021-01/msg00000.html
+ #:parallel-build? #f
#:phases
(modify-phases %standard-phases
(add-before 'check 'fix-guile-avahi-file-name
--
2.26.2
C
C
Chris Marusich wrote on 16 Mar 2021 07:45
[PATCH 10/18] gnu: texlive-bin: Fix compilation on powerpc64le*.
(address . 47182@debbugs.gnu.org)
20210316064511.2891553-10-cmmarusich@gmail.com
From: Leo Le Bouter <lle-bout@zaclys.net>

* gnu/packages/tex.scm (texlive-bin)[arguments]: Append "--disable-luajittex"
and "--disable-mfluajit" to keyword argument "#:configure-flags" on
powerpc64le* because LuaJIT is not ported to powerpc64le* yet. Also set
"#:tests?" to "#f" on powerpc64le*.

Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
---
gnu/packages/tex.scm | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)

Toggle diff (43 lines)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index c0f4ff0fcdc..508537acdaf 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2020, 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -342,14 +343,23 @@ files from LOCATIONS with expected checksum HASH. CODE is not currently in use.
"--with-system-teckit"
"--with-system-xpdf"
"--with-system-zlib"
- "--with-system-zziplib")
-
- ;; Disable tests on mips64/aarch64 to cope with a failure of luajiterr.test.
- ;; XXX FIXME fix luajit properly on mips64 and aarch64.
+ "--with-system-zziplib"
+ ;; LuaJIT is not ported to powerpc64le* yet.
+ ,@(if (string-prefix? "powerpc64le" (or (%current-target-system)
+ (%current-system)))
+ '("--disable-luajittex"
+ "--disable-mfluajit")
+ '()))
+
+ ;; Disable tests on some architectures to cope with a failure of
+ ;; luajiterr.test.
+ ;; XXX FIXME fix luajit properly on these architectures.
#:tests? ,(let ((s (or (%current-target-system)
(%current-system))))
(not (or (string-prefix? "aarch64" s)
- (string-prefix? "mips64" s))))
+ (string-prefix? "mips64" s)
+ (string-prefix? "powerpc64le" s))))
+
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'configure-ghostscript-executable
--
2.26.2
C
C
Chris Marusich wrote on 16 Mar 2021 07:45
[PATCH 12/18] gnu: libelf: Fix compilation for powerpc64le-linux.
(address . 47182@debbugs.gnu.org)
20210316064511.2891553-12-cmmarusich@gmail.com
From: Leo Le Bouter <lle-bout@zaclys.net>

* gnu/packages/elf.scm (libelf)[arguments]: Modify replacement 'configure phase
to invoke "./configure" with "--host=powerpc64le-unknown-linux-gnu" on
powerpc64le-linux.

Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
---
gnu/packages/elf.scm | 5 +++++
1 file changed, 5 insertions(+)

Toggle diff (25 lines)
diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm
index 2e21cab48d1..aab912648b2 100644
--- a/gnu/packages/elf.scm
+++ b/gnu/packages/elf.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Mark Wielaard <mark@klomp.org>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -211,6 +212,10 @@ static analysis of the ELF binaries at hand.")
(setenv "CONFIG_SHELL" (which "bash"))
(invoke "./configure"
(string-append "--prefix=" out)
+ ,@(if (string=? "powerpc64le-linux"
+ (%current-system))
+ '("--host=powerpc64le-unknown-linux-gnu")
+ '())
,@(if (string=? "aarch64-linux"
(%current-system))
'("--host=aarch64-unknown-linux-gnu")
--
2.26.2
C
C
Chris Marusich wrote on 16 Mar 2021 07:45
[PATCH 11/18] gnu: texlive-latex-base: Fix compilation on powerpc64le*.
(address . 47182@debbugs.gnu.org)
20210316064511.2891553-11-cmmarusich@gmail.com
From: Leo Le Bouter <lle-bout@zaclys.net>

* gnu/packages/tex.scm (texlive-latex-base)[arguments]: LuaJIT is not ported to
powerpc64le* yet. Update replacement 'build phase to add "luajittex" within the
"disabled-formats" list on powerpc64le*.

Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
---
gnu/packages/tex.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 508537acdaf..86cb1ee4558 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
-;;; Copyright © 2016, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
@@ -2520,6 +2520,10 @@ formats.")
"eptex eptex" "ptex ptex" "pdfxmltex pdftex" "platex eptex"
"csplain pdftex" "mf mf-nowin" "mex pdftex" "pdfmex pdftex"
"luacsplain luatex"
+ ,@(if (string-prefix? "powerpc64le"
+ (or (%current-target-system)
+ (%current-system)))
+ '("luajittex") '())
"cont-en xetex" "cont-en pdftex" "pdfcsplain xetex"
"pdfcsplain pdftex" "pdfcsplain luatex" "cslatex pdftex"
"mptopdf pdftex" "uplatex euptex" "jadetex pdftex"
--
2.26.2
C
C
Chris Marusich wrote on 16 Mar 2021 07:45
[PATCH 13/18] Add powerpc64le-linux as a supported Guix architecture.
(address . 47182@debbugs.gnu.org)(name . Chris Marusich)(address . cmmarusich@gmail.com)
20210316064511.2891553-13-cmmarusich@gmail.com
This makes powerpc64le-linux a supported architecture for Guix, but not for
Guix System.

* Makefile.am (SUPPORTED_SYSTEMS): Add an entry for powerpc64le-linux.
* etc/guix-install.sh (chk_sys_arch): Same.
* guix/packages.scm (%supported-systems): Same.
* m4/guix.m4 (GUIX_ASSERT_SUPPORTED_SYSTEM): Same.
* tests/guix-build.sh (all_systems): Same.
---
Makefile.am | 4 +++-
etc/guix-install.sh | 4 ++++
guix/packages.scm | 4 +++-
m4/guix.m4 | 3 ++-
tests/guix-build.sh | 6 ++++--
5 files changed, 16 insertions(+), 5 deletions(-)

Toggle diff (113 lines)
diff --git a/Makefile.am b/Makefile.am
index f40d9509bee..1c2d45527c7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,6 +14,7 @@
# Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
# Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
# Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
+# Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
#
# This file is part of GNU Guix.
#
@@ -799,7 +800,8 @@ SOURCE_TARBALLS = \
$(foreach ext,tar.gz,$(PACKAGE_FULL_TARNAME).$(ext))
# Systems supported by Guix.
-SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux armhf-linux aarch64-linux
+SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux armhf-linux aarch64-linux \
+ powerpc64le-linux
# Guix binary tarballs.
BINARY_TARBALLS = \
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 94c04aa646a..c84e7b75779 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -8,6 +8,7 @@
# Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
# Copyright © 2020 Daniel Brooks <db48x@db48x.net>
# Copyright © 2021 Jakub K?dzio?ka <kuba@kadziolka.net>
+# Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
#
# This file is part of GNU Guix.
#
@@ -187,6 +188,9 @@ chk_sys_arch()
armv7l)
local arch=armhf
;;
+ ppc64le | powerpc64le)
+ local arch=powerpc64le
+ ;;
*)
_err "${ERR}Unsupported CPU type: ${arch}"
exit 1
diff --git a/guix/packages.scm b/guix/packages.scm
index a057a88c638..55e5e70b8c6 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
;;; Copyright © 2017, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -345,7 +346,8 @@ name of its URI."
(define %supported-systems
;; This is the list of system types that are supported. By default, we
;; expect all packages to build successfully here.
- '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "mips64el-linux" "i586-gnu"))
+ '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "mips64el-linux" "i586-gnu"
+ "powerpc64le-linux"))
(define %hurd-systems
;; The GNU/Hurd systems for which support is being developed.
diff --git a/m4/guix.m4 b/m4/guix.m4
index c1ce0876fa0..f0d85a28d6d 100644
--- a/m4/guix.m4
+++ b/m4/guix.m4
@@ -2,6 +2,7 @@ dnl GNU Guix --- Functional package management for GNU
dnl Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
dnl Copyright © 2014 Mark H Weaver <mhw@netris.org>
dnl Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+dnl Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
dnl
dnl This file is part of GNU Guix.
dnl
@@ -88,7 +89,7 @@ courageous and port the GNU System distribution to it (see
# Currently only Linux-based systems are supported, and only on some
# platforms.
case "$guix_system" in
- x86_64-linux|i686-linux|armhf-linux|aarch64-linux)
+ x86_64-linux|i686-linux|armhf-linux|aarch64-linux|powerpc64le-linux)
;;
*)
if test "x$guix_courageous" = "xyes"; then
diff --git a/tests/guix-build.sh b/tests/guix-build.sh
index b7602e668c4..e20702c521b 100644
--- a/tests/guix-build.sh
+++ b/tests/guix-build.sh
@@ -1,6 +1,7 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2012, 2013, 2014, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+# Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
#
# This file is part of GNU Guix.
#
@@ -61,8 +62,9 @@ guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)'
test `guix build sed -s x86_64-linux -d | wc -l` = 1
# Passing multiple '-s' flags.
-all_systems="-s x86_64-linux -s i686-linux -s armhf-linux -s aarch64-linux"
-test `guix build sed $all_systems -d | sort -u | wc -l` = 4
+all_systems="-s x86_64-linux -s i686-linux -s armhf-linux -s aarch64-linux \
+-s powerpc64le-linux"
+test `guix build sed $all_systems -d | sort -u | wc -l` = 5
# Check there's no weird memoization effect leading to erroneous results.
# See <https://bugs.gnu.org/40482>.
--
2.26.2
C
C
Chris Marusich wrote on 16 Mar 2021 07:45
[PATCH 14/18] syscalls: Fix clone on powerpc64le-linux.
(address . 47182@debbugs.gnu.org)(name . Chris Marusich)(address . cmmarusich@gmail.com)
20210316064511.2891553-14-cmmarusich@gmail.com
This makes the clone procedure work correctly and fixes some test failures on
powerpc64le-linux, including tests/containers.scm.

* guix/build/syscalls.scm (clone): Add an entry for ppc64le.
---
guix/build/syscalls.scm | 1 +
1 file changed, 1 insertion(+)

Toggle diff (14 lines)
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index 4379768f5e3..a2c1d80fb1a 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -1021,6 +1021,7 @@ Turning finalization off shuts down the finalization thread as a side effect."
("mips64" 5055)
("armv7l" 120)
("aarch64" 220)
+ ("ppc64le" 120)
(_ #f))))
(lambda (flags)
"Create a new child process by duplicating the current parent process.
--
2.26.2
C
C
Chris Marusich wrote on 16 Mar 2021 07:45
[PATCH 15/18] syscalls: Fix RNDADDTOENTCNT on powerpc64le-linux.
(address . 47182@debbugs.gnu.org)(name . Chris Marusich)(address . cmmarusich@gmail.com)
20210316064511.2891553-15-cmmarusich@gmail.com
This fixes the failing test add-to-entropy-count in tests/syscalls.scm on
powerpc64le-linux.

* guix/build/syscalls.scm (RNDADDTOENTCNT): When %host-type starts with
"powerpc64le", set this to #x80045201. Otherwise, set it to #x40045201 as
before.
---
guix/build/syscalls.scm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

Toggle diff (27 lines)
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index a2c1d80fb1a..8886fc0fb94 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -942,7 +943,11 @@ backend device."
;;;
;; From <uapi/linux/random.h>.
-(define RNDADDTOENTCNT #x40045201)
+(define RNDADDTOENTCNT
+ ;; Avoid using %current-system here to avoid depending on host-side code.
+ (if (string-prefix? "powerpc64le" %host-type)
+ #x80045201
+ #x40045201))
(define (add-to-entropy-count port-or-fd n)
"Add N to the kernel's entropy count (the value that can be read from
--
2.26.2
C
C
Chris Marusich wrote on 16 Mar 2021 07:45
[PATCH 16/18] ci: %cross-targets: Add powerpc64le-linux-gnu.
(address . 47182@debbugs.gnu.org)(name . Chris Marusich)(address . cmmarusich@gmail.com)
20210316064511.2891553-16-cmmarusich@gmail.com
* gnu/ci.scm (%cross-targets): Add an entry for powerpc64le-linux-gnu.
---
gnu/ci.scm | 1 +
1 file changed, 1 insertion(+)

Toggle diff (14 lines)
diff --git a/gnu/ci.scm b/gnu/ci.scm
index acd05a18b47..eb07e69a179 100644
--- a/gnu/ci.scm
+++ b/gnu/ci.scm
@@ -156,6 +156,7 @@ SYSTEM."
"arm-linux-gnueabihf"
"aarch64-linux-gnu"
"powerpc-linux-gnu"
+ "powerpc64le-linux-gnu"
"riscv64-linux-gnu"
"i586-pc-gnu" ;aka. GNU/Hurd
"i686-w64-mingw32"
--
2.26.2
C
C
Chris Marusich wrote on 16 Mar 2021 07:45
[PATCH 17/18] utils: Fix target-64bit? on powerpc64le-linux.
(address . 47182@debbugs.gnu.org)(name . Chris Marusich)(address . cmmarusich@gmail.com)
20210316064511.2891553-17-cmmarusich@gmail.com
* guix/utils.scm (target-64bit?): Change the string from "ppc64" to
"powerpc64", which matches Guix system names like "powerpc64le-linux".
---
guix/utils.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/guix/utils.scm b/guix/utils.scm
index fc57620319e..2dd1ddeb8a7 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -549,7 +549,7 @@ a character other than '@'."
(define* (target-64bit? #:optional (system (or (%current-target-system)
(%current-system))))
- (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "ppc64")))
+ (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "powerpc64")))
(define* (cc-for-target #:optional (target (%current-target-system)))
(if target
--
2.26.2
C
C
Chris Marusich wrote on 16 Mar 2021 07:45
[PATCH 18/18] gnu: sed: Make it build on SELinux-enabled kernels.
(address . 47182@debbugs.gnu.org)(name . Chris Marusich)(address . cmmarusich@gmail.com)
20210316064511.2891553-18-cmmarusich@gmail.com

* gnu/packages/base.scm (sed)[arguments]: New field. This adds a
snippet, equivalent to the patch submitted upstream, which fixes an
issue that prevents sed from building on SELinux-enabled kernels.

Adjusted by Efraim Flashner to apply to master.
---
gnu/packages/base.scm | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

Toggle diff (29 lines)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 7c5ac61f01c..f0f93533986 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -148,6 +148,22 @@ including, for example, recursive directory searching.")
(base32
"0alqagh0nliymz23kfjg6g9w3cr086k0sfni56gi8fhzqwa3xksk"))))
(build-system gnu-build-system)
+ (arguments
+ ;; TODO: When merging this into core-updates, keep the version of
+ ;; this code (with comment!) applied as a snippet.
+ `(,@(if (string-prefix? "powerpc64le" (or (%current-target-system)
+ (%current-system)))
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'allow-building-on-selinux-systems
+ (lambda _
+ (substitute* "Makefile.in"
+ (("^ abs_srcdir='\\$\\(abs_srcdir\\)'.*" previous-line)
+ (string-append
+ previous-line
+ " CONFIG_HEADER='$(CONFIG_HEADER)'\t\t\\\n")))
+ #t))))
+ '())))
(synopsis "Stream editor")
(native-inputs
`(("perl" ,perl))) ;for tests
--
2.26.2
E
E
Efraim Flashner wrote on 16 Mar 2021 08:45
Re: [PATCH 04/18] gnu: glibc: Fix ldd path on powerpc*.
(name . Chris Marusich)(address . cmmarusich@gmail.com)
YFBiFo6TuspU1YpJ@3900XT
I would like to note that I also tested this patch on powerpc-linux and
with it I was able to use glibc versions later than 2.30. So
'target-powerpc?' is correct, its not just powerpc64le.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmBQYhYACgkQQarn3Mo9
g1GEmhAAmooag/XErQLcINbFVhEKyU+ZxFtSMHum0SiTiOsyRxxv5ytYXI1C2/Uu
q2JxwA9920LjYsbcTSj5shuD3gLhzmQr96ph5R1IbyQ0h4jT59RWK4JQuikpQPgj
pp+gyL3lfGgz8uwC3mvLd2dcDs1vCLmkWiNkxtRkqpbGdy9b3U2O+cuFd4ZZOenT
JevCibWhm/rS5p3jwcQEXMI3vJyevFkjqnwevpSsuEAveJp5RqVmGg6PONZsyV18
4NFJCrFLk7RvhsNfKd7IGv86NeN8IWml6gTjlRD9DMQ/kNfkFrX9TuaJs24Hkg7M
Vfswqk+aJyAZgWP2hagPv7IaXWFq/kDoqEEknqkQAjOcq0VJwIoCXbUlaoW2vVDM
1UHhduoFu+zWFpCREOHeSXw9Di7j1vv2z3fLED9r/Y90RQj7zLlhHtuIFXi8f+cv
5Yc/R9WbNLTrK7iTKJicZkw6unN84QUhNubttmBz/rBIn8P+27kl2LlDPiKfhlZy
g+OdlDkD2XXJQRzuTuiAfKhykYZDGGLu9jJv+g0L7KDHwODj6b0gEQp1tWxeEf9x
JaV0ixf64HS6VdpTadQEJ0QrGkh6GffC0hVfBCMYnakuQWvAji382wrdtonraOd3
jZpuP9z+Ezv1V23Lj1F8LGAg8q3TFNF70+GVE/5DOoecHBwmBas=
=2tZs
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 16 Mar 2021 08:49
Re: [bug#47182] [PATCH 07/18] gnu: binutils-final: Support more Power architectures.
(name . Chris Marusich)(address . cmmarusich@gmail.com)(address . 47182@debbugs.gnu.org)
YFBjCUnU3JyYvPQw@3900XT
On Mon, Mar 15, 2021 at 11:45:00PM -0700, Chris Marusich wrote:
Toggle quote (19 lines)
> * gnu/packages/commencement.scm (binutils-final)[arguments]: When checking if
> the system is a Power architecture, instead of hard-coding "powerpc-linux",
> use the target-powerpc? procedure so it works on more Power architectures.
> [inputs]: Likewise.
> ---
> gnu/packages/commencement.scm | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
> index c0732bbf62d..d4511ed9148 100644
> --- a/gnu/packages/commencement.scm
> +++ b/gnu/packages/commencement.scm
> @@ -3516,14 +3516,14 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
> #:implicit-inputs? #f
> #:allowed-references
> ,@(match (%current-system)
> - ("powerpc-linux"
> + ((? target-powerpc?)

I wonder if this would be better as ,@(if target-powerpc?
I didn't test to see how it would work with cross compiling, I don't
know if binutils-final gets built in that case.

Toggle quote (18 lines)
> `(("out" ,glibc-final ,static-bash-for-glibc)))
> (_
> `(("out" ,glibc-final))))
> ,@(package-arguments binutils)))
> (inputs
> (match (%current-system)
> - ("powerpc-linux"
> + ((? target-powerpc?)
> `(("bash" ,static-bash-for-glibc)
> ,@(%boot2-inputs)))
> (_ (%boot2-inputs))))))
> --
> 2.26.2
>
>
>
>

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmBQYwkACgkQQarn3Mo9
g1EhcRAAviVJcCq6PJMSIqoUsEe7QWlrK84/m2W4InSZHW2WTi3Zf3+HVqXPJ8PS
RlzotchNE92ruPkhPsvm7CtJsek+IyZeSx2xkiRAoghtg/1Shcv/yIpKgt3xDtc6
AxmW1Qu4LETpcP7t06ln4e8j0W6dYnsqHimVaEgw3aH8s+STqL02gOp9kyztPFxK
XH/ASxWJZ+KV2gQlpeRnjcDk/IgxzC6DH3usSLZT3hl20bDtleCfdhrUVYYwk/Sj
2YjlbQZr/silXp9uLOnFEk0Ct85M4gYN6cP9CWbQJF8Pm9DyuJUxSEEv+ef5y/Dr
g7O0+yN9zQOcGGCLzYHKQgkjTHG7bdTVDZeUN004qJUVGq//90KhOVdUAlTn7dJH
49cyccsZbIDHtKR8xSMNdxH5Utb9FQ3kXaVo3bIwQt1LJQs/XbcJktjSEZj+QscL
nrkaZWEJgx2L9VLUCEm8+9YNx86VUUptrLMwSY6aZeC3hj79ZjbfKMo4JxU9Gt36
jHxZY9RZgxLcClZfnJ0QkXphRqAg7dfYIJ78eegUJQRfMkLgODOSOxgI+1LuUFpI
RA9SRWwoQpQkPYRkTHN5w5TZWutzK7THHq8orUPpdc0BCpRXN5WNUz49zAtJx0YQ
jDwqb/yfhv6AVhbON78heJd6OHdzJ72I4/9UhMEcycK+6ffafII=
=BkpE
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 16 Mar 2021 08:53
Re: [bug#47182] [PATCH 10/18] gnu: texlive-bin: Fix compilation on powerpc64le*.
(name . Chris Marusich)(address . cmmarusich@gmail.com)
YFBj5xN28IJL2Cq3@3900XT
On Mon, Mar 15, 2021 at 11:45:03PM -0700, Chris Marusich wrote:
Toggle quote (51 lines)
> From: Leo Le Bouter <lle-bout@zaclys.net>
>
> * gnu/packages/tex.scm (texlive-bin)[arguments]: Append "--disable-luajittex"
> and "--disable-mfluajit" to keyword argument "#:configure-flags" on
> powerpc64le* because LuaJIT is not ported to powerpc64le* yet. Also set
> "#:tests?" to "#f" on powerpc64le*.
>
> Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
> ---
> gnu/packages/tex.scm | 20 +++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
>
> diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
> index c0f4ff0fcdc..508537acdaf 100644
> --- a/gnu/packages/tex.scm
> +++ b/gnu/packages/tex.scm
> @@ -15,6 +15,7 @@
> ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
> ;;; Copyright © 2020, 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
> ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
> +;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -342,14 +343,23 @@ files from LOCATIONS with expected checksum HASH. CODE is not currently in use.
> "--with-system-teckit"
> "--with-system-xpdf"
> "--with-system-zlib"
> - "--with-system-zziplib")
> -
> - ;; Disable tests on mips64/aarch64 to cope with a failure of luajiterr.test.
> - ;; XXX FIXME fix luajit properly on mips64 and aarch64.
> + "--with-system-zziplib"
> + ;; LuaJIT is not ported to powerpc64le* yet.
> + ,@(if (string-prefix? "powerpc64le" (or (%current-target-system)
> + (%current-system)))
> + '("--disable-luajittex"
> + "--disable-mfluajit")
> + '()))
> +
> + ;; Disable tests on some architectures to cope with a failure of
> + ;; luajiterr.test.
> + ;; XXX FIXME fix luajit properly on these architectures.
> #:tests? ,(let ((s (or (%current-target-system)
> (%current-system))))
> (not (or (string-prefix? "aarch64" s)
> - (string-prefix? "mips64" s))))
> + (string-prefix? "mips64" s)
> + (string-prefix? "powerpc64le" s))))
> +

we can probably change this to use cute in core-updates. I don't know if
changing it here will cause rebuilds on aarch64.

Toggle quote (10 lines)
> #:phases
> (modify-phases %standard-phases
> (add-after 'unpack 'configure-ghostscript-executable
> --
> 2.26.2
>
>
>
>

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmBQY+cACgkQQarn3Mo9
g1GYIQ/9Hg99EkR7H+k3eFgcG1ZBcxJEjCnJNYekF6K1nPVT2KhZcMHw2uifr6E8
EZgTVzjDnTiGha4yHOWKwX3kyBbh1urX2wfYbrp+al+vSy4KeQL1tHzOUFZ+BkWC
pOoqUVVIG+Dkp9d9p2qxknqwK20o4PJgpJzH+ByZUo74d5K72+7lpXYEwGWLYbqi
4kx5POq3GBVy4mXISVXBGNmN1xK7DRvukJD9j5MhEgVn3+TzoPpDZ9r54Uuj9QQm
0ObQJMEILpLQoljtqwLEU9UCzU9KFBrbyD1Bpn2pAO1uwtcH3j9sQJ1kZ3J5xMkC
YTvHvqXAPeW5waYDb5NStbzODEO5imALTxjGFcKQX+kH0xJR+WCRLGnklsOgs7sN
9grGtjHmOhGAHzkOVdgxEKNj0B4t/LOAuytgxU6rGBdUxZejoEJ9suUmIgaE0cLF
VfvWzQFNS+YwJCnVFD+orF7gXgXUgNpUc/DDeaD4AnDkodJdW+bYbXGapnw81JoG
eeYghRiH3AwF/0wAbZ0j/kNsEFWdTIdfaCDy/t+3wPBRpXfFdpubFSBGPeQlv5jZ
elN+36ESVEPAFUonrcymaWuTDsWcWwODsLkgPIhEf3vMOIGtpeGDmfq9I7rnlKzl
8BXDkti/2onEmO0RTUwU9yGRF0nJraexdLNM7Ncj7wm2e3c2Nog=
=jWtb
-----END PGP SIGNATURE-----


C
C
Chris Marusich wrote on 16 Mar 2021 09:30
Re: [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux.
(address . 47182@debbugs.gnu.org)
87zgz3mrg1.fsf@gmail.com
Chris Marusich <cmmarusich@gmail.com> writes:

Toggle quote (6 lines)
> * gnu/packages/bootstrap.scm (%bootstrap-executables)
> (bootstrap-executable-file-name, bootstrap-guile-url-path)
> (bootstrap-guile-hash, %bootstrap-coreutils&co, %bootstrap-binutils)
> (%bootstrap-glibc, %bootstrap-gcc): Add entries for powerpc64le-linux.
> (%bootstrap-executable-base-urls): Add an entry for alpha.gnu.org.

Unfortunately, despite my prior claims to the contrary, this change
seems to trigger a rebuild of the hello package and the gcc-toolchain
package on x86_64-linux, which means it's going to trigger a full-world
rebuild, after all. You can see this yourself by running
"./pre-inst-env guix build -d hello gcc-toolchain" on master (on an
x86_64-linux machine), applying this patch, and then running the command
again - the derivations change.

Is there any way to avoid this? I will try to think of something, but
suggestions would be welcome in the meantime... We can't merge this
patch series until we fix this.

It also makes me want to double check the other patches to make sure
they don't accidentally rebuild stuff. I thought I verified that they
didn't, but now I'm not so sure.

--
Chris
L
L
Léo Le Bouter wrote on 16 Mar 2021 10:33
[PATCH 00/18] Add support for powerpc64le-linux (wip-ppc64le-for-master)
(address . 47182@debbugs.gnu.org)
1b9220a0444ae0666354625a0abbc532cae3ccde.camel@zaclys.net
As discussed on IRC, it turns out no world rebuild happens:

$ ./pre-inst-env guix build --system=x86_64-linux -d --no-grafts
texlive-bin texlive-latex-base libelf bdb sed hello gcc-toolchain
/gnu/store/9f3vsmg2c9qa91r1dlffbnpr0kbzpvxy-gcc-toolchain-10.2.0.drv
/gnu/store/sihk9hiiqhqkckjs4dzl2vdk5dfv2923-hello-2.10.drv
/gnu/store/kmpw9qv3pdc31q3b3mnsr8ypqkcd4q95-sed-4.8.drv
/gnu/store/2vq0yvhrn6mk2lr40mabhnx6r0pdrccn-bdb-6.2.32.drv
/gnu/store/mj1q7a8x4hv2c5n1xqnakxhsf5fny609-libelf-0.8.13.drv
/gnu/store/qhnf8nqblgz22id4fzn2bb94mbdzghpk-texlive-latex-base-
51265.drv
/gnu/store/pwhz1k213dd8bsc9sq85vds1cqjwc1by-texlive-bin-20190410.drv

With commit 16cc8f8851ee38dfaa74ef976b0609a837ba682d (current wip-
ppc64le-for-master) which includes those patches AIUI.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEFIvLi9gL+xax3g6RRaix6GvNEKYFAmBQe1oACgkQRaix6GvN
EKZz4g//dRAuV3Nzq1ArEAezXCzcvih4TRk38dQhR+gRyOxt0poKleT8L8SaJoA/
/WxWuUYh6KhBp/pbhBzyLzU4Hb7QxOO3uL2rj2TYfUo1Fc16eklQgG1nuQ+sTgbu
4BtxXMR1KRM84wGOBtFfY7NgJsCkoEgqAFP981s9p6L/GWG2jyHzbqR+ZT+S6yQA
2kW98IbRC/7voappmSDgxzoBBtqgFbFobZ8MMOlPnGUqgp1KIwLV4xHJCTkYINQF
FVTRIGdqK5nx8/mBRAgjhBJxBP3ijQcBTxJtNym5U+Fe/yUd0Fei/krJHNiiYCvU
unemU1mzN4YmK/QiaK7H4DwxjWvsZTBlj2ZNgPhtJgsMFDmGsXPPma86EWncIU/C
XYq5wJceDB7eTyymq01H6KafiYXQutbDeaR09y61n2HLAGPFHjtoBEKWqM+rclyb
16bAK9znN3jO93DUojZfscO6wVk3Y8Wz5BHyLUY4/g6MbItN9/LTECj/3QBljQMk
lGS/ckVgcyZBCpXiUPAWAFz9bRdGpKTa+2dN7qQ2q5zW9b1o+muy+izxkm+fk4al
y4HvRxr9iFOnzyE53lxQO8QiN2ukY5EtPOp0kKCIY3Ay5Su1FCcSDSuhyZdXumap
WkudOqO5xmvQl13Dt4jt/GBMjjgaYQ/OHUagtUYkweytVdFOHEY=
=V+6+
-----END PGP SIGNATURE-----


C
C
Chris Marusich wrote on 17 Mar 2021 07:58
(name . Léo Le Bouter)(address . lle-bout@zaclys.net)(address . 47182@debbugs.gnu.org)
87v99qmfls.fsf_-_@gmail.com
Léo Le Bouter <lle-bout@zaclys.net> writes:

Toggle quote (2 lines)
> As discussed on IRC, it turns out no world rebuild happens:

Yes, and Christopher Baines explained that the outputs matter, not the
derivations themselves. The outputs of hello and gcc-toolchain are the
same on master as they are on the tip of wip-ppc64le-for-master, so I
think I was just confused: we are good to merge to master, after all.

--
Chris
C
C
Christopher Baines wrote on 17 Mar 2021 21:33
Re: [bug#47182] [PATCH 00/18] Add support for powerpc64le-linux (wip-ppc64le-for-master)
(name . Chris Marusich)(address . cmmarusich@gmail.com)
8735wted0s.fsf@cbaines.net
Chris Marusich <cmmarusich@gmail.com> writes:

Toggle quote (9 lines)
> Léo Le Bouter <lle-bout@zaclys.net> writes:
>
>> As discussed on IRC, it turns out no world rebuild happens:
>
> Yes, and Christopher Baines explained that the outputs matter, not the
> derivations themselves. The outputs of hello and gcc-toolchain are the
> same on master as they are on the tip of wip-ppc64le-for-master, so I
> think I was just confused: we are good to merge to master, after all.

Thanks for sending these patches, that means they've appeared in
Patchwork [1] and that the Guix Data Service has processed it as a patch
series [2].


Looking at that comparison, it seems good to merge! The new
powerpc64le-linux derivations could be computed, and there's a
relatively small number of x86_64-linux derivations affected [3], which
is good, as this can be merged to master then.


Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmBSZ5NfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XdIbxAAi6CZZmdyjew75Ip6K4avZM6Jd6gJ/Axo
+ugprzyFwKOZg0fiHsZSDXDZWV5BXNx6IbaQ0AvhDFrWIKVCq45ByTsZXAPCb95z
LcEQ5uLzaU15hZR6rqYScxBq03h9Dv7Sajr4Plsatlpvr1UI5v3kbN4K+YNLbTge
ikKbhq5qRscyqsaoKwMvD6fr/e49dypeMn2RyY4KYNOF5iD9gMjLZPU4TXxyoKPR
rFoNnKy87SDJo24lQo4u8wQZ96KdSqIZSdzWQHVgUzZGwQzlKSNXnQqyMAqVl+px
jP+RSPU1d81tqSx8HOEwzhpzVAr8wYk/2vm7Hz50EoC8ho/Ezg71mH+mEC1Z47Ep
7pI4S7p7j5u2mgmF2nPHfg9Zgb1imXgwNxwE33wRNtnOJPtAALWyokAw22anu7Aq
9gFAoHKpQxHysJOO8vYts6BCL6zJqvhXeaW2ttSO5y71DvOl+gpINlnw+5TtPgCC
AJQfHtXLOdLwCC6qWa3N6XPO0pxAQPQPjNhSCDmYu9nQDZlMMW6OwrxUc33zwiX/
NPcjhgaOwo7gY65p/GgKGKrycAwYK9jUMWp+iQ2RirVsyXl2Heqp/+4FzPBDghE+
XZp42Hcu8GoEUCbXCYHCYYIkCA5qW3wGqRGhMbS7rmXRSyRd6Kj8njOZ4xxoXqqu
dVoGPUjzyyk=
=OGk9
-----END PGP SIGNATURE-----

C
C
Chris Marusich wrote on 18 Mar 2021 07:08
Re: bug#47182: [PATCH 00/18] Add support for powerpc64le-linux (wip-ppc64le-for-master)
(name . Christopher Baines)(address . mail@cbaines.net)
87o8fhm1t1.fsf_-_@gmail.com
Christopher Baines <mail@cbaines.net> writes:

Toggle quote (29 lines)
> Chris Marusich <cmmarusich@gmail.com> writes:
>
>> Léo Le Bouter <lle-bout@zaclys.net> writes:
>>
>>> As discussed on IRC, it turns out no world rebuild happens:
>>
>> Yes, and Christopher Baines explained that the outputs matter, not the
>> derivations themselves. The outputs of hello and gcc-toolchain are the
>> same on master as they are on the tip of wip-ppc64le-for-master, so I
>> think I was just confused: we are good to merge to master, after all.
>
> Thanks for sending these patches, that means they've appeared in
> Patchwork [1] and that the Guix Data Service has processed it as a patch
> series [2].
>
> 1: https://patches.guix-patches.cbaines.net/project/guix-patches/list/?series=7335
> 2:
> https://data.guix-patches.cbaines.net/compare?base_commit=341dfe7eda4972af0a027357015ea595314438b0&target_commit=4757434caeac0077f67583701653a7b89a335e61
>
> Looking at that comparison, it seems good to merge! The new
> powerpc64le-linux derivations could be computed, and there's a
> relatively small number of x86_64-linux derivations affected [3], which
> is good, as this can be merged to master then.
>
> 3:
> https://data.guix-patches.cbaines.net/compare/package-derivations?base_commit=341dfe7eda4972af0a027357015ea595314438b0&target_commit=4757434caeac0077f67583701653a7b89a335e61&system=x86_64-linux&target=none&build_change=&after_name=&limit_results=&all_results=on
>
> Chris

Awesome! Thank you for this additional information. It's very helpful.

It looks like a few hundred packages, according to that page. I've
looked at the patches and I'm not sure exactly why they are rebuilt.
One guess is that perhaps changes to build-side code (e.g.,
guix/build/syscalls.scm) are getting included in the output of some
derivations (maybe module-import-compiled derivations?) whose knock-on
effects down the line are not obvious.

In any case, it's "only" a few hundred packages, judging by the page
Chris linked. I would argue that it is better to merge this for the
release and just rebuild those few hundred packages, rather than to
postpone a change that will make it significantly easier for curious
people to hop in and try out / help out with the powerpc64le-linux port.
I think we've done a pretty good job of limiting the "rebuild" blast
radius, so I think we should go ahead and merge it.

--
Chris
C
C
Chris Marusich wrote on 18 Mar 2021 07:10
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 47182@debbugs.gnu.org)
87k0q5m1ps.fsf_-_@gmail.com
Efraim Flashner <efraim@flashner.co.il> writes:

Toggle quote (24 lines)
> On Mon, Mar 15, 2021 at 11:45:00PM -0700, Chris Marusich wrote:
>> * gnu/packages/commencement.scm (binutils-final)[arguments]: When checking if
>> the system is a Power architecture, instead of hard-coding "powerpc-linux",
>> use the target-powerpc? procedure so it works on more Power architectures.
>> [inputs]: Likewise.
>> ---
>> gnu/packages/commencement.scm | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
>> index c0732bbf62d..d4511ed9148 100644
>> --- a/gnu/packages/commencement.scm
>> +++ b/gnu/packages/commencement.scm
>> @@ -3516,14 +3516,14 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
>> #:implicit-inputs? #f
>> #:allowed-references
>> ,@(match (%current-system)
>> - ("powerpc-linux"
>> + ((? target-powerpc?)
>
> I wonder if this would be better as ,@(if target-powerpc?
> I didn't test to see how it would work with cross compiling, I don't
> know if binutils-final gets built in that case.

Are the final inputs ever cross-compiled? I'm having trouble thinking
of a case when binutils-final would ever be cross-compiled. The package
(like all the final inputs) exist specifically to provide the native GCC
used for building the rest of the things in the system. In a case where
you want to cross-compile e.g. GNU Hello, Guix first uses these final
inputs to (natively) build a cross compilation toolchain, and then it
will use that one to cross-compile GNU Hello.

I don't think we need to account for cross-compliation of the final
inputs, but please correct me if I'm wrong.

--
Chris
C
C
Chris Marusich wrote on 18 Mar 2021 07:16
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87h7l9m1g8.fsf_-_@gmail.com
Efraim Flashner <efraim@flashner.co.il> writes:

Toggle quote (11 lines)
>> #:tests? ,(let ((s (or (%current-target-system)
>> (%current-system))))
>> (not (or (string-prefix? "aarch64" s)
>> - (string-prefix? "mips64" s))))
>> + (string-prefix? "mips64" s)
>> + (string-prefix? "powerpc64le" s))))
>> +
>
> we can probably change this to use cute in core-updates. I don't know if
> changing it here will cause rebuilds on aarch64.

The result of unquoting the expression will be either #t or #f,
depending on the system. For an aarch64 system, the string s hasn't
changed (it'll still start with "aarch64", right?). Therefore, my
understanding is that this change here will not alter the package
definition; it will still say "#:tests? #f", just like it did before, on
an aarch64 system. Is there something else I'm missing?

--
Chris
E
E
Efraim Flashner wrote on 18 Mar 2021 09:29
(name . Chris Marusich)(address . cmmarusich@gmail.com)(address . 47182@debbugs.gnu.org)
YFMPez+NVyOg7OTo@3900XT
On Wed, Mar 17, 2021 at 11:10:23PM -0700, Chris Marusich wrote:
Toggle quote (38 lines)
> Efraim Flashner <efraim@flashner.co.il> writes:
>
> > On Mon, Mar 15, 2021 at 11:45:00PM -0700, Chris Marusich wrote:
> >> * gnu/packages/commencement.scm (binutils-final)[arguments]: When checking if
> >> the system is a Power architecture, instead of hard-coding "powerpc-linux",
> >> use the target-powerpc? procedure so it works on more Power architectures.
> >> [inputs]: Likewise.
> >> ---
> >> gnu/packages/commencement.scm | 4 ++--
> >> 1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
> >> index c0732bbf62d..d4511ed9148 100644
> >> --- a/gnu/packages/commencement.scm
> >> +++ b/gnu/packages/commencement.scm
> >> @@ -3516,14 +3516,14 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
> >> #:implicit-inputs? #f
> >> #:allowed-references
> >> ,@(match (%current-system)
> >> - ("powerpc-linux"
> >> + ((? target-powerpc?)
> >
> > I wonder if this would be better as ,@(if target-powerpc?
> > I didn't test to see how it would work with cross compiling, I don't
> > know if binutils-final gets built in that case.
>
> Are the final inputs ever cross-compiled? I'm having trouble thinking
> of a case when binutils-final would ever be cross-compiled. The package
> (like all the final inputs) exist specifically to provide the native GCC
> used for building the rest of the things in the system. In a case where
> you want to cross-compile e.g. GNU Hello, Guix first uses these final
> inputs to (natively) build a cross compilation toolchain, and then it
> will use that one to cross-compile GNU Hello.
>
> I don't think we need to account for cross-compliation of the final
> inputs, but please correct me if I'm wrong.
>

I first tried to cross compile binutils-final from x86_64 but it failed
because all the mes packages don't support powerpc yet. Then I tried
emulating an aarch64 machine to cross compile binutils-final and that
failed at make-boot0. I think we can assume that binutils-final (and the
other -final packages) aren't going to be cross compiled.

,@(if might be cleaner to look at, but ,@(match makes it easier to
make change later without worrying about nested if statements. Which
hopefully shouldn't be an issue anyway for binutils-final.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmBTD3QACgkQQarn3Mo9
g1FXhA/9EgDqc9uRPpCE40CDhvjngi5/XldJ9BEEYcF/mibB2eb7sJJ7ONQj0TAP
VoRrWAjwgCR+evDDwm2DnZMziclAlXkT+0dCP4mi/Ds194Gfs5gPmV81ESKSV4HF
XaG3zy4jnU9yQg0dAd2SEOVEHoP4QSafgCEGuuZa/QFGAM8y4aOgxR/wZUmOHkcH
9o45YIBdCiBAPSFlnXFqWE83NAmV3kUejLTgc5RPttShXT2/HFPrmHXUPzW6nTBU
kWL+8vZUaGwPbb8HZX6cSVpvuqSWiL8DtjoesUiDne1Wjcj7dT9grUztX5ILCYOt
7SDzeLvlL5nttjsuT/XbYzCDORg9U4lfmSWlhAAAklSDeRJyDSI9RjCACXt0fhHV
c3DOg4SzlcdPBaPOtMyr0/EOlU/lo5cBDnaxTuQ0WV4QRB22XtxNhRc/t0aEZJcc
+K5l6EZ49F8fOWazYHuNATRAyFR5pVP/fA7q6zjqSQYzmbkQYIyjAb85ia8BApLj
RzuT4JEbNrFH/CzdaD9hRQ9WddlvlzP1TZ0GcvKQDJ4bylPnb7ctTN7IhCfDz8/Q
5j86H2aAZBdeylIA9VPIdUd4tGDqL6I0HlH+WzodE8HkrsWuBsfvyHmMhV5d75Rs
d0JMAbPgzAdb715k87/e0JrJiV5CHSU5eyNSnDppjHJX9yBbXtY=
=la3D
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 18 Mar 2021 09:34
(name . Chris Marusich)(address . cmmarusich@gmail.com)
YFMQgRR9Ub1Prdlo@3900XT
On Wed, Mar 17, 2021 at 11:16:07PM -0700, Chris Marusich wrote:
Toggle quote (21 lines)
> Efraim Flashner <efraim@flashner.co.il> writes:
>
> >> #:tests? ,(let ((s (or (%current-target-system)
> >> (%current-system))))
> >> (not (or (string-prefix? "aarch64" s)
> >> - (string-prefix? "mips64" s))))
> >> + (string-prefix? "mips64" s)
> >> + (string-prefix? "powerpc64le" s))))
> >> +
> >
> > we can probably change this to use cute in core-updates. I don't know if
> > changing it here will cause rebuilds on aarch64.
>
> The result of unquoting the expression will be either #t or #f,
> depending on the system. For an aarch64 system, the string s hasn't
> changed (it'll still start with "aarch64", right?). Therefore, my
> understanding is that this change here will not alter the package
> definition; it will still say "#:tests? #f", just like it did before, on
> an aarch64 system. Is there something else I'm missing?
>

I like the way it looks better if we use something like

#:tests? ,(if (any (cute string-prefix? <> (or (%current-target-system)
(%current-system)))
'("aarch64" "powerpc64le" "mips64"))
'#f '#t)

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmBTEIEACgkQQarn3Mo9
g1EIZxAAqgye44ijatTFXk1507akOFi0xiGznfMFw7mqbi7NeXxytJ0FtGUiteN5
YfTnZPB8LVI1uJNHyl+tMVWHr5W6TpzB6j8MYWR0xJj1VALdFT4XBJJs13jEx4ML
PknZk3H+Cc9K2JtxgS26tJOL1wJtAfHi86mWOrsTGhCjg9Ict26gpsmB4TkfwxEw
v2M1D7+makdgRWr4yOenIUswuS6cBkfSYHUPmAUznn6N172BLSI10dXi8FMMeOy8
bZokLo5Vl7pOTK6rwnlYUzOrAKWNeoFt0XODhhMbu6EXp1RzqXDjCGyjkwb5bl3h
NUCCYNVRX3wiLIEC1UNB/gipc9nlaJ6daMPwdJ3ZdH6BJof3h1kpE0h1NPAs4IT4
7/Y1iSbQ9kigcxicLycafSaAEyojQEcqirUx6yM+ZVbFCH0hrQwulktlcmVG5tJi
pAVImsco9Yi1P90kOp1tCNCpoLAy+fTYvHvEFsVD+W0f0qej2Zy/ia17vcg0i4PZ
QX62NkQQC1g4RT6pQkjO45ix2NJ7S6pqUrawRLYN+n9L6NYq0CAC0VraBmd6LHNf
57RINHeWFMRZ2lRXWFVF3sPDJzSjaYAZ/xGtRvU3tWG/CxiQgAAiKlmHJ0/HzLZ6
QFRIBdh7mgZYBoIgwdIm4ZFm1YoMk1ej+gPl3T/dWB5n9LIJnA8=
=sWeO
-----END PGP SIGNATURE-----


C
C
Chris Marusich wrote on 19 Mar 2021 07:22
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87ft0r1x3u.fsf_-_@gmail.com
Efraim Flashner <efraim@flashner.co.il> writes:

Toggle quote (29 lines)
> On Wed, Mar 17, 2021 at 11:16:07PM -0700, Chris Marusich wrote:
>> Efraim Flashner <efraim@flashner.co.il> writes:
>>
>> >> #:tests? ,(let ((s (or (%current-target-system)
>> >> (%current-system))))
>> >> (not (or (string-prefix? "aarch64" s)
>> >> - (string-prefix? "mips64" s))))
>> >> + (string-prefix? "mips64" s)
>> >> + (string-prefix? "powerpc64le" s))))
>> >> +
>> >
>> > we can probably change this to use cute in core-updates. I don't know if
>> > changing it here will cause rebuilds on aarch64.
>>
>> The result of unquoting the expression will be either #t or #f,
>> depending on the system. For an aarch64 system, the string s hasn't
>> changed (it'll still start with "aarch64", right?). Therefore, my
>> understanding is that this change here will not alter the package
>> definition; it will still say "#:tests? #f", just like it did before, on
>> an aarch64 system. Is there something else I'm missing?
>>
>
> I like the way it looks better if we use something like
>
> #:tests? ,(if (any (cute string-prefix? <> (or (%current-target-system)
> (%current-system)))
> '("aarch64" "powerpc64le" "mips64"))
> '#f '#t)

Both forms achieve the same result. I honestly think either would be
fine. Therefore, I don't intend to change the commit corresponding to
this specific patch. However, if you went and changed it per above, I
wouldn't mind at all.

--
Chris
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmBUQyUVHGNtbWFydXNp
Y2hAZ21haWwuY29tAAoJEN1AmhXYIkadRxIQALfYErBSNiFIM5q2Lwu0/w47rM9D
vQvLfl6h3svzR3DmhRI0abcKzTTrAtXlUBqa0dND6duGULUjfqKNTL/gFBUziY2k
P94O5ZomK4873WYeZLftwaUjOniGDCp/AR/8pI+MiY91OZeFOs65w2XgbFfA43rr
+/W94qG9EsNeBFWrGFhafGZ+Z9Czz82CZsrRa81DQte+AMpzNu/dEvjyh+igRLxn
+liP/URhD1oVk4RwlmuyJsUnhO+azzp2zucfF2S8+ZsWmbVN+fZ1bZkIFJJZsymt
+seVwkrJzoOZYmMzJjpjy7y1V+vq+SZQnTl5Z/UQFHEXsAjto0EkNca2WxDB18gc
cCpxLOoNl8MvbP6ErMZC//UbcLaGINUnB86zNgwNm8Ad0840CylTfxUe8/iqici4
DSCM+iupDR35LhM9czHCpn7FjlJPB55UEhGCIruwxpRSmz6GMmcynKp5cdwVMdcn
sKXgcT4iNa2x7IRtEE3gTHOmjcwOnE1b5VPdk32U/FXqQumI0Vcq3kD2h19Ldh/J
QSEhItaPRnTCr5mq+rS55FngTqOLWi8u9fQyaHANrqngrUYLeufwd/Dta+jGobdQ
xbiJVpcLGmqlQhNR/Z3gEfNuJgYbMV2tyXwbgzkvhPg2Iq5IyNWml7VLCl5c7OmO
/AarNwEoL7TPkk20
=+XNG
-----END PGP SIGNATURE-----

C
C
Chris Marusich wrote on 24 Mar 2021 07:36
Merged to master
(address . 47182-done@debbugs.gnu.org)
87tup16osh.fsf@gmail.com
Hi,

I have applied this patch series to the master branch and pushed it to
Savannah. The final commit in the series is
65c46e79e0495fe4d32f6f2725d7233fff10fd70.

Before pushing, I verified again that it still builds both on a Debian
ppc64le machine, as well as on a Fedora amd64 machine.

--
Chris
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmBa3f4VHGNtbWFydXNp
Y2hAZ21haWwuY29tAAoJEN1AmhXYIkad1A8QALOxQr3q7kdRgKJNWtr4YH9B/GzE
T4JXM1F5IC/Y3+j7EGsr2UzuI3qWcFMD5ru0kvcf3E2YO6LRxMCdxxjekb/mJcRV
C2fRcjAZb0yuPuo3p8RJXnO/T9ned+GfRgIOMNMsPRFWVJLPRUiqyF5UWizZpnOL
pMCbRyk4LyyvlqxxLT0vc1B+Hg1SHVh2hNLnbIRoF7a3xgQUgF/XxrBeLVYfYN+f
w8PbhAJdvStXRSrlGk+9VVNysDcEz22sNQ1RGbEK0WmIkT4lzhHnsZztBsuAKEg6
PgwLF7K8q9tkEVdm7qyWs2DkfHB1fntGOMO4BpDGbo9pI3LyHoalGtMnoAAT1Wqn
DV09FM45JaVkw8hsj9WS3vlJIiL5TkpAoyuKqp9l883xYf5z17hDmVaFljAmtQ29
CCcdk9FO5FlQWfYWLmKxURXpv1IzdXrAK6211IS6qxMnT6EkoNskO8QvCpJwfAoC
/N7zMl1pGqiL40kUjaN6w4GE2p4vyydwbym0y7Jo3aKJW+8ef3bMwccLmFaCU3OW
X9oMb8DRbV7NLRuKL/LjP1xYcyBD3ua9DRnSSRzjm5nH5juO58nMCLT31wDgZUle
NtPifcHopheHPfzRtgEqw7Tm7mvTJK4mMwFnwDhNWvg4fh0x4xdOusyAyDlRYnXR
/3Bv2XO0KzaISWuZ
=Jeqy
-----END PGP SIGNATURE-----

Closed
?