unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jan Nieuwenhuizen <janneke@gnu.org>
To: guix-devel@gnu.org
Subject: Hurd bootstrap breaks guix building binutils-boot0@2.34
Date: Sat, 29 Feb 2020 10:36:15 +0100	[thread overview]
Message-ID: <877e05ka5s.fsf@gnu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1107 bytes --]

Hi!

I have been looking at the recent work of Efraim and others wrt the Hurd
bootstrap.  On the Hurd, make-boot0 v4.3 did not work for me so I
reverted to make-boot0 v4.1 for now.  Now I'm stuck on building
binutils-boot0

    ./pre-inst-env guix build -e '(@@ (gnu packages commencement) binutils-boot0)'

It almost fully builds but fails with this error

    phase `compress-documentation' succeeded after 0.4 seconds
    error: cannot kill processes for uid `999': Operation not permitted
    guix build: error: cannot kill processes for uid `999': failed with exit code 1

after which my Hurd setup is broken; I haven't been able to build a new
package and had to reinstall my Hurd VM.  This error is reproducible for
me however: I tried again and broke my Hurd setup in exact the same way.
Any ideas what may be going wrong and how to fix this?

I am now looking to revert bootstrap-guile to v2.0
(https://lists.gnu.org/archive/html/guix-devel/2019-09/msg00106.html)
and possibly binutils-boot0 to v2.32.

Find my notes attached for how I am setting up Hurd development for Guix.

Greetings,
janneke


[-- Attachment #2: INSTALL --]
[-- Type: application/octet-stream, Size: 5801 bytes --]

* Help with Hurd                                                  -*- mode: org -*-

In his talk @FOSDEM17

    https://fosdem.org/2017/schedule/event/guixhurd/
    https://fosdem.org/2017/schedule/event/guixhurd/attachments/slides/1850/export/events/attachments/guixhurd/slides/1850/guix_to_hurd_fosdem_2017.pdf

Manolis calls for help to get Hurd supported on Guix.  A lot of work
has been done.  Some bigger things remains, but there is also a lot of
small, simple things to be fixed.

On Guix Days 2020, Efraim and others resurrect building
bootstrap-binaries for the Hurd

    https://gitlab.com/Efraim/guix  @wip-hurd-bootstrap

* Setup Guix build environment on Debian/Hurd

** Get installed IMAGE!

wget http://cdimage.debian.org/cdimage/ports/latest/hurd-i386/debian-hurd.img.tar.gz
tar xf debian-hurd.img.tar debian-hurd.img.tar.gz

guix environment --ad-hoc qemu parted

parted debian-hurd-20200101.img -- print
qemu-img resize debian-hurd-20200101.img 32G
parted debian-hurd-20200101.img -- resizepart 2 100%
sudo losetup -o $((512*1953792)) /dev/loop0 debian-hurd-20200101.img
sudo resize2fs /dev/loop0
sudo losetup -d /dev/loop0

** Run the HURD
qemu-system-i386 -enable-kvm -drive file=debian-hurd-20200101.img,cache=writeback -m 4G -net user,hostfwd=tcp:127.0.0.1:2223-:22 -net nic

*** [@hurd] Create user

adduser janneke
adduser janneke sudo

*** [@Guix System]: Add to .ssh/config
Host hurd
   HostName localhost
   Port 2223
   ForwardAgent yes

ssh-keygen -R [localhost]:2223
ssh-copy-id hurd

*** [@Guix System] Build bootstrap binaries

**** Clone Guix git
    guix environment guix
    mkdir src
    cd src
    git config --global url."git+ssh://git.sv.gnu.org/srv/git/".insteadOf gnu:
    git clone gnu:guix
    cd guix

**** Checkout Hurd development (core-updates)
    git checkout core-updates
    git show HEAD | head -1
    commit 5afcb5caa53615c0a432e0c1781155398d747218
    ./bootstrap
    ./configure --localstatedir=/var --syscconfdir=/etc

    ./pre-inst-env guix build --target=i586-pc-gnu bootstrap-tarballs
    /gnu/store/yb6hbpsicy0akqs42q8bijjs5xz73i5z-bootstrap-tarballs-0

    ssh hurd mkdir -p var/hurd/gnu
    for i in /gnu/store/yb6hbpsicy0akqs42q8bijjs5xz73i5z-bootstrap-tarballs-0/*; do \
        echo $i; guix hash $i; done
    mkdir -p gnu/packages/bootstrap/i586-gnu
    tar xf /gnu/store/yb6hbpsicy0akqs42q8bijjs5xz73i5z-bootstrap-tarballs-0/static-binaries-0-i586-pc-gnu.tar.xz --strip=2 -C gnu/packages/bootstrap/i586-gnu ./bin/{xz,tar,mkdir,bash}
    for i in gnu/packages/bootstrap/i586-gnu/*; do \
        echo $i; guix hash -r $i; done
    scp -r /gnu/store/yb6hbpsicy0akqs42q8bijjs5xz73i5z-bootstrap-tarballs-0/  hurd:var/hurd/gnu/

*** [@Hurd] Prepare to build Guix

**** Build Guix from git
    sudo apt-get update
    sudo apt-get upgrade

**** Add Debian build dependencies
    sudo apt-get install build-essential dh-autoreconf dh-systemd autotools-dev git guile-2.2-dev guile-gcrypt guile-git guile-gnutls guile-json guile-sqlite3  graphviz help2man libbz2-dev libgcrypt20-dev libsqlite3-dev libssh-dev texinfo

**** Build missing dependencies
    mkdir src
    cd src
    apt-get source --download guile-ssh
    cd guile-ssh-0.11.3
    sed -i 's/dh_auto_test /true # dh_auto_test /' debian/rules
    dpkg-buildpackage -uc
    cd ..
    sudo dpkg -i *.deb

**** Checkout Hurd development (core-updates)
    git config --global url."git+ssh://git.sv.gnu.org/srv/git/".insteadOf gnu:
    git clone gnu:guix
    cd guix
    git remote add janneke git@gitlab.com:janneke/guix.git
    git fetch janneke
    git checkout -b wip-hurd-bootstrap janneke/wip-hurd-bootstrap
    git show HEAD | head -1
    commit 17d4ab57693bfcb777120215882ac8d64c9c6005

    ./bootstrap
    ./configure --with-courage --localstatedir=/var --sysconfdir=/etc
    make

#**** Add Hurd bootstrap binaries
     XXX this does not work anymore?  copy to web server (lilypond.org)
#    mkdir -p gnu/packages/bootstrap/i586-gnu
#    cp ~/var/hurd/gnu/yb6hbpsicy0akqs42q8bijjs5xz73i5z-bootstrap-tarballs-0/guile-static-stripped-2.2.6-i586-pc-gnu.tar.xz gnu/packages/bootstrap/i586-gnu/
#    tar xf ~/var/hurd/gnu/yb6hbpsicy0akqs42q8bijjs5xz73i5z-bootstrap-tarballs-0/static-binaries-0-i586-pc-gnu.tar.xz --strip=2 -C gnu/packages/bootstrap/i586-gnu ./bin/{xz,tar,mkdir,bash}

*** Prepare to start guix-daemon

     sudo groupadd --system guixbuild
     for i in `seq -w 1 10`;
       do
         sudo useradd -g guixbuild -G guixbuild      \
                 -d /var/empty -s `which nologin`    \
                 -c "Guix build user $i" --system    \
                 guixbuilder$i;
       done

     sudo ./pre-inst-env guix archive --authorize < etc/substitutes/ci.guix.gnu.org.pub
     sudo mkdir /var/guix

* Do it
** [@Guix System] Start qemu
    qemu-system-i386 -enable-kvm -drive file=debian-hurd-20170613.img,cache=writeback -m 4G -net user,hostfwd=tcp:127.0.0.1:2223-:22 -net nic

** [@Hurd] Start daemon
    sudo ./pre-inst-env guix-daemon --disable-chroot --build-users-group=guixbuild &

** [@Hurd] build package
    ./pre-inst-env guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
    XXX fails: revert to make-4.1

    ./pre-inst-env guix build -e '(@@ (gnu packages commencement) diffutils-boot0)'
    ./pre-inst-env guix build -e '(@@ (gnu packages commencement) file-boot0)'
    ./pre-inst-env guix build -e '(@@ (gnu packages commencement) patch-boot0)'

    ./pre-inst-env guix build -e '(@@ (gnu packages commencement) binutils-boot0)'
    XXX fails
phase `compress-documentation' succeeded after 0.4 seconds
error: cannot kill processes for uid `999': Operation not permitted
guix build: error: cannot kill processes for uid `999': failed with exit code 1

    ./pre-inst-env guix build -e '(@@ (gnu packages commencement) gcc-boot0)'

[-- Attachment #3: Type: text/plain, Size: 152 bytes --]


-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

             reply	other threads:[~2020-02-29  9:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-29  9:36 Jan Nieuwenhuizen [this message]
2020-02-29 11:20 ` Hurd bootstrap breaks guix building binutils-boot0@2.34 Svante Signell
2020-02-29 17:18   ` Jan Nieuwenhuizen
  -- strict thread matches above, loose matches on Subject: below --
2020-02-29 14:26 Rene
2020-02-29 15:45 ` Jan Nieuwenhuizen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877e05ka5s.fsf@gnu.org \
    --to=janneke@gnu.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).