Subject: bug#57127: unzip fails to cross-compile

From: Maxime Devos <[email-masked]>
Date: Thu, 11 Aug 2022 10:48:35 +0200

On 11-08-2022 00:06, Andrew Patterson wrote:
> unzip fails to build when cross-compiling (at least from x86_64 
> linux), complaining that '%output' is unbound.

Change #:make-flags to use a G-exp instead of a S-exp and replace the 
undocumented %output by the #$output.

For consistency, you can do the same for #:phases.

For simplicity, I recommend not using ` for argument but 'list': 
(arguments (list #:phases #~(modify-phases ...) #:make-flags #~(list ...))).

>   It gives identical errors when compiling for aarch64, riscv64, and 
> arm. Interestingly, it gives the same errors when explicitly building 
> for x86_64 on an x86_64 machine, even though I would expect doing so 
> to compile as normal.

Technically that's cross-compilation from Guix perspective, though maybe 
it should just compile natively in that case.

> On my x86_64 machines, 'guix show unzip' does only have x86_64-linux 
> and i686-linux in the 'systems' list, but that's also true of htop, 
> which does cross-compile.  (Also, why does it do that?  The same 
> command on my aarch64 machine shows many more system types.)

I don't know.

Greetings,
Maxime.