* Port Guix to my Apple Aluminum PowerBook G4
@ 2020-02-08 18:00 Scott C. MacCallum via
2020-02-09 7:20 ` Efraim Flashner
0 siblings, 1 reply; 8+ messages in thread
From: Scott C. MacCallum via @ 2020-02-08 18:00 UTC (permalink / raw)
To: help-guix
Greetings,
I'd like to port Guix to my Apple Aluminum PowerBook G4. I understand that this is likely never to be an offically supported architecture, but I'd like to learn the process for freedom and knowledge sake. I have a few Intel-based computers that could aid me in this process. Could someone knowledgeable in such things point me in the right direction?
Sent from ProtonMail mobile
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Port Guix to my Apple Aluminum PowerBook G4
2020-02-08 18:00 Port Guix to my Apple Aluminum PowerBook G4 Scott C. MacCallum via
@ 2020-02-09 7:20 ` Efraim Flashner
0 siblings, 0 replies; 8+ messages in thread
From: Efraim Flashner @ 2020-02-09 7:20 UTC (permalink / raw)
To: Scott C. MacCallum; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 1623 bytes --]
On Sat, Feb 08, 2020 at 06:00:45PM +0000, Scott C. MacCallum via wrote:
> Greetings,
>
> I'd like to port Guix to my Apple Aluminum PowerBook G4. I understand that this is likely never to be an offically supported architecture, but I'd like to learn the process for freedom and knowledge sake. I have a few Intel-based computers that could aid me in this process. Could someone knowledgeable in such things point me in the right direction?
I personally have two G4 laptops and would love to have Guix as an
almost-supported architecture too.
The standard way to add a new architecture to Guix is to cross build
boostrap binaries for it¹² and to shove a reference to them into (gnu
packages commencement) in the guix sources. I have a non-working copy
here³ that I play with occasionally.
What are the specs of your laptop? I maxed out my ram to 1.5GB, which is
under the recommended minimum of 2GB, but found it close enough for most
tasks with Guix.
I suggest popping over to guix-devel also to talk about bootstrapping,
there are some people working on bootstrapping 64-bit PPC who would also
probably be able to help.
¹ http://guix.gnu.org/manual/devel/en/html_node/Porting.html#Porting
² http://guix.gnu.org/manual/devel/en/html_node/Preparing-to-Use-the-Bootstrap-Binaries.html#Building-the-Bootstrap-Binaries
³https://github.com/Millak/guix/tree/flashner/wip-powerpc
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Port Guix to my Apple Aluminum PowerBook G4
@ 2020-02-10 16:54 Scott C. MacCallum
0 siblings, 0 replies; 8+ messages in thread
From: Scott C. MacCallum @ 2020-02-10 16:54 UTC (permalink / raw)
To: help-guix@gnu.org; +Cc: efraim@flashner.co.il
"I personally have two G4 laptops and would love to have Guix as an almost-supported architecture too."
That's great! Knowing that someone else is interested is another motivating factor for me to undertake this.
"The standard way to add a new architecture to Guix is to cross build boostrap binaries for it¹² and to shove a reference to them into (gnu packages commencement) in the guix sources. I have a non-working copy here³ that I play with occasionally."
Thank you for sharing. I will read each resource to wrap my head around the process.
"What are the specs of your laptop? I maxed out my ram to 1.5GB, which is under the recommended minimum of 2GB, but found it close enough for most tasks with Guix."
2GB, which I think will be enough to proceed.
"I suggest popping over to guix-devel also to talk about bootstrapping, there are some people working on bootstrapping 64-bit PPC who would also probably be able to help."
Will do. I'm sure I'll have plenty more questions to ask. :)
Scott
scmguru - irc.freenode.net
^ permalink raw reply [flat|nested] 8+ messages in thread
* Port Guix to my Apple Aluminum PowerBook G4
@ 2020-02-12 18:49 Scott C. MacCallum
2020-02-13 7:36 ` Efraim Flashner
0 siblings, 1 reply; 8+ messages in thread
From: Scott C. MacCallum @ 2020-02-12 18:49 UTC (permalink / raw)
To: guix-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 1405 bytes --]
From: Carlos Sánchez de La Lama
Subject: Re: [PATCH] gnu: bootstrap-tarballs: Cross-compile for powerpc-linux-gnu.
Date: Tue, 29 Nov 2016 08:38:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
---------------------------------------------------------------
Hi!
I finally found some time to clean-up my work. This patch is for
core-updates branch, and allows bootstrap tarball generation by
guix build --target=powerpc-linux-gnu bootstrap-tarballs
I think the best way to proceed is integrate this onto core-updates
(once reviewed & approved), then generate a bootstrap binaries on hydra,
making them available for download on the bootstrap binaries URL. At
that point I can update the rest of the powerpc-linux-gnu patches (which
use this binaries) with the correct hashes, and send them to the list.
As Ludo suggested, I am also preparing a tutorial/blog on the porting
process.
BR
Carlos
Does anyone know if Carlos ever produced a tutorial/blog post on how he did this? I'd like to port Guix to my Apple Aluminum PowerBook G4 for freedom/knowledge sake but the documentation that I've read, http://guix.gnu.org/manual/devel/en/html_node/Porting.html#Porting and http://guix.gnu.org/manual/devel/en/html_node/Preparing-to-Use-the-Bootstrap-Binaries.html#Building-the-Bootstrap-Binaries has left me with more questions than answers.
Thank you,
Scott
scmguru - irc.freenode.net
[-- Attachment #2: Type: text/html, Size: 2155 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Port Guix to my Apple Aluminum PowerBook G4
2020-02-12 18:49 Scott C. MacCallum
@ 2020-02-13 7:36 ` Efraim Flashner
2020-02-13 12:33 ` Scott C. MacCallum
0 siblings, 1 reply; 8+ messages in thread
From: Efraim Flashner @ 2020-02-13 7:36 UTC (permalink / raw)
To: Scott C. MacCallum; +Cc: guix-devel@gnu.org
[-- Attachment #1.1: Type: text/plain, Size: 2226 bytes --]
On Wed, Feb 12, 2020 at 06:49:59PM +0000, Scott C. MacCallum wrote:
> From: Carlos Sánchez de La Lama
> Subject: Re: [PATCH] gnu: bootstrap-tarballs: Cross-compile for powerpc-linux-gnu.
> Date: Tue, 29 Nov 2016 08:38:17 +0100
> User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
> ---------------------------------------------------------------
>
> Hi!
>
> I finally found some time to clean-up my work. This patch is for
> core-updates branch, and allows bootstrap tarball generation by
>
> guix build --target=powerpc-linux-gnu bootstrap-tarballs
>
> I think the best way to proceed is integrate this onto core-updates
> (once reviewed & approved), then generate a bootstrap binaries on hydra,
> making them available for download on the bootstrap binaries URL. At
> that point I can update the rest of the powerpc-linux-gnu patches (which
> use this binaries) with the correct hashes, and send them to the list.
>
> As Ludo suggested, I am also preparing a tutorial/blog on the porting
> process.
>
> BR
>
> Carlos
>
> Does anyone know if Carlos ever produced a tutorial/blog post on how he did this? I'd like to port Guix to my Apple Aluminum PowerBook G4 for freedom/knowledge sake but the documentation that I've read, http://guix.gnu.org/manual/devel/en/html_node/Porting.html#Porting and http://guix.gnu.org/manual/devel/en/html_node/Preparing-to-Use-the-Bootstrap-Binaries.html#Building-the-Bootstrap-Binaries has left me with more questions than answers.
>
> Thank you,
>
> Scott
> scmguru - irc.freenode.net
I reached out to Carlos a few years ago and he said he had moved on and
was pretty sure he didn't have his code or bootstrap binaries anymore.o
I've attached a few patches to this email, which is about where I am
right now on working on the 32-bit PowerPC bootstrap. So far it looks
promising. The change to bootstrap-guile I applied to master and the
other 3 on core-updates, but I suspect they should all apply on top of
master.
--
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
[-- Attachment #1.2: 0001-gnu-Use-guile-2.0-for-make-bootstrap.patch --]
[-- Type: text/plain, Size: 7935 bytes --]
From e1f761e9969a39190177fda48d60f42d63423ab7 Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Thu, 13 Feb 2020 08:30:13 +0100
Subject: [PATCH] gnu: Use guile-2.0 for make-bootstrap.
* gnu/packages/make-bootstrap.scm (%guile-static): Inherit from guile-2.0.
[source]: Update patch set.
(%guile-static-stripped): Adjust for guile-2.0.
* gnu/packages/patches/guile-2.0-relocatable.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
gnu/packages/make-bootstrap.scm | 30 ++++----
.../patches/guile-2.0-relocatable.patch | 68 +++++++++++++++++++
3 files changed, 84 insertions(+), 15 deletions(-)
create mode 100644 gnu/packages/patches/guile-2.0-relocatable.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 3f8fa2ed7b..2cd799dca4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -980,6 +980,7 @@ dist_patch_DATA = \
%D%/packages/patches/guile-finalization-crash.patch \
%D%/packages/patches/guile-linux-syscalls.patch \
%D%/packages/patches/guile-present-coding.patch \
+ %D%/packages/patches/guile-2.0-relocatable.patch \
%D%/packages/patches/guile-relocatable.patch \
%D%/packages/patches/guile-rsvg-pkgconfig.patch \
%D%/packages/patches/guile-emacs-fix-configure.patch \
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index b8d1b2af3e..2c08e31a97 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -699,14 +699,14 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
;; A statically-linked Guile that is relocatable--i.e., it can search
;; .scm and .go files relative to its installation directory, rather
;; than in hard-coded configure-time paths.
- (let* ((patches (cons* (search-patch "guile-relocatable.patch")
- (search-patch "guile-2.2-default-utf8.patch")
+ (let* ((patches (cons* (search-patch "guile-2.0-relocatable.patch")
+ (search-patch "guile-default-utf8.patch")
(search-patch "guile-linux-syscalls.patch")
- (origin-patches (package-source guile-2.2))))
- (source (origin (inherit (package-source guile-2.2))
+ (origin-patches (package-source guile-2.0))))
+ (source (origin (inherit (package-source guile-2.0))
(patches patches)))
- (guile (package (inherit guile-2.2)
- (name (string-append (package-name guile-2.2) "-static"))
+ (guile (package (inherit guile-2.0)
+ (name (string-append (package-name guile-2.0) "-static"))
(source source)
(synopsis "Statically-linked and relocatable Guile")
@@ -715,14 +715,14 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(inputs
`(("libunistring:static" ,libunistring "static")
- ,@(package-inputs guile-2.2)))
+ ,@(package-inputs guile-2.0)))
(propagated-inputs
`(("bdw-gc" ,libgc)
,@(alist-delete "bdw-gc"
- (package-propagated-inputs guile-2.2))))
+ (package-propagated-inputs guile-2.0))))
(arguments
- (substitute-keyword-arguments (package-arguments guile-2.2)
+ (substitute-keyword-arguments (package-arguments guile-2.0)
((#:configure-flags flags '())
;; When `configure' checks for ltdl availability, it
;; doesn't try to link using libtool, and thus fails
@@ -777,13 +777,13 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(out (assoc-ref %outputs "out"))
(guile1 (string-append in "/bin/guile"))
(guile2 (string-append out "/bin/guile")))
- (mkdir-p (string-append out "/share/guile/2.2"))
- (copy-recursively (string-append in "/share/guile/2.2")
- (string-append out "/share/guile/2.2"))
+ (mkdir-p (string-append out "/share/guile/2.0"))
+ (copy-recursively (string-append in "/share/guile/2.0")
+ (string-append out "/share/guile/2.0"))
- (mkdir-p (string-append out "/lib/guile/2.2/ccache"))
- (copy-recursively (string-append in "/lib/guile/2.2/ccache")
- (string-append out "/lib/guile/2.2/ccache"))
+ (mkdir-p (string-append out "/lib/guile/2.0/ccache"))
+ (copy-recursively (string-append in "/lib/guile/2.0/ccache")
+ (string-append out "/lib/guile/2.0/ccache"))
(mkdir (string-append out "/bin"))
(copy-file guile1 guile2)
diff --git a/gnu/packages/patches/guile-2.0-relocatable.patch b/gnu/packages/patches/guile-2.0-relocatable.patch
new file mode 100644
index 0000000000..95bddcce88
--- /dev/null
+++ b/gnu/packages/patches/guile-2.0-relocatable.patch
@@ -0,0 +1,68 @@
+This patch changes Guile to use a default search path relative to the
+location of the `guile' binary, allowing it to be relocated.
+
+--- a/libguile/load.c
++++ b/libguile/load.c
+@@ -26,6 +26,7 @@
+
+ #include <string.h>
+ #include <stdio.h>
++#include <libgen.h>
+
+ #include "libguile/_scm.h"
+ #include "libguile/alist.h"
+@@ -325,6 +326,32 @@
+ SCM cpath = SCM_EOL;
+
+ #ifdef SCM_LIBRARY_DIR
++ char *program, *bin_dir, *prefix, *module_dir, *ccache_dir;
++
++ /* Determine the source and compiled module directories at run-time,
++ relative to the executable's location.
++
++ Note: Use /proc/self/exe instead of argv[0] because the latter is
++ not necessarily an absolute, nor a valid file name. */
++
++ program = scm_gc_malloc_pointerless (256, "string");
++ readlink ("/proc/self/exe", program, 256);
++
++ bin_dir = dirname (strdupa (program));
++
++ prefix = scm_gc_malloc_pointerless (strlen (bin_dir) + 4, "string");
++ strcpy (prefix, bin_dir);
++ strcat (prefix, "/..");
++ prefix = canonicalize_file_name (prefix);
++
++ module_dir = scm_gc_malloc_pointerless (strlen (prefix) + 50, "string");
++ strcpy (module_dir, prefix);
++ strcat (module_dir, "/share/guile/" SCM_EFFECTIVE_VERSION);
++
++ ccache_dir = scm_gc_malloc_pointerless (strlen (prefix) + 50, "string");
++ strcpy (ccache_dir, prefix);
++ strcat (ccache_dir, "/lib/guile/" SCM_EFFECTIVE_VERSION "/ccache");
++
+ env = scm_i_mirror_backslashes (getenv ("GUILE_SYSTEM_PATH"));
+ if (env && strcmp (env, "") == 0)
+ /* special-case interpret system-path=="" as meaning no system path instead
+@@ -333,10 +360,7 @@
+ else if (env)
+ path = scm_parse_path (scm_from_locale_string (env), path);
+ else
+- path = scm_list_4 (scm_from_locale_string (SCM_LIBRARY_DIR),
+- scm_from_locale_string (SCM_SITE_DIR),
+- scm_from_locale_string (SCM_GLOBAL_SITE_DIR),
+- scm_from_locale_string (SCM_PKGDATA_DIR));
++ path = scm_list_1 (scm_from_locale_string (module_dir));
+
+ env = scm_i_mirror_backslashes (getenv ("GUILE_SYSTEM_COMPILED_PATH"));
+ if (env && strcmp (env, "") == 0)
+@@ -346,8 +370,7 @@
+ cpath = scm_parse_path (scm_from_locale_string (env), cpath);
+ else
+ {
+- cpath = scm_list_2 (scm_from_locale_string (SCM_CCACHE_DIR),
+- scm_from_locale_string (SCM_SITE_CCACHE_DIR));
++ cpath = scm_list_1 (scm_from_locale_string (ccache_dir));
+ }
+
+ #endif /* SCM_LIBRARY_DIR */
--
2.25.0
[-- Attachment #1.3: 0001-WIP-add-powerpc-support.patch --]
[-- Type: text/plain, Size: 10157 bytes --]
From a3585c5432e11d2518ae84c4a9871256d2619330 Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Sun, 9 Feb 2020 09:15:36 +0200
Subject: [PATCH 1/3] WIP add powerpc support
---
gnu/packages/bootstrap.scm | 59 +++++++++++++++++++++++++++++++-------
guix/packages.scm | 4 +--
2 files changed, 51 insertions(+), 12 deletions(-)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index d6995f104c..6c6150397c 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2018, 2019 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2019 Carl Dong <contact@carldong.me>
;;;
@@ -86,6 +87,15 @@
,(base32 "1j51gv08sfg277yxj73xd564wjq3f8xwd6s9rbcg8v9gms47m4cx"))
("xz"
,(base32 "1d779rwsrasphg5g3r37qppcqy3p7ay1jb1y83w7x4i3qsc7zjy2")))
+ ("powerpc-linux"
+ ("bash"
+ ,(base32 "00g9mp51jk4gy1hszx6dz5dqhnhxzn7hh31hakyxhyv6xqiw74fx"))
+ ("mkdir"
+ ,(base32 "1s6p31sq5k5fqv5x548vq7l7z481qh93k0fyhqmkzjf2vvkgd1xm"))
+ ("tar"
+ ,(base32 "1ci1lj5zpq2fj1h1r1svyi4qw45h6qc93rq715ps9b2ikm7d9nhd"))
+ ("xz"
+ ,(base32 "17jfrc0kn8qgckxynjaidl9xsz6g7sms1k3hdll0lbxrjnwayha9")))
("armhf-linux"
("bash"
,(base32 "0s6f1s26g4dsrrkl39zblvwpxmbzi6n9mgqf6vxsqz42gik6bgyn"))
@@ -117,9 +127,12 @@
(define (bootstrap-executable-url program system)
"Return the URL where PROGRAM can be found for SYSTEM."
(string-append
- "https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/bootstrap/"
- system "/" program
- "?id=44f07d1dc6806e97c4e9ee3e6be883cc59dc666e"))
+ ;; For powerpc and other new targets.
+ "http://flashner.co.il/guix/bootstrap/powerpc-linux/20191103/powerpc-linux/"
+ program))
+ ;"https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/bootstrap/"
+ ;system "/" program
+ ;"?id=44f07d1dc6806e97c4e9ee3e6be883cc59dc666e"))
(define bootstrap-executable
(mlambda (program system)
@@ -309,6 +322,8 @@ or false to signal an error."
(match system
("aarch64-linux"
"/20170217/guile-2.0.14.tar.xz")
+ ("powerpc-linux"
+ "/20191103/guile-2.2.6.tar.xz")
("armhf-linux"
"/20150101/guile-2.0.11.tar.xz")
(_
@@ -326,7 +341,9 @@ or false to signal an error."
("armhf-linux"
(base32 "1mi3brl7l58aww34rawhvja84xc7l1b4hmwdmc36fp9q9mfx0lg5"))
("aarch64-linux"
- (base32 "1giy2aprjmn5fp9c4s9r125fljw4wv6ixy5739i5bffw4jgr0f9r"))))
+ (base32 "1giy2aprjmn5fp9c4s9r125fljw4wv6ixy5739i5bffw4jgr0f9r"))
+ ("powerpc-linux"
+ (base32 "1y7ymjhd7g0w27198xxia1sskjp07r4bxfq261i0lj4ff4amkif6"))))
(define (bootstrap-guile-origin system)
"Return an <origin> object for the Guile tarball of SYSTEM."
@@ -379,10 +396,11 @@ or false to signal an error."
(lambda (p)
(format p "\
#!~a
-export GUILE_SYSTEM_PATH=~a/share/guile/2.0
-export GUILE_SYSTEM_COMPILED_PATH=~a/lib/guile/2.0/ccache
+export GUILE_SYSTEM_PATH=~a/share/guile/2.2
+export GUILE_SYSTEM_COMPILED_PATH=\"\"
+export GUILE_AUTO_COMPILE=0
exec -a \"~a0\" ~a \"~a@\"\n"
- bash out out dollar guile-real dollar)))
+ bash out dollar guile-real dollar)))
(chmod guile #o555)
(chmod bin-dir #o555))))))
(builder
@@ -395,8 +413,9 @@ cd $out
~a -dc < $GUILE_TARBALL | ~a xv
# Use the bootstrap guile to create its own wrapper to set the load path.
-GUILE_SYSTEM_PATH=$out/share/guile/2.0 \
-GUILE_SYSTEM_COMPILED_PATH=$out/lib/guile/2.0/ccache \
+GUILE_SYSTEM_PATH=$out/share/guile/2.2 \
+GUILE_SYSTEM_COMPILED_PATH=\"\" \
+GUILE_AUTO_COMPILE=0 \
$out/bin/guile -c ~s $out ~a
# Sanity check.
@@ -437,7 +456,7 @@ $out/bin/guile --version~%"
(lower make-raw-bag))))
(package
(name "guile-bootstrap")
- (version "2.0")
+ (version "2.2")
(source #f)
(build-system raw)
(synopsis "Bootstrap Guile")
@@ -456,6 +475,8 @@ $out/bin/guile --version~%"
"/20150101/static-binaries.tar.xz")
("aarch64-linux"
"/20170217/static-binaries.tar.xz")
+ ("powerpc-linux"
+ "/20191103/static-binaries.tar.xz")
(_
"/20131110/static-binaries.tar.xz")))
%bootstrap-base-urls))
@@ -473,6 +494,9 @@ $out/bin/guile --version~%"
("aarch64-linux"
(base32
"18dfiq6c6xhsdpbidigw6480wh0vdgsxqq3xindq4lpdgqlccpfh"))
+ ("powerpc-linux"
+ (base32
+ "1nmfc0dchsng03zzbkpp1w8zwrw6mdrjw08nj87k8b0cr9arvl73"))
("mips64el-linux"
(base32
"072y4wyfsj1bs80r6vbybbafy8ya4vfy7qj25dklwk97m6g71753"))))))
@@ -519,6 +543,8 @@ $out/bin/guile --version~%"
"/20150101/binutils-2.25.tar.xz")
("aarch64-linux"
"/20170217/binutils-2.27.tar.xz")
+ ("powerpc-linux"
+ "/20191103/binutils-2.32.tar.xz")
(_
"/20131110/binutils-2.23.2.tar.xz")))
%bootstrap-base-urls))
@@ -536,6 +562,9 @@ $out/bin/guile --version~%"
("aarch64-linux"
(base32
"111s7ilfiby033rczc71797xrmaa3qlv179wdvsaq132pd51xv3n"))
+ ("powerpc-linux"
+ (base32
+ "16q4b03z6cn17fw8sy97xrcqjqlpmq943n7lz1dy7y97f8apxrcq"))
("mips64el-linux"
(base32
"1x8kkhcxmfyzg1ddpz2pxs6fbdl6412r7x0nzbmi5n7mj8zw2gy7"))))))
@@ -589,6 +618,8 @@ $out/bin/guile --version~%"
"/20150101/glibc-2.20.tar.xz")
("aarch64-linux"
"/20170217/glibc-2.25.tar.xz")
+ ("powerpc-linux"
+ "/20191103/glibc-2.29.tar.xz")
(_
"/20131110/glibc-2.18.tar.xz")))
%bootstrap-base-urls))
@@ -606,6 +637,9 @@ $out/bin/guile --version~%"
("aarch64-linux"
(base32
"07nx3x8598i2924rjnlrncg6rm61c9bmcczbbcpbx0fb742nvv5c"))
+ ("powerpc-linux"
+ (base32
+ "0xl1ygqzvqf6xan63qv3ksz32h436b2mfp1x6s2lq96vvh28m2ar"))
("mips64el-linux"
(base32
"0k97a3whzx3apsi9n2cbsrr79ad6lh00klxph9hw4fqyp1abkdsg")))))))))
@@ -675,6 +709,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")
+ ("powerpc-linux"
+ "/20191103/gcc-7.4.0.tar.xz")
(_
"/20131110/gcc-4.8.2.tar.xz")))
%bootstrap-base-urls))
@@ -692,6 +728,9 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
("aarch64-linux"
(base32
"1ar3vdzyqbfm0z36kmvazvfswxhcihlacl2dzdjgiq25cqnq9ih1"))
+ ("powerpc-linux"
+ (base32
+ "02fkgfx098wi9lr7x0lpjvzmxnmlksl7ibzrzhrd1vdi0if5hcyc"))
("mips64el-linux"
(base32
"1m5miqkyng45l745n0sfafdpjkqv9225xf44jqkygwsipj2cv9ks")))))))))
diff --git a/guix/packages.scm b/guix/packages.scm
index d925e754a3..c0ed500617 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -232,7 +232,7 @@ 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"))
+ '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "mips64el-linux" "powerpc-linux"))
(define %hurd-systems
;; The GNU/Hurd systems for which support is being developed.
@@ -243,7 +243,7 @@ name of its URI."
;;
;; XXX: MIPS is unavailable in CI:
;; <https://lists.gnu.org/archive/html/guix-devel/2017-03/msg00790.html>.
- (fold delete %supported-systems '("mips64el-linux")))
+ (fold delete %supported-systems '("mips64el-linux" "powerpc-linux")))
;; A package.
--
2.25.0
[-- Attachment #1.4: 0002-Try-with-guile-2.0.patch --]
[-- Type: text/plain, Size: 5418 bytes --]
From b734af582ba6d37a185f7797a7adbb2c368842bd Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Wed, 12 Feb 2020 22:32:43 +0200
Subject: [PATCH 2/3] Try with guile-2.0
---
gnu/packages/bootstrap.scm | 28 +++++++++++++---------------
1 file changed, 13 insertions(+), 15 deletions(-)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 6c6150397c..f68917d23e 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -128,7 +128,7 @@
"Return the URL where PROGRAM can be found for SYSTEM."
(string-append
;; For powerpc and other new targets.
- "http://flashner.co.il/guix/bootstrap/powerpc-linux/20191103/powerpc-linux/"
+ "http://flashner.co.il/guix/bootstrap/powerpc-linux/20200213/bin/"
program))
;"https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/bootstrap/"
;system "/" program
@@ -323,7 +323,7 @@ or false to signal an error."
("aarch64-linux"
"/20170217/guile-2.0.14.tar.xz")
("powerpc-linux"
- "/20191103/guile-2.2.6.tar.xz")
+ "/20200213/guile-2.0.14.tar.xz")
("armhf-linux"
"/20150101/guile-2.0.11.tar.xz")
(_
@@ -343,7 +343,7 @@ or false to signal an error."
("aarch64-linux"
(base32 "1giy2aprjmn5fp9c4s9r125fljw4wv6ixy5739i5bffw4jgr0f9r"))
("powerpc-linux"
- (base32 "1y7ymjhd7g0w27198xxia1sskjp07r4bxfq261i0lj4ff4amkif6"))))
+ (base32 "05wyhrzqqghgv3pvdwyhdwhahddvcgd1nxrxbvsghc0gmkhnnmcj"))))
(define (bootstrap-guile-origin system)
"Return an <origin> object for the Guile tarball of SYSTEM."
@@ -396,11 +396,10 @@ or false to signal an error."
(lambda (p)
(format p "\
#!~a
-export GUILE_SYSTEM_PATH=~a/share/guile/2.2
-export GUILE_SYSTEM_COMPILED_PATH=\"\"
-export GUILE_AUTO_COMPILE=0
+export GUILE_SYSTEM_PATH=~a/share/guile/2.0
+export GUILE_SYSTEM_COMPILED_PATH=~a/lib/guile/2.0/ccache
exec -a \"~a0\" ~a \"~a@\"\n"
- bash out dollar guile-real dollar)))
+ bash out out dollar guile-real dollar)))
(chmod guile #o555)
(chmod bin-dir #o555))))))
(builder
@@ -413,9 +412,8 @@ cd $out
~a -dc < $GUILE_TARBALL | ~a xv
# Use the bootstrap guile to create its own wrapper to set the load path.
-GUILE_SYSTEM_PATH=$out/share/guile/2.2 \
-GUILE_SYSTEM_COMPILED_PATH=\"\" \
-GUILE_AUTO_COMPILE=0 \
+GUILE_SYSTEM_PATH=$out/share/guile/2.0 \
+GUILE_SYSTEM_COMPILED_PATH=$out/lib/guile/2.0/ccache \
$out/bin/guile -c ~s $out ~a
# Sanity check.
@@ -456,7 +454,7 @@ $out/bin/guile --version~%"
(lower make-raw-bag))))
(package
(name "guile-bootstrap")
- (version "2.2")
+ (version "2.0")
(source #f)
(build-system raw)
(synopsis "Bootstrap Guile")
@@ -476,7 +474,7 @@ $out/bin/guile --version~%"
("aarch64-linux"
"/20170217/static-binaries.tar.xz")
("powerpc-linux"
- "/20191103/static-binaries.tar.xz")
+ "/20200213/static-binaries.tar.xz")
(_
"/20131110/static-binaries.tar.xz")))
%bootstrap-base-urls))
@@ -544,7 +542,7 @@ $out/bin/guile --version~%"
("aarch64-linux"
"/20170217/binutils-2.27.tar.xz")
("powerpc-linux"
- "/20191103/binutils-2.32.tar.xz")
+ "/20200213/binutils-2.32.tar.xz")
(_
"/20131110/binutils-2.23.2.tar.xz")))
%bootstrap-base-urls))
@@ -619,7 +617,7 @@ $out/bin/guile --version~%"
("aarch64-linux"
"/20170217/glibc-2.25.tar.xz")
("powerpc-linux"
- "/20191103/glibc-2.29.tar.xz")
+ "/20200213/glibc-2.29.tar.xz")
(_
"/20131110/glibc-2.18.tar.xz")))
%bootstrap-base-urls))
@@ -710,7 +708,7 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
("aarch64-linux"
"/20170217/gcc-5.4.0.tar.xz")
("powerpc-linux"
- "/20191103/gcc-7.4.0.tar.xz")
+ "/20200213/gcc-7.4.0.tar.xz")
(_
"/20131110/gcc-4.8.2.tar.xz")))
%bootstrap-base-urls))
--
2.25.0
[-- Attachment #1.5: 0003-use-gcc-7-for-libstdc-boot0.patch --]
[-- Type: text/plain, Size: 955 bytes --]
From 6ccc9da5a03f2d6b8e1198d2d32909998646d24b Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Thu, 13 Feb 2020 09:34:26 +0200
Subject: [PATCH 3/3] use gcc-7 for libstdc++-boot0
---
gnu/packages/commencement.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 2a0a83ad49..3074cf8a8a 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1429,7 +1429,7 @@ exec " gcc "/bin/" program
;; 'Makefile.def' forcefully adds --enable-shared) and thus needs to refer
;; to libstdc++.so. We cannot build libstdc++-5.3 because it relies on
;; C++14 features missing in some of our bootstrap compilers.
- (let ((lib (make-libstdc++ gcc-4.9)))
+ (let ((lib (make-libstdc++ gcc-7)))
(package
(inherit lib)
(source (bootstrap-origin (package-source lib)))
--
2.25.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: Port Guix to my Apple Aluminum PowerBook G4
2020-02-13 7:36 ` Efraim Flashner
@ 2020-02-13 12:33 ` Scott C. MacCallum
2020-02-17 7:07 ` Efraim Flashner
0 siblings, 1 reply; 8+ messages in thread
From: Scott C. MacCallum @ 2020-02-13 12:33 UTC (permalink / raw)
To: efraim; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 2394 bytes --]
Sounds great, Efraim. Let me know if there's anything that I can do to help with your efforts. I'm new to this, so I'll need tutorial on the basics.
-------- Original Message --------
On Feb 13, 2020, 2:36 AM, Efraim Flashner < efraim@flashner.co.il> wrote:
On Wed, Feb 12, 2020 at 06:49:59PM +0000, Scott C. MacCallum wrote: > From: Carlos Sánchez de La Lama > Subject: Re: [PATCH] gnu: bootstrap-tarballs: Cross-compile for powerpc-linux-gnu. > Date: Tue, 29 Nov 2016 08:38:17 +0100 > User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) > --------------------------------------------------------------- > > Hi! > > I finally found some time to clean-up my work. This patch is for > core-updates branch, and allows bootstrap tarball generation by > > guix build --target=powerpc-linux-gnu bootstrap-tarballs > > I think the best way to proceed is integrate this onto core-updates > (once reviewed & approved), then generate a bootstrap binaries on hydra, > making them available for download on the bootstrap binaries URL. At > that point I can update the rest of the powerpc-linux-gnu patches (which > use this binaries) with the correct hashes, and send them to the list. > > As Ludo suggested, I am also preparing a tutorial/blog on the porting > process. > > BR > > Carlos > > Does anyone know if Carlos ever produced a tutorial/blog post on how he did this? I'd like to port Guix to my Apple Aluminum PowerBook G4 for freedom/knowledge sake but the documentation that I've read, http://guix.gnu.org/manual/devel/en/html_node/Porting.html#Porting and http://guix.gnu.org/manual/devel/en/html_node/Preparing-to-Use-the-Bootstrap-Binaries.html#Building-the-Bootstrap-Binaries has left me with more questions than answers. > > Thank you, > > Scott > scmguru - irc.freenode.net I reached out to Carlos a few years ago and he said he had moved on and was pretty sure he didn't have his code or bootstrap binaries anymore.o I've attached a few patches to this email, which is about where I am right now on working on the 32-bit PowerPC bootstrap. So far it looks promising. The change to bootstrap-guile I applied to master and the other 3 on core-updates, but I suspect they should all apply on top of master. -- Efraim Flashner אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: Type: text/html, Size: 2731 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Port Guix to my Apple Aluminum PowerBook G4
2020-02-13 12:33 ` Scott C. MacCallum
@ 2020-02-17 7:07 ` Efraim Flashner
2020-02-17 11:35 ` Scott C. MacCallum
0 siblings, 1 reply; 8+ messages in thread
From: Efraim Flashner @ 2020-02-17 7:07 UTC (permalink / raw)
To: Scott C. MacCallum; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 746 bytes --]
I've done a bit of work on the port and my two branches live here¹ and
here². On master I get as far as gcc-cross-boot0. Core-updates does much
better, getting to glibc-intermediate, where it fails to build since it
says it can't find nptl. Searching the Guix tree I see that there's some
references to nptl in (gnu packages commencement) and in a
glibc-2.29-git-updates.patch, so I'll take a look at that.
¹ https://gitlab.com/Efraim/guix/-/tree/ppc-master
² https://gitlab.com/Efraim/guix/-/tree/ppc-core-updates
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Port Guix to my Apple Aluminum PowerBook G4
2020-02-17 7:07 ` Efraim Flashner
@ 2020-02-17 11:35 ` Scott C. MacCallum
0 siblings, 0 replies; 8+ messages in thread
From: Scott C. MacCallum @ 2020-02-17 11:35 UTC (permalink / raw)
To: efraim; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 830 bytes --]
Wow! Great work.
Sent from ProtonMail mobile
-------- Original Message --------
On Feb 17, 2020, 2:07 AM, Efraim Flashner wrote:
> I've done a bit of work on the port and my two branches live here¹ and here². On master I get as far as gcc-cross-boot0. Core-updates does much better, getting to glibc-intermediate, where it fails to build since it says it can't find nptl. Searching the Guix tree I see that there's some references to nptl in (gnu packages commencement) and in a glibc-2.29-git-updates.patch, so I'll take a look at that. ¹ https://gitlab.com/Efraim/guix/-/tree/ppc-master ² https://gitlab.com/Efraim/guix/-/tree/ppc-core-updates -- Efraim Flashner אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: Type: text/html, Size: 973 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-02-17 11:35 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-08 18:00 Port Guix to my Apple Aluminum PowerBook G4 Scott C. MacCallum via
2020-02-09 7:20 ` Efraim Flashner
-- strict thread matches above, loose matches on Subject: below --
2020-02-10 16:54 Scott C. MacCallum
2020-02-12 18:49 Scott C. MacCallum
2020-02-13 7:36 ` Efraim Flashner
2020-02-13 12:33 ` Scott C. MacCallum
2020-02-17 7:07 ` Efraim Flashner
2020-02-17 11:35 ` Scott C. MacCallum
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.