[core-updates] Native Hurd (i586-gnu) builds broken

  • Done
  • quality assurance status badge
Details
2 participants
  • Janneke Nieuwenhuizen
  • Ludovic Courtès
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal
L
L
Ludovic Courtès wrote on 26 Jul 23:27 +0200
(address . bug-guix@gnu.org)
877cd7c09g.fsf@inria.fr
Hello!

As of 21fe1e077aa77488bd413ef3255973c60d7468fe, native i586-gnu builds
are broken on ‘core-updates’:

Toggle snippet (25 lines)
gcc -std=gnu99 -fgnu89-inline -Wall -Werror=old-style-definition -Werror=implicit-function-declaration -Werror=strict-prototypes -g -O3 -fno-strict-aliasing -g -O2 -I. -I.. -I../include -I../include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPACKAGE_NAME=\"GNU\ Hurd\" -DPACKAGE_TARNAME=\"hurd\" -DPACKAGE_VERSION=\"0.9\" -DPACKAGE_STRING=\"GNU\ Hurd\ 0.9\" -DPACKAGE_BUGREPORT=\"bug-hurd@gnu.org\" -DPACKAGE_URL=\"http://www.gnu.org/software/hurd/\" -DUTIME_NOW=-1 -DUTIME_OMIT=-2 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DX11_PREFIX=\"\" -DHAVE_STRUCT_THREAD_SCHED_INFO_LAST_PROCESSOR=1 -c -o exec-reauth.o exec-reauth.c
In file included from /gnu/store/manl7sfylldlpcsdgngbs2b07pf29y8l-glibc-bootstrap-0/include/mach.h:37:0,
from exec-reauth.c:22:
/gnu/store/manl7sfylldlpcsdgngbs2b07pf29y8l-glibc-bootstrap-0/include/mach/mach_host.h:489:2: error: unknown type name 'kernel_boot_info_t'
kernel_boot_info_t boot_info
^
/gnu/store/manl7sfylldlpcsdgngbs2b07pf29y8l-glibc-bootstrap-0/include/mach/mach_host.h:978:2: error: unknown type name 'kernel_boot_info_t'
kernel_boot_info_t boot_info
^
exec-reauth.c: In function 'reauth':
exec-reauth.c:71:21: error: implicit declaration of function 'proc_reauthenticate_complete' [-Werror=implicit-function-declaration]
err = proc_reauthenticate_complete (newport);
^
cc1: some warnings being treated as errors
make[1]: *** [<builtin>: exec-reauth.o] Error 1
make[1]: Leaving directory '/tmp/guix-build-hurd-minimal-boot0-0.9.git20231217.drv-0/source/libshouldbeinlibc'
make: *** [Makefile:262: libshouldbeinlibc] Error 2
error: in phase 'build': uncaught exception:
srfi-34 #<condition &invoke-error [program: "make" arguments: ("-j" "1" "lib-subdirs=libshouldbeinlibc libihash libstore" "prog-subdirs=" "other-subdirs=") exit-status: 2 term-signal: #f stop-signal: #f] 7e9700>
phase `build' failed after 4.1 seconds
command "make" "-j" "1" "lib-subdirs=libshouldbeinlibc libihash libstore" "prog-subdirs=" "other-subdirs=" failed with status 2
builder for `/gnu/store/pb157d8kfdsdz6grqrksha459aqjh99l-hurd-minimal-boot0-0.9.git20231217.drv' failed with exit code 1
@ build-failed /gnu/store/pb157d8kfdsdz6grqrksha459aqjh99l-hurd-minimal-boot0-0.9.git20231217.drv - 1 builder for `/gnu/store/pb157d8kfdsdz6grqrksha459aqjh99l-hurd-minimal-boot0-0.9.git20231217.drv' failed with exit code 1

This is beacuse <mach/mach_host.h> in ‘glibc-bootstrap’ expects
‘kernel_boot_info_t’ to be defined, but the <mach/host_info.h> header
from the updated ‘gnumach-headers-boot0’ no longer defines it.

(Note that there’s additional confusion due to origin inheritance:
upgrading ‘gnumach-headers’ upgrades ‘gnumach-headers-boot0’, even
though that’s not indented.)

The patch below reverts to something close to what we have on ‘master’,
but glibc 2.39 fails to build then:

Toggle snippet (29 lines)
i586-guix-gnu-gcc msg-destroy.c -c -std=gnu11 -fgnu89-inline -g -O2 -Wall -Wwrite-strings -Wundef -fmerge-all-constants -frounding-math -fno-stack-protector -fno-common -Wp,-U_FORTIFY_SOURCE -Wno-parentheses -Wstrict-prototypes -Wold-style-definition -fmath-errno -fPIE -ftls-model=initial-exec -I../include -I/tmp/guix-build-glibc-intermediate-2.39.drv-0/build/mach -I/tmp/guix-build-glibc-intermediate-2.39.drv-0/build -I../sysdeps/mach/hurd/i386 -I../sysdeps/mach/hurd/x86 -I../sysdeps/mach/hurd/i386/htl -I../sysdeps/mach/hurd/htl -I../sysdeps/hurd/htl -I../sysdeps/mach/htl -I../sysdeps/htl/include -I../sysdeps/htl -I../sysdeps/pthread -I../sysdeps/i386/htl -I../sysdeps/x86/htl -I../sysdeps/mach/hurd -I../sysdeps/gnu -I../sysdeps/unix/bsd -I../sysdeps/unix/inet -I../sysdeps/mach/i386 -I../sysdeps/mach/x86 -I../sysdeps/mach/include -I../sysdeps/mach -I../sysdeps/i386/i586 -I../sysdeps/i386/fpu -I../sysdeps/x86/fpu -I../sysdeps/i386 -I../sysdeps/x86/include -I../sysdeps/x86 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/float128 -I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/hurd/include -I../sysdeps/hurd -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/ieee754 -I../sysdeps/generic -I../hurd -I/tmp/guix-build-glibc-intermediate-2.39.drv-0/build/hurd/ -I../mach -I/tmp/guix-build-glibc-intermediate-2.39.drv-0/build/mach/ -I.. -I../libio -I. -nostdinc -isystem /gnu/store/vkqj1gblhllcj9k26jpjp13qwcm55j8p-gcc-cross-boot0-11.4.0-lib/lib/gcc/i586-guix-gnu/11.4.0/include -isystem /gnu/store/vkqj1gblhllcj9k26jpjp13qwcm55j8p-gcc-cross-boot0-11.4.0-lib/lib/gcc/i586-guix-gnu/11.4.0/include-fixed -isystem /gnu/store/vqdzmb3i7ds3ghwvlj44xcasgq8nln55-hurd-core-headers-0.9.git20231217/include -D_LIBC_REENTRANT -include /tmp/guix-build-glibc-intermediate-2.39.drv-0/build/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h -DPIC -DTOP_NAMESPACE=glibc -o /tmp/guix-build-glibc-intermediate-2.39.drv-0/build/mach/msg-destroy.o -MD -MP -MF /tmp/guix-build-glibc-intermediate-2.39.drv-0/build/mach/msg-destroy.o.dt -MT /tmp/guix-build-glibc-intermediate-2.39.drv-0/build/mach/msg-destroy.o
msg-destroy.c: In function '__mach_msg_destroy':
msg-destroy.c:114:21: error: unknown type name 'mach_port_name_inlined_t'; did you mean 'mach_port_name_array_t'?
114 | mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)addr;
| ^~~~~~~~~~~~~~~~~~~~~~~~
| mach_port_name_array_t
msg-destroy.c:114:64: error: 'mach_port_name_inlined_t' undeclared (first use in this function); did you mean 'mach_port_name_array_t'?
114 | mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)addr;
| ^~~~~~~~~~~~~~~~~~~~~~~~
| mach_port_name_array_t
msg-destroy.c:114:64: note: each undeclared identifier is reported only once for each function it appears in
msg-destroy.c:114:90: error: expected expression before ')' token
114 | mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)addr;
| ^
msg-destroy.c:116:63: error: request for member 'name' in something not a structure or union
116 | mach_msg_destroy_port(inlined_ports[i].name, name);
| ^
make[2]: *** [../o-iterator.mk:9: /tmp/guix-build-glibc-intermediate-2.39.drv-0/build/mach/msg-destroy.o] Error 1
make[2]: Leaving directory '/tmp/guix-build-glibc-intermediate-2.39.drv-0/glibc-2.39/mach'
make[1]: *** [Makefile:484: mach/subdir_lib] Error 2
make[1]: Leaving directory '/tmp/guix-build-glibc-intermediate-2.39.drv-0/glibc-2.39'
make: *** [Makefile:9: all] Error 2
error: in phase 'build': uncaught exception:
srfi-34 #<condition &invoke-error [program: "make" arguments: ("-j" "1") exit-status: 2 term-signal: #f stop-signal: #f] 9a4da0>
phase `build' failed after 44.6 seconds
command "make" "-j" "1" failed with status 2
builder for `/gnu/store/18p66bbg3w2l4rmvkqc0z57bl0j1wqlq-glibc-intermediate-2.39.drv' failed with exit code 1

Any idea where to go from here?

Of course we could upgrade ‘glibc-bootstrap’, but it’s even better if we
can avoid it.

Ludo’.
Toggle diff (76 lines)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index b31f976900..911625003c 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2628,10 +2628,11 @@ (define gnumach-headers-boot0
(package
(inherit gnumach-headers)
(name "gnumach-headers-boot0")
- (version "1.8+git20230410")
+ ;; Note: The version used here must be compatible with the <mach.h> and
+ ;; related headers in 'glibc-bootstrap'.
+ (version "1.8+git20221224")
(source
(origin
- (inherit (package-source gnumach-headers))
(method
(git-fetch-from-tarball
(origin
@@ -2641,7 +2642,14 @@ (define gnumach-headers-boot0
"gnumach-" version ".tar.gz"))
(sha256
(base32
- "1s09256g2ny46idrn8frzs7r51la9ni45bmglmswlsmz9ii7dpi4")))))))
+ "0vb19ynvrxz302snqxkd0wgizwa5fw2x06a4zjsllqb9ijbq9mc8")))))
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/hurd/gnumach.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name "gnumach" version))
+ (sha256
+ (base32
+ "0f49zqxf64ds75rmskizpybl2mw7sxs05k59gjp3pgspvr87w7gs"))))
(native-inputs (list autoconf-boot0 automake-boot0 texinfo-boot0))
(arguments
(substitute-keyword-arguments (package-arguments gnumach-headers)
@@ -2691,10 +2699,9 @@ (define hurd-headers-boot0
(package
(inherit hurd-headers)
(name "hurd-headers-boot0")
- (version "0.9.git20230520")
+ (version "0.9.git20230216")
(source
(origin
- (inherit (package-source hurd-headers))
(method
(git-fetch-from-tarball
(origin
@@ -2704,7 +2711,14 @@ (define hurd-headers-boot0
"hurd-v" version ".tar.gz"))
(sha256
(base32
- "0ybmx7bhy21zv1if2hfdspn13zn68vki1na72sw2jj87gj8przna")))))))
+ "1f75nlkcl00dqnnrbrj1frvzs2qibfpygj3gwywqi85aldjl48y7")))))
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/hurd/hurd.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0jm1dnqkx4kdwmby0z5w0yqp9m5qp4hbxd4jxlyhiqm8nkw9mkvv"))))
(native-inputs
(list autoconf-boot0 automake-boot0 mig-boot0))
(inputs '()))))
@@ -2714,10 +2728,12 @@ (define hurd-minimal-boot0
(package
(inherit hurd-minimal)
(name "hurd-minimal-boot0")
+ (version (package-version hurd-headers-boot0))
(source (package-source hurd-headers-boot0))
(native-inputs
(list autoconf-boot0 automake-boot0 gnumach-headers-boot0 mig-boot0))
- (inputs (list gnumach-headers-boot0)))))
+ (inputs (list gnumach-headers-boot0))
+ (propagated-inputs '()))))
(define/system-dependent hurd-core-headers-boot0
;; Return the Hurd and Mach headers as well as initial Hurd libraries for
L
L
Ludovic Courtès wrote on 15 Aug 18:58 +0200
(address . 72315@debbugs.gnu.org)
87ikw1910c.fsf@gnu.org
Hello,

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

Toggle quote (3 lines)
> As of 21fe1e077aa77488bd413ef3255973c60d7468fe, native i586-gnu builds
> are broken on ‘core-updates’:

[...]

Toggle quote (3 lines)
> Of course we could upgrade ‘glibc-bootstrap’, but it’s even better if we
> can avoid it.

I sent patches to that effect here: https://issues.guix.gnu.org/72643.

Lemme know what you think!

Ludo’.
L
L
Ludovic Courtès wrote on 16 Aug 19:56 +0200
Re: [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)
87ed6o5p2a.fsf@gnu.org
Hi!

Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (3 lines)
> As mentioned on IRC, I've reconfigured my system to core-updates+this
> patch series and it works for me.

Pushed as 817838c38bbeb4ef7dcb64af5fce168aeb51306e, thanks for testing!

Toggle quote (16 lines)
> I'm using a close variant of the `devel-hurd.tmpl' from the hurd-team
> branch
>
> https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system/examples/devel-hurd.tmpl?h=hurd-team
>
> and removed the new imagemagick dependency
>
> --- a/gnu/system/examples/devel-hurd.tmpl
> +++ b/gnu/system/examples/devel-hurd.tmpl
> @@ -59,7 +59,7 @@
> (define guix-packages
> (filter-map input->package
> (fold alist-delete (package-direct-inputs guix)
> - '("glibc-utf8-locales" "graphviz" "po4a"))))
> + '("glibc-utf8-locales" "graphviz" "imagemagick" "po4a"))))

I’ve submitted a patch to remove it:


Regarding ‘hurd-team’, I admit I had forgotten about it. What are the
important things we should bring over to ‘master’ or ‘core-updates’?

Thanks,
Ludo’.
Closed
J
J
Janneke Nieuwenhuizen wrote on 18 Aug 11:02 +0200
(name . Ludovic Courtès)(address . ludo@gnu.org)
87ttfifbk1.fsf@gnu.org
Ludovic Courtès writes:

Hello,

Toggle quote (7 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> As mentioned on IRC, I've reconfigured my system to core-updates+this
>> patch series and it works for me.
>
> Pushed as 817838c38bbeb4ef7dcb64af5fce168aeb51306e, thanks for testing!

Yay!

Toggle quote (13 lines)
>> --- a/gnu/system/examples/devel-hurd.tmpl
>> +++ b/gnu/system/examples/devel-hurd.tmpl
>> @@ -59,7 +59,7 @@
>> (define guix-packages
>> (filter-map input->package
>> (fold alist-delete (package-direct-inputs guix)
>> - '("glibc-utf8-locales" "graphviz" "po4a"))))
>> + '("glibc-utf8-locales" "graphviz" "imagemagick" "po4a"))))
>
> I’ve submitted a patch to remove it:
>
> https://issues.guix.gnu.org/72674

Thanks, that's great.

Toggle quote (3 lines)
> Regarding ‘hurd-team’, I admit I had forgotten about it. What are the
> important things we should bring over to ‘master’ or ‘core-updates’?

I don't think so; most of it is not really finished. Possibly

Toggle snippet (5 lines)
d7562eae93 hurd: Support system init in /libexec/runsystem.
b9b5f1ee5f hurd-boot: Support system init: Create essential device nodes.
ddba840edd system: hurd: Add swap-services to hurd-default-essential-services.

that help booting the Hurd after installing it on real hardware from a
GNU/Linux Guix installation with `guix init ... /hurd'. After `guix
init', you'll have to reconfigure the GNU/Linux system, adding
menu-entries from /hurd/boot/grub.cfg (at least, that's what I did using
some ugly regex parsing in config.scm).

But these are not so interesting, because they will support booting Hurd
only once. Supporting a second boot is more tricky and only has these
even less finished patches

Toggle snippet (4 lines)
fa003825ef DRAFT hurd-boot: Support second boot.
6b34e08e4d DRAFT hurd: Support second boot.

These only work if the filesystem is clean -- which most of the time is
not the case when you restart -- why would you restart if not for a
kernel crash. That means you'll have to boot into GNU/Linux and fsck
/hurd.

I'm using

Toggle snippet (3 lines)
59ae639ac6 DRAFT system: examples: Add devel-hurd.tmpl.

as a convenience to build a childhurd to develop in (as opposed to just
offloading to).

ISTM that I've been the only user of these and they're not all that
great. So yeah.

Greetings,
Janneke

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
Closed
L
L
Ludovic Courtès wrote on 20 Aug 14:37 +0200
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)
87bk1ntlnk.fsf@gnu.org
Hello,

Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (3 lines)
> ISTM that I've been the only user of these and they're not all that
> great. So yeah.

OK, thanks for explaining. Let’s keep that in mind for our future Hurd
endeavors!

Ludo’.
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 72315@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 72315
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch