On 23-07-2022 22:43, Liliana Marie Prikler wrote:
On 23-07-2022 17:11, Liliana Marie Prikler wrote:
+      (propagated-inputs (list daikichi))
It's used in the Makefile, so I'd have expected native-inputs here --
does "guix build fortunes-jkirchartz --target=aarch64-linux-gnu" or
such work?
That's what I tried to explain in the comment above.  Because I'm using
native size and endianness, cross compilation only works if the two are
the same.  For example, you could theoretically cross-compile from
x86_64 to aarch64 little endian, but not from aarch64 little endian to
aarch64 big endian.  IMHO that restriction is big enough to practically
make it "not cross-compilable".

OK, I read over the the comment that it's not cross-compilable. But now you are writing it is cross-compilable in restricted contexts. So "guix build --target=aarch64-linux-gnu --system=x86_64-linux-gnu" should work (IIUC they have the same sizes and endianness, though not 100% sure).

(Unfortunately there is currently not a method to specify that packages are not cross-compilable in restricted contexts ...)

However, that's was I was trying to say -- what I tried to say, is that by sorting the inputs incorrectly it _becomes_ not cross-compilable, so once daikichi supports cross-compilation you (generic you, not you in particular) will have to modify the package to move daikichi to native-inputs, and in the mean time people are misled by this package definition on how native / non-native works. Actually, this not only applies to the future, but to the present, because IIUC aarch64 and x86_64 are sufficiently similar for "guix build --target=aarch64-linux-gnu --system=x86_64-linux-gnu" to be able to work except for daikichi being compiled for the wrong architecture currently.

Even better would be if daikichi had a cross-compiler mode, where you can compile to another endianness or size. (Or simpler, work with a fixed endianness and integer size such that cross-compilation concerns disappear entirely, but there's more than one way to do it.)

Another problem is that currently it is propagated, but daikichi is not a dependency of fortunes-jkirchartz.

Greetings,
Maxime.