diff mbox

[bug#62307,core-updates,00/15] Update Hurd and fix build failures

Message ID 87pm90bzva.fsf_-_@gnu.org
State New
Headers show

Commit Message

Ludovic Courtès March 22, 2023, 2:54 p.m. UTC
Hi,

Josselin Poiret <dev@jpoiret.xyz> skribis:

> * gnu/packages/base.scm (glibc/fix-for-hurd-cross): New variable.
> (glibc/hurd-headers): Inherit it.
> * gnu/packages/patches/glibc-hurd-add-freestanding-for-configure.patch:
> * gnu/packages/patches/glibc-hurd-add-freestanding-to-cppflags.patch: New files
> * gnu/local.mk (dist_patch_DATA): Register patches.

I’d like to keep this approach (defining a package variant and carrying
Hurd-specific patches) as a last resort.

If I’m not mistaken, we should be able to achieve the same result with a
patch like this one (untested):
How does that sound?

Thanks,
Ludo’.

Comments

Josselin Poiret March 28, 2023, 5:07 p.m. UTC | #1
Hi Ludo,

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

> Hello Guix!
>
> I have good news and bad news.
>
> The bad news is that an image built with:
>
>   ./pre-inst-env guix system image -t hurd-qcow2 \
>       gnu/system/examples/bare-hurd.tmpl
>
> fails to boot: it hangs right at:
>
>   (system* "/hurd/mach-defpager")
>
> Basically, ‘system*’ doesn’t work at the early-boot REPL.  This
> was not surprising given <https://issues.guix.gnu.org/61095>, but
> it is now that I’ve fixed it.  I’ve also confirmed that the same
> binary works on a “current” (master) childhurd, which means it
> could be something with the new ‘exec’ server or anything in between.
> I think we can keep investigating that separately.
>
> The good news is that ‘--target=i586-pc-gnu’ is back to life.  :-)
> Compared to Josselin’s initial patch set, I made the following changes:
>
>   • MiG is built from a tarball (which I’ll upload to
>     ftp.gnu.org/gnu/guix/mirror after review); building from
>     Git introduces a circular dependency in native i586-gnu builds,
>     hence the tarball.
>
>   • The glibc ‘configure’ issue is worked around in a less invasive
>     way as I proposed earlier.
>
>   • The GCC/libstdc++ patch application is likewise simplified,
>     without introducing a world rebuild.
>
>   • ‘system*’ in Guile is fixed.
>
>   • ‘linux-pam’ builds again on GNU/Hurd.
>
> If there are no objections I’d like to push that soonish so we can
> move on with the branch.
>
> Thoughts?

Just had a look and built locally.  LGTM!  Great work (even though it's
still unfinished, but that's for another day).

Best,
Ludovic Courtès March 30, 2023, 10:48 a.m. UTC | #2
Hi Josselin,

Josselin Poiret <dev@jpoiret.xyz> skribis:

> Just had a look and built locally.  LGTM!  Great work (even though it's
> still unfinished, but that's for another day).

Thanks for testing!  Pushed as 14cd517e0cb8829b06b5a49f91c762c4a0e52eb5.
I uploaded the MiG tarball to ftp.gnu.org/gnu/guix and adjusted the URL
accordingly.

Ludo’.
diff mbox

Patch

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 2959616af6..9db12bcf9f 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -577,7 +577,20 @@  (define* (cross-libc* target
            ((#:configure-flags flags)
             `(cons ,(string-append "--host=" target)
                    ,(if (target-hurd? target)
-                        `(cons "--disable-werror" ,flags)
+                        `(cons* "--disable-werror"
+
+                                ;; 'configure' in glibc 2.35 omits to pass
+                                ;; '-ffreestanding' when detecting Mach
+                                ;; headers.  This is fixed in glibc commits
+                                ;; 8b8c768e3c701ed1993789bb46acb8a12c7a93df
+                                ;; and
+                                ;; 7685630b98ca2a3f5de86eadf130993e6cf998a0;
+                                ;; as a workaround, bypass those tests.
+                                "ac_cv_header_mach_mach_types_defs=yes"
+                                "ac_cv_header_mach_mach_types_h=yes"
+                                "ac_cv_header_mach_machine_ndr_def_h=yes"
+                                "libc_cv_mach_task_creation_time=yes"
+                                ,flags)
                         flags)))
            ((#:phases phases)
             `(modify-phases ,phases