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


View this message in rfc822 format

From: dan <i <at> dan.games>
To: David Elsing <david.elsing <at> posteo.net>
Cc: dev <at> jpoiret.xyz, Mathieu Othacehe <othacehe <at> gnu.org>, ludo <at> gnu.org, efraim <at> flashner.co.il, 66866 <at> debbugs.gnu.org, janneke <at> gnu.org
Subject: bug#66866: aarch64 system cross compilation + pinebook pro image broken?
Date: Tue, 19 Mar 2024 01:30:31 +0800
Hi David,

Thanks for sharing your discovery.

David Elsing <david.elsing <at> posteo.net> writes:

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

I spent some time digging into the rabbit hole.  After changing 
the lower function of the copy-build-system to look more like the 
lower function of the gnu-build-system, I'm able to cross compile 
alsa-lib without the --no-grafts flag.  The changes I made are 
like:

--8<---------------cut here---------------start------------->8---
diff --git a/guix/build-system/copy.scm 
b/guix/build-system/copy.scm
index d58931b33c..74304b4bfb 100644
--- a/guix/build-system/copy.scm
+++ b/guix/build-system/copy.scm
@@ -66,13 +66,13 @@ (define* (lower name
  (bag
    (name name)
    (system system)
-    (host-inputs `(,@(if source
+    (build-inputs `(,@(if source
                         `(("source" ,source))
                         '())
-                   ,@inputs
+                   ,@native-inputs
                   ;; Keep the standard inputs of 
                   'gnu-build-system'.
                   ,@(standard-packages)))
-    (build-inputs native-inputs)
+    (host-inputs inputs)
    (outputs outputs)
    (build copy-build)
    (arguments (strip-keyword-arguments private-keywords 
    arguments))))
--8<---------------cut here---------------end--------------->8---

Can we put everything inside build-inputs?  From my understanding, 
copy-build-system shouldn't care about cross-compilation at all.

Any feedback on this would be really helpful.

Best,
-- 
dan




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.