unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#45618: development childhurd fails to build: glib@2.62.6: build system `meson'
@ 2021-01-03  8:19 Jan Nieuwenhuizen
  2021-01-14 16:03 ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Nieuwenhuizen @ 2021-01-03  8:19 UTC (permalink / raw)
  To: 45618

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

Hi,

We have been using the attached devel-hurd.tmpl (see attched) to add a
childhurd service that has a development environment.

On current master

    395489cdc959c3f3c026bf545c3ed95efc9919f0
    gnu: spice-vdagent: Update to 0.20.0.

building

    ./pre-inst-env guix system disk-image --target=i586-pc-gnu gnu/system/examples/devel-hurd.tmpl

fail with

--8<---------------cut here---------------start------------->8---
guix system: error: gnu/packages/glib.scm:181:2: glib@2.62.6: build system `meson' does not support cross builds
--8<---------------cut here---------------end--------------->8---

I guess we are missing a (some?) tests for the Hurd.

Anyway, I started a bisecting round last night and it found

--8<---------------cut here---------------start------------->8---
1b0cda6b44 gnu: qemu: Extend I/O test time-outs.
--8<---------------cut here---------------end--------------->8---

which was an honest debugging leftover, fixed promptly in

--8<---------------cut here---------------start------------->8---
b070e3f810 gnu: qemu: Remove left-over debugging statement.
--8<---------------cut here---------------end--------------->8---

Luckily, this fixed commit also builds the childhurd again...so I'm
starting a new bisect.

This is not funny; it means I either cannot reconfigure, or I'm losing
my childhurd...grmbl.  Sorry for not noticing this earlier!

Greetings,
Janneke


[-- Attachment #2: devel-hurd.tmpl --]
[-- Type: application/octet-stream, Size: 6415 bytes --]

;; -*-scheme-*-

;; This is an operating system configuration template for a "bare bones
;; development" setup, with no X11 display server.

;; chmod a+w /dev/null
;;
;; GUIX_PROFILE=/run/current-system/bootstrap-profile
;; . $GUIX_PROFILE/etc/profile
;;
;; guix build hello

(use-modules (srfi srfi-1)
             (ice-9 match)
             (gnu)
             (gnu system hurd)
             (guix gexp)
             (guix monads)
             (guix packages)
             (guix profiles)
             (guix store)
             (guix utils))
(use-service-modules ssh)
(use-package-modules base bootstrap commencement compression file gawk gdb
                     less m4 package-management ssh version-control)

(define %default-bootstrap-profile-packages
  (list %bootstrap-gcc %bootstrap-binutils %bootstrap-glibc))

;; XXX works, but clumsy
(define* (bootstrap-packages->profile-entry
          #:optional (bootstrap-packages %default-bootstrap-profile-packages))
  "Return a system entry for the profile containing BOOTSTRAP-PACKAGES."

  (define (cross-bootstrap thing)
    (let ((target (match (%current-target-system)
                    ("i586-pc-gnu" "i586-gnu"))))
      (with-parameters ((%current-system target))
        thing)))

  (define (cross-bootstrap-entry entry)
    (manifest-entry
      (inherit entry)
      (item (cross-bootstrap (manifest-entry-item entry)))))

  (with-monad %store-monad
    (return `(("bootstrap-profile" ,(profile
                                     (content
                                      (map-manifest-entries
                                       cross-bootstrap-entry
                                       (packages->manifest
                                        bootstrap-packages)))))))))

(define bootstrap-profile-service-type
  (service-type (name 'profile)
                (extensions
                 (list (service-extension system-service-type
                                          bootstrap-packages->profile-entry)))
                (compose concatenate)
                (extend append)
                (description
                 "This adds %bootstrap packages to the @dfn{system profile},
available as @file{/run/current-system/profile}.")))

;; XXX works only when put into guix/services.scm
;; (define* (packages->profile-entry packages
;;                                   #:optional
;;                                   (bootstrap-packages
;;                                    %default-bootstrap-profile-packages))
;;   "Return a system entry for the profile containing PACKAGES."

;;   (define (cross-bootstrap thing)
;;     (let ((target (match (%current-target-system)
;;                     ("i586-pc-gnu" "i586-gnu"))))
;;       (with-parameters ((%current-system target))
;;         thing)))

;;   (define (cross-bootstrap-entry entry)
;;     (manifest-entry
;;       (inherit entry)
;;       (item (cross-bootstrap (manifest-entry-item entry)))))

;;   (with-monad %store-monad
;;     (return `(("profile" ,(profile
;;                            (content
;;                             (concatenate-manifests
;;                              (list
;;                               (packages->manifest
;;                                (delete-duplicates packages eq?))
;;                               (map-manifest-entries
;;                                cross-bootstrap-entry
;;                                (packages->manifest bootstrap-packages)))))))))))

;; (define profile-service-type
;;   ;; The service that populates the system's profile---i.e.,
;;   ;; /run/current-system/profile.  It is extended by package lists.
;;   (service-type (name 'profile)
;;                 (extensions
;;                  (list (service-extension system-service-type
;;                                           packages->profile-entry)))
;;                 (compose concatenate)
;;                 (extend append)
;;                 (description
;;                  "This is the @dfn{system profile}, available as
;; @file{/run/current-system/profile}.  It contains packages that the sysadmin
;; wants to be globally available to all the system users.")))

;; (module-define! (resolve-module '(guix services)) 'packages->profile-entry packages->profile-entry)
;; (module-define! (resolve-module '(guix services)) 'profile-service-type profile-service-type)

(define (input->packages input)
  "Return the list of packages in INPUT."
  (match input
    ((label (and (? package?) package) . output)
     (list package))
    (_ '())))

(define %hurd-os
  (operating-system
    (inherit %hurd-default-operating-system)
    (bootloader (bootloader-configuration
                 (bootloader grub-minimal-bootloader)
                 (target "/dev/sdX")))
    (file-systems (cons (file-system
                          (device (file-system-label "hurd"))
                          (mount-point "/")
                          (type "ext2"))
                        %base-file-systems))
    (host-name "guixydevel")
    (timezone "Europe/Berlin")
    (users (cons (user-account
                  (name "guix")
                  (group "users")
                  (supplementary-groups '("wheel")))
                 %base-user-accounts))
    (packages (cons*
               diffutils
               gawk
               gdb-minimal
               git-minimal
               gzip gnu-make m4 openssh-sans-x tar xz
               (append
                (append-map input->packages
                            (fold alist-delete (package-direct-inputs guix)
                                  '("graphviz"
                                    "gnutls" ;; FIXME profile contains conflicting entries for gnutls
                                    "guile"  ;; FIXME profile contains conflicting entries for guile
                                    "po4a")))
                %base-packages/hurd)))
    (services (cons*
               (service bootstrap-profile-service-type %default-bootstrap-profile-packages)
               (service openssh-service-type
                        (openssh-configuration
                         (openssh openssh-sans-x)
                         (use-pam? #f)
                         (port-number 2222)
                         (permit-root-login #t)
                         (allow-empty-passwords? #t)
                         (password-authentication? #t)))
               %base-services/hurd))))

%hurd-os

[-- 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

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

* bug#45618: development childhurd fails to build: glib@2.62.6: build system `meson'
  2021-01-03  8:19 bug#45618: development childhurd fails to build: glib@2.62.6: build system `meson' Jan Nieuwenhuizen
@ 2021-01-14 16:03 ` Jan Nieuwenhuizen
  2021-01-14 21:19   ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Nieuwenhuizen @ 2021-01-14 16:03 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 45618-done

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

Jan Nieuwenhuizen writes:

Hello,

> On current master
>
>     395489cdc959c3f3c026bf545c3ed95efc9919f0
>     gnu: spice-vdagent: Update to 0.20.0.
>
> building
>
>     ./pre-inst-env guix system disk-image --target=i586-pc-gnu gnu/system/examples/devel-hurd.tmpl
>
> fail with
>
> guix system: error: gnu/packages/glib.scm:181:2: glib@2.62.6: build system `meson' does not support cross builds

My bad, turns out to be the new guile-avahi dependency that cannot be
cross-built.

For the archives, find an updated devel-hurd.tmpl attached that removes
guile-avahi.

Greetings,
Janneke


[-- Attachment #2: devel-hurd.tmpl --]
[-- Type: application/octet-stream, Size: 4198 bytes --]

;; -*-scheme-*-

;; This is an operating system configuration template for a "bare bones
;; development" setup, with no X11 display server.

;; chmod a+w /dev/null
;;
;; GUIX_PROFILE=/run/current-system/bootstrap-profile
;; . $GUIX_PROFILE/etc/profile
;;
;; guix build hello

(use-modules (srfi srfi-1)
             (ice-9 match)
             (gnu)
             (gnu system hurd)
             (guix gexp)
             (guix monads)
             (guix packages)
             (guix profiles)
             (guix store)
             (guix utils))
(use-service-modules ssh)
(use-package-modules base bootstrap commencement compression file gawk gdb
                     less m4 package-management ssh version-control)

(define %default-bootstrap-profile-packages
  (list %bootstrap-gcc %bootstrap-binutils %bootstrap-glibc))

;; XXX works, but clumsy
(define* (bootstrap-packages->profile-entry
          #:optional (bootstrap-packages %default-bootstrap-profile-packages))
  "Return a system entry for the profile containing BOOTSTRAP-PACKAGES."

  (define (cross-bootstrap thing)
    (let ((target (match (%current-target-system)
                    ("i586-pc-gnu" "i586-gnu"))))
      (with-parameters ((%current-system target))
        thing)))

  (define (cross-bootstrap-entry entry)
    (manifest-entry
      (inherit entry)
      (item (cross-bootstrap (manifest-entry-item entry)))))

  (with-monad %store-monad
    (return `(("bootstrap-profile" ,(profile
                                     (content
                                      (map-manifest-entries
                                       cross-bootstrap-entry
                                       (packages->manifest
                                        bootstrap-packages)))))))))

(define bootstrap-profile-service-type
  (service-type (name 'profile)
                (extensions
                 (list (service-extension system-service-type
                                          bootstrap-packages->profile-entry)))
                (compose concatenate)
                (extend append)
                (description
                 "This adds %bootstrap packages to the @dfn{system profile},
available as @file{/run/current-system/profile}.")))

(define (input->packages input)
  "Return the list of packages in INPUT."
  (match input
    ((label (and (? package?) package) . output)
     (list package))
    (_ '())))

(define %hurd-os
  (operating-system
    (inherit %hurd-default-operating-system)
    (bootloader (bootloader-configuration
                 (bootloader grub-minimal-bootloader)
                 (target "/dev/sdX")))
    (file-systems (cons (file-system
                          (device (file-system-label "hurd"))
                          (mount-point "/")
                          (type "ext2"))
                        %base-file-systems))
    (host-name "guixydevel")
    (timezone "Europe/Berlin")
    (users (cons (user-account
                  (name "guix")
                  (group "users")
                  (supplementary-groups '("wheel")))
                 %base-user-accounts))
    (packages (cons*
               diffutils
               gawk
               gdb-minimal
               git-minimal
               gzip gnu-make m4 openssh-sans-x tar xz
               (append
                (append-map input->packages
                            (fold alist-delete (package-direct-inputs guix)
                                  '("graphviz"
                                    "guile-avahi" ;; Needs glib => meson => cross-build meson-build-system
                                    "po4a")))
                %base-packages/hurd)))
    (services (cons*
               (service bootstrap-profile-service-type %default-bootstrap-profile-packages)
               (service openssh-service-type
                        (openssh-configuration
                         (openssh openssh-sans-x)
                         (use-pam? #f)
                         (port-number 2222)
                         (permit-root-login #t)
                         (allow-empty-passwords? #t)
                         (password-authentication? #t)))
               %base-services/hurd))))

%hurd-os



[-- 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

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

* bug#45618: development childhurd fails to build: glib@2.62.6: build system `meson'
  2021-01-14 16:03 ` Jan Nieuwenhuizen
@ 2021-01-14 21:19   ` Ludovic Courtès
  2021-01-17 15:59     ` Danny Milosavljevic
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2021-01-14 21:19 UTC (permalink / raw)
  To: 45618; +Cc: jan.nieuwenhuizen

Hi,

Jan Nieuwenhuizen <jan.nieuwenhuizen@verum.com> skribis:

> My bad, turns out to be the new guile-avahi dependency that cannot be
> cross-built.

Good catch, thanks for the fix!

Ludo’.




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

* bug#45618: development childhurd fails to build: glib@2.62.6: build system `meson'
  2021-01-14 21:19   ` Ludovic Courtès
@ 2021-01-17 15:59     ` Danny Milosavljevic
  0 siblings, 0 replies; 4+ messages in thread
From: Danny Milosavljevic @ 2021-01-17 15:59 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: jan.nieuwenhuizen, 45618

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

Hi Ludo,

that is not a fix.  A workaround maybe.

If possible, I'd like the actual fix to be to make the meson build system
support cross compilation.

According to https://mesonbuild.com/Cross-compilation.html :

>Meson has full support for cross compilation. 
[...]
>meson builddir/ --cross-file x86-linux

Also, for the record, I find it a bad idea to switch packages from
gnu-build-system to meson-build-system when the package in question
supports building itself with either, as long as meson-build-system
doesn't support cross-compilation.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2021-01-17 16:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-03  8:19 bug#45618: development childhurd fails to build: glib@2.62.6: build system `meson' Jan Nieuwenhuizen
2021-01-14 16:03 ` Jan Nieuwenhuizen
2021-01-14 21:19   ` Ludovic Courtès
2021-01-17 15:59     ` Danny Milosavljevic

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