bug#57127: unzip fails to cross-compile

2022-08-11 Thread Andrew Patterson

unzip now cross-compiles successfully.  Thank you!

--
Andrew Patterson





bug#57127: unzip fails to cross-compile

2022-08-11 Thread Tobias Geerinckx-Rice via Bug reports for GNU Guix
(Now home:) fixed in 45db0ca5e9.

Can you confirm that it works for you?

Closing,

T G-R

Sent on the go.  Excuse or enjoy my brevity.





bug#57127: unzip fails to cross-compile

2022-08-11 Thread Tobias Geerinckx-Rice via Bug reports for GNU Guix
Hi Andrew,

This is a bug in Guix, not really related to cross-compiling (hence you can 
stop cross-testing and reporting different architectures, although the effort 
is appreciated!).

%output is practically deprecated, but is still present in a good number of 
packages.  Sometimes it happens to work, because a specific build system 
explicitly kept support for it.  Some build systems don't, making support for 
it feel unreliable.  It is.  %output is obsolete for new code.

What also happens is that build systems still support it in the well-tested 
native build path, but not when cross-compiling.  That seems to be the case 
here.

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

You don't define what you mean by 'explicitly building'.

If you mean --target=x86_64-linux-gnu, why would it not fail?  You're 
cross-compiling.  Guix doesn't silently fall back to a non-cross build when the 
architectures match, no should it IMO.

The fix should be simple: rewrite unzip to use gexps and hence #$output.  Why 
didn't I simply do so yet?  Because too many packages depend on unzip to simply 
do so on master.  There's probably a way around that, but I'll try it when I'm 
back at a computer.

Kind regards,

T G-R

Sent on the go.  Excuse or enjoy my brevity.





bug#57127: unzip fails to cross-compile

2022-08-11 Thread Maxime Devos


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.


OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature