unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Setting up a Hurd build node
@ 2019-05-06 21:41 Ricardo Wurmus
  2019-05-07  5:21 ` Ricardo Wurmus
  2019-05-07 21:30 ` Ludovic Courtès
  0 siblings, 2 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2019-05-06 21:41 UTC (permalink / raw)
  To: guix-devel

Hi Guix,

I just built Guix in a Debian GNU/Hurd VM and wanted to set it up as a
build node.  I applied a patch to use the i586-gnu bootstrap binaries
from my previous attempt in late 2018, which are published at
https://berlin.guixsd.org/guix/bootstrap/i586-gnu/20180908/.  These were
built with the old patched glibc 2.23.  (The patch to add the bootstrap
binaries is 3.5MB in size because it includes the statically linked
binaries, so I’m not attaching it here.)

Unfortunately, using the build users does not work:

--8<---------------cut here---------------start------------->8---
root@debian:~/guix-1.0.0# ./pre-inst-env guix-daemon --build-users-group=guixbuild --disable-chroot &
root@debian:~/guix-1.0.0# ./pre-inst-env guix build -S hello
madvise failed: Function not implemented
madvise failed: Function not implemented
madvise failed: Function not implemented
madvise failed: Function not implemented
substitute: madvise failed: Function not implemented
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
The following derivation will be built:
   /gnu/store/qihk8cf98xqc7q577wb2nc5axy2ryp8m-hello-2.10.tar.gz.drv
error: cannot kill processes for uid `999': Operation not permitted
guix build: error: cannot kill processes for uid `999': failed with exit code 1
--8<---------------cut here---------------end--------------->8---

Uid 999 belongs to guixbuilder01.  (The gid for the guixbuild group is
also 999.)

I also tried building “hello”, but I only get the message

    madvise failed: Function not implemented

printed endlessly.  (This is probably harmless, but nothing else
happens.)

--
Ricardo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Setting up a Hurd build node
  2019-05-06 21:41 Setting up a Hurd build node Ricardo Wurmus
@ 2019-05-07  5:21 ` Ricardo Wurmus
  2019-05-07 21:30 ` Ludovic Courtès
  1 sibling, 0 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2019-05-07  5:21 UTC (permalink / raw)
  To: guix-devel


Ricardo Wurmus <rekado@elephly.net> writes:

> I also tried building “hello”, but I only get the message
>
>     madvise failed: Function not implemented
>
> printed endlessly.  (This is probably harmless, but nothing else
> happens.)

It’s not endless after all.  The VM has 10G of RAM (I don’t know if all
of this is usable by the Hurd).  Eventually Guile runs out of memory:

     madvise failed: Function not implemented                                              
     madvise failed: Function not implemented                                              
     madvise failed: Function not implemented                                              
     madvise failed: Function not implemented                                              
     madvise failed: Function not implemented                                              
     madvise failed: Function not implemented                                              
            no more room in f5817750 (/usr/local/bin/guile(18046))                         
     allocate_stack failed: Cannot allocate memory                                         
     Warning: Unwind-only `stack-overflow' exception; skipping pre-unwind handler.         
     no more room in f5817750 (/usr/local/bin/guile(18046))                                
     allocate_stack failed: Cannot allocate memory                                         
     Warning: Unwind-only `stack-overflow' exception; skipping pre-unwind handler.         
     no more room in f5817750 (/usr/local/bin/guile(18046))                                
     allocate_stack failed: Cannot allocate memory                                         
     Warning: Unwind-only `stack-overflow' exception; skipping pre-unwind handler.         

That’s when it finally aborts.

-- 
Ricardo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Setting up a Hurd build node
  2019-05-06 21:41 Setting up a Hurd build node Ricardo Wurmus
  2019-05-07  5:21 ` Ricardo Wurmus
@ 2019-05-07 21:30 ` Ludovic Courtès
  2019-05-07 22:12   ` Ricardo Wurmus
  1 sibling, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2019-05-07 21:30 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Hello,

Ricardo Wurmus <rekado@elephly.net> skribis:

> I just built Guix in a Debian GNU/Hurd VM and wanted to set it up as a
> build node.  I applied a patch to use the i586-gnu bootstrap binaries
> from my previous attempt in late 2018, which are published at
> https://berlin.guixsd.org/guix/bootstrap/i586-gnu/20180908/.  These were
> built with the old patched glibc 2.23.  (The patch to add the bootstrap
> binaries is 3.5MB in size because it includes the statically linked
> binaries, so I’m not attaching it here.)

I think we should fix our cross-compiled bootstrap Guile so we can
finally upload bootstrap binaries to ftp.gnu.org:

  https://issues.guix.info/issue/34427
  https://lists.gnu.org/archive/html/guix-devel/2018-12/msg00364.html

> root@debian:~/guix-1.0.0# ./pre-inst-env guix-daemon --build-users-group=guixbuild --disable-chroot &
> root@debian:~/guix-1.0.0# ./pre-inst-env guix build -S hello
> madvise failed: Function not implemented

This warning comes from Guile; it’s fixed in our guile 2.2 package and
upstream.

> The following derivation will be built:
>    /gnu/store/qihk8cf98xqc7q577wb2nc5axy2ryp8m-hello-2.10.tar.gz.drv
> error: cannot kill processes for uid `999': Operation not permitted
> guix build: error: cannot kill processes for uid `999': failed with exit code 1

EPERM comes from ‘waitpid’; weird!

> Uid 999 belongs to guixbuilder01.  (The gid for the guixbuild group is
> also 999.)
>
> I also tried building “hello”, but I only get the message
>
>     madvise failed: Function not implemented
>
> printed endlessly.  (This is probably harmless, but nothing else
> happens.)

Looks like the bootstrap Guile is broken somehow.

Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Setting up a Hurd build node
  2019-05-07 21:30 ` Ludovic Courtès
@ 2019-05-07 22:12   ` Ricardo Wurmus
  2019-05-09 10:37     ` Jonathan Brielmaier
  0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2019-05-07 22:12 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


Ludovic Courtès <ludo@gnu.org> writes:

> Hello,
>
> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> I just built Guix in a Debian GNU/Hurd VM and wanted to set it up as a
>> build node.  I applied a patch to use the i586-gnu bootstrap binaries
>> from my previous attempt in late 2018, which are published at
>> https://berlin.guixsd.org/guix/bootstrap/i586-gnu/20180908/.  These were
>> built with the old patched glibc 2.23.  (The patch to add the bootstrap
>> binaries is 3.5MB in size because it includes the statically linked
>> binaries, so I’m not attaching it here.)
>
> I think we should fix our cross-compiled bootstrap Guile so we can
> finally upload bootstrap binaries to ftp.gnu.org:
>
>   https://issues.guix.info/issue/34427
>   https://lists.gnu.org/archive/html/guix-devel/2018-12/msg00364.html

The new cross-compiled bootstrap Guile is 2.2; for older architectures
it’s 2.0.

I made it work simply by changing all references to “2.0” in “raw-build”
of (gnu packages bootstrap) to “2.2” because the bootstrap Guile really
is version 2.2.  Prior to that the bootstrap Guile would segfault.

>> root@debian:~/guix-1.0.0# ./pre-inst-env guix-daemon --build-users-group=guixbuild --disable-chroot &
>> root@debian:~/guix-1.0.0# ./pre-inst-env guix build -S hello
>> madvise failed: Function not implemented
>
> This warning comes from Guile; it’s fixed in our guile 2.2 package and
> upstream.
>
>> The following derivation will be built:
>>    /gnu/store/qihk8cf98xqc7q577wb2nc5axy2ryp8m-hello-2.10.tar.gz.drv
>> error: cannot kill processes for uid `999': Operation not permitted
>> guix build: error: cannot kill processes for uid `999': failed with exit code 1
>
> EPERM comes from ‘waitpid’; weird!
>
>> Uid 999 belongs to guixbuilder01.  (The gid for the guixbuild group is
>> also 999.)

I punted by running the daemon with only “guix-daemon --disable-chroot”,
no build users group at all.  Of course, perform-download doesn’t like
that we’re downloading things as root, so I disabled the assertion…

>> I also tried building “hello”, but I only get the message
>>
>>     madvise failed: Function not implemented
>>
>> printed endlessly.  (This is probably harmless, but nothing else
>> happens.)
>
> Looks like the bootstrap Guile is broken somehow.

I replaced the bootstrap binaries with more recent ones.  I also had to
disable set-thread-name (because the Hurd doesn’t have it) and took a
step back to build something simpler:

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

This eventually calls

    /gnu/store/dqlhjyvg0n8v1kdvwfpliqy46n7kpjqb-bootstrap-binaries-0/bin/tar cvfa \
       /gnu/store/p278mqb3aa0xrkrrw4rg1fxbb19hbdyh-make-4.2.1.tar.xz \
       --mtime=@0 --owner=root --group=root --sort=name \
       make-4.2.1

which segfaults.  Turns out that it doesn’t segfault after removing
“--mtime=@0” from the arguments.

Weird!  This is all very familiar, because that’s where I stopped when I
last tried all of this.  I gave up when I couldn’t figure out why tar
segfaulted.

--
Ricardo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Setting up a Hurd build node
  2019-05-07 22:12   ` Ricardo Wurmus
@ 2019-05-09 10:37     ` Jonathan Brielmaier
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Brielmaier @ 2019-05-09 10:37 UTC (permalink / raw)
  To: Ricardo Wurmus, Ludovic Courtès; +Cc: guix-devel

Am 08.05.19 um 00:12 schrieb Ricardo Wurmus> Weird!  This is all very
familiar, because that’s where I stopped when I
> last tried all of this.  I gave up when I couldn’t figure out why tar
> segfaulted.

Maybe you could include the bug-hurd@gnu.org mailing list or ask Hurd
hackers directly :)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-05-09 10:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-06 21:41 Setting up a Hurd build node Ricardo Wurmus
2019-05-07  5:21 ` Ricardo Wurmus
2019-05-07 21:30 ` Ludovic Courtès
2019-05-07 22:12   ` Ricardo Wurmus
2019-05-09 10:37     ` Jonathan Brielmaier

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).