Hi!
I can now reproduce this error locally. Consider the following file:
--8<---------------cut here---------------start------------->8---
(define-module (abi-error)
#:use-module (gnu system file-systems)
#:export (bla test))
(define bla (file-system
(device (file-system-label "my-root"))
(mount-point "/")
(type "ext4")))
--8<---------------cut here---------------end--------------->8---
If crosscompiled on x64 to arm32 using (this is what `compiled-modules`
in gexp.scm does, at least as far i can tell)
--8<---------------cut here---------------start------------->8---
(use-modules (system base compile))
(use-modules (system base target))
(with-target "arm-linux-gnueabihf"
(lambda () (compile-file "abi-error.scm" #:output-file "abi-error.go")))
--8<---------------cut here---------------end--------------->8---
loading the module in an emulated arm32 guile repl fails with an abi
error:
--8<---------------cut here---------------start------------->8---
icepic@G16-Buck:~/guix$ guix shell --container --system=armhf-linux guix guile
file bash which coreutils
icepic@G16-Buck ~/guix [env]$ guix repl -L .
GNU Guile 3.0.9
Copyright (C) 1995-2023 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guix-user)> ,use (abi-error)
While executing meta-command:
Throw to key `record-abi-mismatch-error' with args `(abi-check "~a: record ABI
mismatch; recompilation needed" (#<record-type <file-system>>) ())'
--8<---------------cut here---------------end--------------->8---
But if compiled direclty in qemu on arm32 it works without abi-error,
see
--8<---------------cut here---------------start------------->8---
icepic@G16-Buck:~/guix$ guix shell --container --system=armhf-linux guix guile
file bash which coreutils
icepic@G16-Buck ~/guix [env]$ guix repl compile.scm
icepic@G16-Buck ~/guix [env]$ guix repl -L .
GNU Guile 3.0.9
Copyright (C) 1995-2023 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guix-user)> ,use (abi-error)
scheme@(guix-user)> bla
$1 = #<<file-system> device: #<file-system-label "my-root"> mount-point: "/"
type: "ext4" flags: () options: #f mount?: #t mount-may-fail?: #f
needed-for-boot?: #f check?: #t skip-check-if-clean?: #t repair: preen
create-mount-point?: #f dependencies: () shepherd-requirements: () location:
((filename . "abi-error.scm") (line . 4) (column . 12))>
--8<---------------cut here---------------end--------------->8---
where `compile.scm` is simply
--8<---------------cut here---------------start------------->8---
(use-modules (system base compile))
(use-modules (system base target))
(compile-file "abi-error.scm" #:output-file "abi-error.go")
--8<---------------cut here---------------end--------------->8---
This is not what one expect, is it?
Interestingly it works if `aarch64-linux-gnu` instead of
`arm-linux-gnueabihf` is used.
So... it looks like there is a bug in cross-compilation support for
arm32 in guile?
--
Best regards
Christoph