GNU bug report logs - #66866
Grafting breaks cross-compilation

Previous Next

Package: guix;

Reported by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>

Date: Wed, 1 Nov 2023 01:57:01 UTC

Severity: important

Full log


Message #33 received at 66866 <at> debbugs.gnu.org (full text, mbox):

From: David Elsing <david.elsing <at> posteo.net>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: dev <at> jpoiret.xyz, i <at> dan.games, ludo <at> gnu.org, efraim <at> flashner.co.il,
 66866 <at> debbugs.gnu.org, janneke <at> gnu.org
Subject: Re: bug#66866: aarch64 system cross compilation + pinebook pro
 image broken?
Date: Sun, 11 Feb 2024 19:34:27 +0000
Hello,

Mathieu Othacehe <othacehe <at> gnu.org> writes:

> I could narrow it down somehow.

Starting from alsa-lib, I narrowed it down further. I found that the
problem is actually when an input of the package uses copy-build-system.

In the following example, the cross-compilation (with
--target=x86_64-linux-gnu) for testp2 and testp3 works fine. Their
respective inputs are testinput2 (built with trivial-build-system) and
the hello package (built with gnu-build-system).
For testp1 however, whose input testinput1 is created
with copy-build-system, the same thing as for alsa-lib (which depends on
two packages built with copy-build-system) happens: Bootstrap packages
are starting to be built if grafts are used. The outputs of both
testinput1 and testinput2 do not contain store references, so that is
not the issue. It is also no problem to build the packages testinput1,
testinput2 or hello with grafts.

Is there something special about copy-build-system which is not the case
for trivial-build-system and gnu-build-system? I noticed that in
(guix build-system trival) and (guix build-system gnu), there is a
special case for cross-compilation, while in (guix build-system copy),
the same code is used as for a normal build. I don't see why this could
cause an issue with grafts though.

--8<---------------cut here---------------start------------->8---
(define-module (cc-test)
 #:use-module (guix build-system copy)
 #:use-module (guix build-system gnu)
 #:use-module (guix build-system trivial)
 #:use-module (gnu packages base)
 #:use-module (guix packages)
 #:use-module (guix gexp))

(define-public testinput1
  (package
    (name "testinput1")
    (version "0")
    (source
     (computed-file
      "testp1-src"
      #~(begin
          (mkdir #$output)
          (mkdir (string-append #$output "/dummy")))))
    (build-system copy-build-system)
    (arguments (list #:install-plan ''(("dummy" "dummy"))))
    (home-page "")
    (synopsis "")
    (description "")
    (license #f)))

(define-public testinput2
  (package
    (name "testinput2")
    (version "0")
    (source #f)
    (build-system trivial-build-system)
    (arguments
     (list
      #:builder
      #~(begin
          (mkdir #$output)
          (mkdir (string-append #$output "/dummy")))))
    (home-page "")
    (synopsis "")
    (description "")
    (license #f)))

(define-public testp1
  (package
    (name "testp1")
    (version "0")
    (source #f)
    (build-system trivial-build-system)
    (arguments
     (list
      #:builder #~(mkdir #$output)))
    (inputs (list testinput1))
    (home-page "")
    (synopsis "")
    (description "")
    (license #f)))

(define-public testp2
  (package
    (name "testp2")
    (version "0")
    (source #f)
    (build-system trivial-build-system)
    (arguments
     (list
      #:builder #~(mkdir #$output)))
    (inputs (list testinput2))
    (home-page "")
    (synopsis "")
    (description "")
    (license #f)))

(define-public testp3
  (package
    (name "testp3")
    (version "0")
    (source #f)
    (build-system trivial-build-system)
    (arguments
     (list
      #:builder #~(mkdir #$output)))
    (inputs (list hello))
    (home-page "")
    (synopsis "")
    (description "")
    (license #f)))
--8<---------------cut here---------------end--------------->8---

Best,
David




This bug report was last modified 1 year and 38 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.