[bug#35244,6/6] gnu: python: Fix cross compilation.

Message ID 20190412131556.25282-6-m.othacehe@gmail.com
State Accepted
Headers show
Series Fix some cross-compilation issues. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied

Commit Message

Mathieu Othacehe April 12, 2019, 1:15 p.m. UTC
* gnu/packages/python.scm (python-2.7)[arguments]: Add a configure flag to
disable a check failing when cross-compiling. This is covered here:

https://lists.yoctoproject.org/pipermail/poky/2013-June/008997.html
---
 gnu/packages/python.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Ludovic Courtès April 14, 2019, 3:27 p.m. UTC | #1
Mathieu Othacehe <m.othacehe@gmail.com> skribis:

> * gnu/packages/python.scm (python-2.7)[arguments]: Add a configure flag to
> disable a check failing when cross-compiling. This is covered here:
>
> https://lists.yoctoproject.org/pipermail/poky/2013-June/008997.html

[...]

> +             ;; Disable runtime check failing if cross-compiling, see:
> +             ;; https://lists.yoctoproject.org/pipermail/poky/2013-June/008997.html
> +             "ac_cv_buggy_getaddrinfo=no"

Can you make it conditional on (%current-target-system)?  That way we
can apply it on master without rebuilding the world.

Otherwise LGTM.

Thanks,
Ludo’.

Patch

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 57ced499cb..e3a484f5cd 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -38,7 +38,7 @@ 
 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
-;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
@@ -134,6 +134,9 @@ 
              "--with-system-ffi"                  ;build ctypes
              "--with-ensurepip=install"           ;install pip and setuptools
              "--enable-unicode=ucs4"
+             ;; Disable runtime check failing if cross-compiling, see:
+             ;; https://lists.yoctoproject.org/pipermail/poky/2013-June/008997.html
+             "ac_cv_buggy_getaddrinfo=no"
              (string-append "LDFLAGS=-Wl,-rpath="
                             (assoc-ref %outputs "out") "/lib"))