unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* GMP GCC C++ Hurd cross-build failure on core-updates
@ 2022-12-04  7:23 zamfofex
  2022-12-04 16:46 ` Joshua Branson
  2022-12-05 16:08 ` Ludovic Courtès
  0 siblings, 2 replies; 10+ messages in thread
From: zamfofex @ 2022-12-04  7:23 UTC (permalink / raw)
  To: guix-devel@gnu.org

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

Hello, Guix! I have been trying to update the Hurd packages to their latest commits in the hopes that I can eventually get networking with netdde functioning.

In <https://issues.guix.gnu.org/51770>, I got something that seemed to be working at first (at least it progressed farther than the status quo at the time), but eventually I got an error that seemed related to Mig, which I had not updated in that patch set.

Updating Mig required a more recent glibc than what was available in Guix at the time, so I worked on <https://issues.guix.gnu.org/54832> to update glibc.

Now that the recent glibc is on core-updates, I picked up my work once again. I updated the packages to the latest commits, and updated Mig! However, I ran into an issue while trying to build a system image. The issue is that GMP fails to cross‐compile during the ‘configure’ phase becase the cross‐compiling ‘g++’ is not functional.

When checking whether ‘g++’ can compile executables during ‘configure’, ‘g++’ is unable to link the executables because some ‘pthread_*’ symbols required by libstdc++ are missing from libc. And when checking using ‘readelf’, they are indeed missing from the cross‐built libc, which instead contains similar ‘__pthread_*’ symbols.

I don’t know for sure what the issue is, but I highly suspect libstdc++ is being compiled against the native glibc headers, rather than the cross‐built glibc headers like it should.

Note: Currently, trying to cross‐build packages from core‐updates for the Hurd will fail while compiling glibc, since the Hurd package is too outdated for that version of glibc.

I’ll attach a diff (for core-updates) with the updated Hurd packages to this email. To verify the behavior I’m describing, try running:

- - - - -
./pre-inst-env guix build --target=i586-pc-gnu gmp
- - - - -

Any kind of assistance would be appreciated! Thanks in advance.

[-- Attachment #2: hurd.diff --]
[-- Type: application/octet-stream, Size: 10378 bytes --]

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 1dcec3ea3c..617202bb53 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2020, 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2020 Rene Saavedra <pacoon@protonmail.com>
+;;; Copyright © 2021, 2022 zamfofex <zamfofex@twdb.moe>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -61,13 +62,9 @@ (define (hurd-system?)
   "Return true if the current system is the Hurd."
   (and=> (%current-system) target-hurd?))
 
-(define (hurd-source-url version)
-  (string-append "mirror://gnu/hurd/hurd-"
-                 version ".tar.gz"))
-
 (define-public gnumach-headers
-   (let ((commit "097f9cf735ffa1212b828682ad92f0f6c5f1c552")
-         (revision "1"))
+   (let ((commit "d30481122a5d24ad6b921062f93b9172ef922fc3")
+         (revision "2"))
      (package
        (name "gnumach-headers")
        (version (git-version "1.8" revision commit))
@@ -80,7 +77,7 @@ (define-public gnumach-headers
            (file-name (git-file-name "gnumach" version))
            (sha256
             (base32
-             "0q36z7k02bykrld90zaxbhyzxlmwlqqs4divgir6ix38zsp6icqk"))))
+             "14z38nsyijilq37lrgmlx214fsmlv2jdzipwp2rq4kfzhdmg75vq"))))
        (build-system gnu-build-system)
        (arguments
         `(#:phases
@@ -109,42 +106,46 @@ (define-public gnumach-headers
        (license gpl2+))))
 
 (define-public mig
-  (package
-    (name "mig")
-    (version "1.8")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (string-append "mirror://gnu/mig/mig-"
-                          version ".tar.gz"))
-      (sha256
-       (base32
-        "1gyda8sq6b379nx01hkpbd85lz39irdvz2b9wbr63gicicx8i706"))))
-    (build-system gnu-build-system)
-    ;; Flex is needed both at build and run time.
-    (inputs (list gnumach-headers flex perl))
-    (native-inputs
-     (list flex bison))
-    (arguments `(#:tests? #f
-                 #:phases
-                 (modify-phases %standard-phases
-                   (add-after 'install 'patch-non-shebang-references
-                     (lambda* (#:key build inputs outputs #:allow-other-keys)
-                       (let ((perl (assoc-ref inputs "perl"))
-                             (out  (assoc-ref outputs "out")))
-                         (substitute* (string-append out "/bin/mig")
-                           (("perl ") (string-append perl "/bin/perl ")))
-                         #t))))))
-    (home-page "https://www.gnu.org/software/hurd/microkernel/mach/mig/gnu_mig.html")
-    (synopsis "Mach 3.0 interface generator for the Hurd")
-    (description
-     "GNU MIG is the GNU distribution of the Mach 3.0 interface generator
+  (let ((commit "7063f0aefd8a8c3c8b610ef6168cddfb2141fa12")
+         (revision "1"))
+    (package
+      (name "mig")
+      (version (git-version "1.8" revision commit))
+      (source
+        (origin
+          (method git-fetch)
+          (uri (git-reference
+                 (url "https://git.savannah.gnu.org/git/hurd/mig.git")
+                 (commit commit)))
+          (file-name (git-file-name name version))
+          (sha256
+           (base32
+            "06mk7a11shv4x2m9714plyy6ky65zzi27r06jr237jyb3z1h7f4r"))))
+      (build-system gnu-build-system)
+      ;; Flex is needed both at build and run time.
+      (inputs (list gnumach-headers flex perl))
+      (native-inputs
+        (list autoconf automake bison flex))
+      (arguments `(#:tests? #f
+                   #:phases
+                   (modify-phases %standard-phases
+                     (add-after 'install 'patch-non-shebang-references
+                       (lambda* (#:key build inputs outputs #:allow-other-keys)
+                         (let ((perl (assoc-ref inputs "perl"))
+                               (out  (assoc-ref outputs "out")))
+                           (substitute* (string-append out "/bin/mig")
+                             (("perl ") (string-append perl "/bin/perl ")))
+                           #t))))))
+      (home-page "https://www.gnu.org/software/hurd/microkernel/mach/mig/gnu_mig.html")
+      (synopsis "Mach 3.0 interface generator for the Hurd")
+      (description
+       "GNU MIG is the GNU distribution of the Mach 3.0 interface generator
 MIG, as maintained by the GNU Hurd developers for the GNU project.
 You need this tool to compile the GNU Mach and GNU Hurd distributions,
 and to compile the GNU C library for the Hurd.  Also, you will need it
 for other software in the GNU system that uses Mach-based inter-process
 communication.")
-    (license gpl2+)))
+      (license gpl2+))))
 
 (define-public mig/32-bit
   ;; When cross-compiling from x86_64-linux to i586-gnu, we need this 32-bit
@@ -160,8 +161,8 @@ (define-public mig/32-bit
 (define-public hurd-headers
   ;; Resort to a post-0.9 snapshot that provides the 'file_utimens' and
   ;; 'file_exec_paths' RPCs that glibc 2.28 expects.
-  (let ((revision "1")
-        (commit "91a51672ff4cfe1f1a0712b4c542ded3081c825b"))
+  (let ((revision "2")
+        (commit "9ce2bd90d6ee3f4128b32f9db0704285e2010afa"))
    (package
      (name "hurd-headers")
      (version (git-version "0.9" revision commit))
@@ -172,7 +173,7 @@ (define-public hurd-headers
                      (commit commit)))
                (sha256
                 (base32
-                 "16k9wkahz9wasviijz53n6i13nmiwa9fs64ikf1jqh8rl60hw7cz"))
+                 "09rdpr7xrkghiw9y9smasyymsyj8zyn19x0fbhpypk33i9pcrk03"))
                (file-name (git-file-name name version))))
      (build-system gnu-build-system)
      (native-inputs
@@ -194,7 +195,6 @@ (define-public hurd-headers
                             ;; Reduce set of dependencies.
                             "--without-parted"
                             "--disable-ncursesw"
-                            "--disable-test"
                             "--without-libbz2"
                             "--without-libcrypt"
                             "--without-libz"
@@ -208,7 +208,10 @@ (define-public hurd-headers
                             "ac_cv_func_file_exec_paths=no"
                             "ac_cv_func_exec_exec_paths=no"
                             "ac_cv_func__hurd_exec_paths=no"
-                            "ac_cv_func_file_futimens=no")
+                            "ac_cv_func__hurd_libc_proc_init=no"
+                            "ac_cv_func_file_futimens=no"
+                            "--without-rump"
+                            "--without-acpica")
 
         #:tests? #f))
      (home-page "https://www.gnu.org/software/hurd/hurd.html")
@@ -316,14 +319,14 @@ (define unifont
   (origin
     (method url-fetch)
     (uri
-     "http://unifoundry.com/pub/unifont-7.0.06/font-builds/unifont-7.0.06.bdf.gz")
+     "https://unifoundry.com/pub/unifont/unifont-15.0.01/font-builds/unifont-15.0.01.bdf.gz")
     (sha256
      (base32
-      "0p2vhnc18cnbmb39vq4m7hzv4mhnm2l0a2s7gx3ar277fwng3hys"))))
+      "140mrr3ryl033i9wyi8mrbvs10i499fb0xr1pxks1f1n1a8bmp8z"))))
 
 (define dde-sources
   ;; This is the current tip of the dde branch
-  (let ((commit "ac1c7eb7a8b24b7469bed5365be38a968d59a136"))
+  (let ((commit "ce8810277fa3584eb36ecb23da58394153fabe6f"))
     (origin
       (method git-fetch)
       (uri (git-reference
@@ -331,31 +334,29 @@ (define dde-sources
             (commit commit)))
       (sha256
        (base32
-        "1vryinbg75xpydfrv9dbgfnds6knlh8l8bk2rxp32y9dc58z0692"))
+        "0ygk7jm4jmhpvh0zzi5bk638242z7sbcab2i57fkb4y2mmdkjjbw"))
       (file-name (git-file-name "dde" commit)))))
 
 (define-public hurd
   (package
     (name "hurd")
     (version (package-version hurd-headers))
-    (source (origin (inherit (package-source hurd-headers))
-                    (patches (search-patches "hurd-cross.patch"
-                                             "hurd-xattr.patch"))))
+    (source (package-source hurd-headers))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'prepare-dde
            (lambda* (#:key native-inputs inputs #:allow-other-keys)
              (substitute* "Makefile"
-               (("libbpf ")
-                "libbpf libmachdev libmachdevdde libddekit"))
+               (("libmachdev ")
+                "libmachdev libmachdevdde libddekit "))
              (for-each make-file-writable (find-files "."))
              (let ((dde (or (assoc-ref inputs "dde-sources")
                             (assoc-ref native-inputs "dde-sources"))))
                (for-each (lambda (dir)
                            (copy-recursively
                             (string-append dde "/" dir ) dir))
-                         '("libmachdev" "libmachdevdde" "libddekit")))
+                         '("libmachdevdde" "libddekit")))
              #t))
          (add-after 'unpack 'find-tirpc
            (lambda* (#:key inputs #:allow-other-keys)
@@ -548,8 +549,8 @@ (define-public hurd
     (license gpl2+)))
 
 (define-public netdde
-  (let ((commit "4a1016f130b6f2065d3f088325e5fb0b2997ae12")
-        (revision "1"))
+  (let ((commit "be828e44b332ccfeef6f687d69b5d74b2a16323d")
+        (revision "2"))
     (package
       (name "netdde")
       ;; The version prefix corresponds to the version of Linux from which the
@@ -562,7 +563,7 @@ (define-public netdde
                       (commit commit)))
                 (sha256
                  (base32
-                  "1njv9dszq4lj05yq4v9j5v247hfghpzvvz4hzy0khjjr35mw7hr8"))
+                  "1vixmv9xdpcfp8ckv4h3fqhby0dhn6n8x0s89mm1a3yi6ybrxvxj"))
                 (file-name (git-file-name name commit))))
       (build-system gnu-build-system)
       (arguments
diff --git a/gnu/system.scm b/gnu/system.scm
index a94f0a9a1f..d31f6ec495 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -771,9 +771,7 @@ (define (hurd-default-essential-services os)
           %boot-service
           %hurd-startup-service
           %activation-service
-          (service shepherd-root-service-type
-                   (shepherd-configuration
-                    (shepherd shepherd-0.8)))     ;no Fibers
+          (service shepherd-root-service-type)
 
           (service user-processes-service-type)
           (account-service (append (operating-system-accounts os)

^ permalink raw reply related	[flat|nested] 10+ messages in thread
* GMP GCC C++ Hurd cross-build failure on core-updates
@ 2022-12-15  7:24 Nathan Dehnel
  2022-12-15 11:17 ` Svante Signell
  0 siblings, 1 reply; 10+ messages in thread
From: Nathan Dehnel @ 2022-12-15  7:24 UTC (permalink / raw)
  To: zamfofex, guix-devel

You could try seeing what they're doing here to cross-build
https://github.com/flavioc/cross-hurd
It worked last time I ran it (which was admittedly a while ago)


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

end of thread, other threads:[~2022-12-19 21:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-04  7:23 GMP GCC C++ Hurd cross-build failure on core-updates zamfofex
2022-12-04 16:46 ` Joshua Branson
2022-12-05 16:08 ` Ludovic Courtès
2022-12-06 10:06   ` zamfofex
2022-12-06 11:20     ` zamfofex
2022-12-08 15:43       ` Ludovic Courtès
2022-12-19 21:06     ` Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2022-12-15  7:24 Nathan Dehnel
2022-12-15 11:17 ` Svante Signell
2022-12-19 10:57   ` Svante Signell

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