GNU bug report logs - #36477
Add Guix System cross-compilation support

Previous Next

Package: guix-patches;

Reported by: Mathieu Othacehe <m.othacehe <at> gmail.com>

Date: Tue, 2 Jul 2019 15:19:02 UTC

Severity: normal

Done: Mathieu Othacehe <m.othacehe <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #173 received at 36477 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Mathieu Othacehe <m.othacehe <at> gmail.com>
Cc: 36477 <at> debbugs.gnu.org
Subject: Re: [bug#36477] [PATCH 08/31] gnu: python: Fix cross-compilation.
Date: Mon, 15 Jul 2019 22:29:00 +0200
This is the second patch in this series with this subject, which
suggests the subject could be adjusted.  :-)

Mathieu Othacehe <m.othacehe <at> gmail.com> skribis:

> * gnu/packages/patches/python-2.7-search-paths.patch: Add cross-compilation
> support.
> * gnu/packages/patches/python-3-search-paths.patch: Ditto.
> * gnu/packages/patches/python-cross-compile.patch: New patch.
> * gnu/local.mk (dist_patch_DATA): Add above new patch.
> * gnu/packages/python.scm (python-2.7)[patches]: Add new patch above,
> [arguments]: Set _PYTHON_HOST_PLATFORM env variable when cross compiling.

[...]

> +++ b/gnu/packages/patches/python-cross-compile.patch
> @@ -0,0 +1,145 @@
> +Patch taken from https://bugs.python.org/issue22724 and augmented with
> +following Nix patch
> +https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interpreters/python/cpython/2.7/cross-compile.patch
> +to fix the whole cross-compilation circus.
> +
> +---
> + Makefile.pre.in | 14 +++++++-------
> + configure       |  5 ++++-
> + setup.py        |  9 ++++++---
> + 3 files changed, 17 insertions(+), 11 deletions(-)

Heh, a non trivial patch!

> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -109,7 +109,8 @@
>                                 "python-2-deterministic-build-info.patch"
>                                 "python-2.7-site-prefixes.patch"
>                                 "python-2.7-source-date-epoch.patch"
> -                               "python-2.7-adjust-tests.patch"))
> +                               "python-2.7-adjust-tests.patch"
> +                               "python-cross-compile.patch"))

Note that this triggers a full rebuild, so we’ll probably have to wait
for the next ‘core-updates’ branch, which we’ll hopefully open soonish.

>             'configure 'patch-lib-shells
>             (lambda _
> +             ,@(if (%current-target-system)
> +                   '((setenv "_PYTHON_HOST_PLATFORM" ""))
> +                   '())

It would be great if you could add a comment saying what component
consumes this environment variable.

Otherwise LGTM.

Thanks!

Ludo’.




This bug report was last modified 5 years and 270 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.