guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Deprecating legacy build phase style when cross-compiling vs. native


From: Josselin Poiret
Subject: Deprecating legacy build phase style when cross-compiling vs. native
Date: Wed, 30 Mar 2022 17:17:03 +0200

Hello everyone,

Following a report on IRC [1] that nss-certs wouldn't cross-build, I
found out that the old syntax of using %output instead of the shinier
$output was still supported only when native-compiling, and not when
cross-compiling, at least for build-systems inheriting from gnu.

Looking at guix/build-system/gnu.scm [2], we have gnu-build
vs. gnu-cross-build, which are responsible for native vs. cross-builds.
The former uses with-build-variables to set the legacy build variables
such as %output and %outputs (see the def in guix/gexp.scm), whereas the
latter does not, only doing so manually and so omitting %output.

This means that packages that were not updated to fit the new style
should all fail to cross-compile.  This simple bug could be resolved by
adding %output to gnu-cross-build, however as was argued on IRC this is
now undocumented behaviour and we'd rather switch all packages to the
new style instead.  While I 100% agree with this, I think we should have
a uniform deprecation policy for this matter, and that there shouldn't
be such a disparity between cross and native builds.

What do you all think?

[1] https://logs.guix.gnu.org/guix/2022-03-30.log#150521
[2] 
https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build-system/gnu.scm?id=1c2da6603565bafba58b81742ce705dc8becb2f7

Best,
-- 
Josselin Poiret



reply via email to

[Prev in Thread] Current Thread [Next in Thread]