[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#68263] [PATCH 0/2] libsmbios: Restrict to only supported systems.
From: |
Mathieu Othacehe |
Subject: |
[bug#68263] [PATCH 0/2] libsmbios: Restrict to only supported systems. |
Date: |
Mon, 08 Jan 2024 21:14:29 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hello,
So, here is what happens:
You are adding
--8<---------------cut here---------------start------------->8---
(supported-systems (list "i686-linux" "x86_64-linux"))
--8<---------------cut here---------------end--------------->8---
to libsmbios. That is fine, it prints:
--8<---------------cut here---------------start------------->8---
package libsmbios@2.4.3 does not support aarch64-linux
--8<---------------cut here---------------end--------------->8---
when running `guix build -s aarch64-linux libsmbios`. It doesn't print
anything when cross-compiling this way: `guix build
--target=aarch64-linux-gnu libsmbios`, tries to cross-compile and fails
because of the <sys/io.h> header as you noticed.
It makes me think that we should turn `supported-systems` into
`supported-platforms` so that we get the same kind of warning when
trying to cross-compile. But that's another topic.
Now regarding your second patch, this part:
--8<---------------cut here---------------start------------->8---
(if (supported-package? libsmbios
(or (%current-target-system)
(%current-system)))
--8<---------------cut here---------------end--------------->8---
will actually call (supported-package? libsmbios "aarch64-linux-gnu")
when cross-compiling, which prints this error message:
--8<---------------cut here---------------start------------->8---
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
dynamic linker name not known for this system "aarch64-linux-gnu"
--8<---------------cut here---------------end--------------->8---
It has nothing to do with ABI break and .go files. It is just that
supported-package? is expecting a system not a target.
What you could do is rewriting this part as:
--8<---------------cut here---------------start------------->8---
(if (supported-package? libsmbios
(if (%current-target-system)
(platform-target->system
(%current-target-system))
(%current-system)))
--8<---------------cut here---------------end--------------->8---
which works as expected because the target is translated into a
system. A better fix would be to have supported-package? deal with
both systems and targets internally.
Then fwupd cross-compilation fails because other dependencies such as
gts fail to cross-compile, but that irrelevant here.
Thanks,
Mathieu
- [bug#68263] [PATCH 0/2] libsmbios: Restrict to only supported systems., Simon South, 2024/01/05
- [bug#68263] [PATCH 1/2] gnu: libsmbios: Restrict to only supported systems., Simon South, 2024/01/05
- [bug#68263] [PATCH 2/2] gnu: fwupd: Depend on libsmbios only on supported systems., Simon South, 2024/01/05
- [bug#68263] [PATCH 0/2] libsmbios: Restrict to only supported systems., Mathieu Othacehe, 2024/01/07
- [bug#68263] [PATCH 0/2] libsmbios: Restrict to only supported systems., Efraim Flashner, 2024/01/07
- [bug#68263] [PATCH 0/2] libsmbios: Restrict to only supported systems., Mathieu Othacehe, 2024/01/08
- [bug#68263] [PATCH 0/2] libsmbios: Restrict to only supported systems., Simon South, 2024/01/08
- [bug#68263] [PATCH 0/2] libsmbios: Restrict to only supported systems., Efraim Flashner, 2024/01/08
- [bug#68263] [PATCH 0/2] libsmbios: Restrict to only supported systems., Simon South, 2024/01/08
- [bug#68263] [PATCH 0/2] libsmbios: Restrict to only supported systems.,
Mathieu Othacehe <=
- [bug#68263] [PATCH 0/2] libsmbios: Restrict to only supported systems., Simon South, 2024/01/08
[bug#68263] [PATCH v2 0/2] libsmbios: Restrict to only supported systems., Simon South, 2024/01/10