All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1 1/1] python: use system libffi for host-python
@ 2021-06-21  5:53 Christian Stewart
  2021-06-27 15:56 ` Yann E. MORIN
  2021-07-12  8:22 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Christian Stewart @ 2021-06-21  5:53 UTC (permalink / raw)
  To: buildroot

From: Erico Nunes <nunes.erico@gmail.com>

python2 contains a bundled copy of libffi which is currently out of sync with
the latest libffi release. There is an option to use a system libffi, buildroot
already uses it for the target python2 build and for python3. In python3, the
bundled copy doesn't exist anymore and the system-provided libffi is required.

The bundled copy currently fails to build on aarch64 host due to a missing
definition of AARCH64_CALL_CONTEXT_SIZE. This define was removed from the
headers in recent libffi releases and the host compiler might be including the
system headers before the bundled headers.

To solve this and since buildroot already relies on system libffi for target
python2 and python3 anyway, switch host python2 to use system libffi.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Christian Stewart <christian@paral.in>

---

v1:

Submitted on behalf of author from BugZilla:

https://bugs.busybox.net/show_bug.cgi?id=13661#c4
Signed-off-by: Christian Stewart <christian@paral.in>
---
 package/python/python.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/python/python.mk b/package/python/python.mk
index f4f9f8563b..ae99f382f9 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -24,6 +24,7 @@ HOST_PYTHON_CONF_OPTS += \
 	--disable-sqlite3 \
 	--disable-tk \
 	--with-expat=system \
+	--with-system-ffi \
 	--disable-curses \
 	--disable-codecs-cjk \
 	--disable-nis \
@@ -56,7 +57,7 @@ HOST_PYTHON_MAKE = $(MAKE1)
 
 PYTHON_DEPENDENCIES = host-python libffi $(TARGET_NLS_DEPENDENCIES)
 
-HOST_PYTHON_DEPENDENCIES = host-expat host-zlib
+HOST_PYTHON_DEPENDENCIES = host-expat host-libffi host-zlib
 
 ifeq ($(BR2_PACKAGE_HOST_PYTHON_SSL),y)
 HOST_PYTHON_DEPENDENCIES += host-openssl
-- 
2.32.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH v1 1/1] python: use system libffi for host-python
  2021-06-21  5:53 [Buildroot] [PATCH v1 1/1] python: use system libffi for host-python Christian Stewart
@ 2021-06-27 15:56 ` Yann E. MORIN
  2021-07-12  8:22 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2021-06-27 15:56 UTC (permalink / raw)
  To: buildroot

Christain, All,

On 2021-06-20 22:53 -0700, Christian Stewart spake thusly:
> From: Erico Nunes <nunes.erico@gmail.com>
> 
> python2 contains a bundled copy of libffi which is currently out of sync with
> the latest libffi release. There is an option to use a system libffi, buildroot
> already uses it for the target python2 build and for python3. In python3, the
> bundled copy doesn't exist anymore and the system-provided libffi is required.
> 
> The bundled copy currently fails to build on aarch64 host due to a missing
> definition of AARCH64_CALL_CONTEXT_SIZE. This define was removed from the
> headers in recent libffi releases and the host compiler might be including the
> system headers before the bundled headers.
> 
> To solve this and since buildroot already relies on system libffi for target
> python2 and python3 anyway, switch host python2 to use system libffi.
> 
> Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
> Reviewed-by: Christian Stewart <christian@paral.in>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
> 
> v1:
> 
> Submitted on behalf of author from BugZilla:
> 
> https://bugs.busybox.net/show_bug.cgi?id=13661#c4
> Signed-off-by: Christian Stewart <christian@paral.in>
> ---
>  package/python/python.mk | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/package/python/python.mk b/package/python/python.mk
> index f4f9f8563b..ae99f382f9 100644
> --- a/package/python/python.mk
> +++ b/package/python/python.mk
> @@ -24,6 +24,7 @@ HOST_PYTHON_CONF_OPTS += \
>  	--disable-sqlite3 \
>  	--disable-tk \
>  	--with-expat=system \
> +	--with-system-ffi \
>  	--disable-curses \
>  	--disable-codecs-cjk \
>  	--disable-nis \
> @@ -56,7 +57,7 @@ HOST_PYTHON_MAKE = $(MAKE1)
>  
>  PYTHON_DEPENDENCIES = host-python libffi $(TARGET_NLS_DEPENDENCIES)
>  
> -HOST_PYTHON_DEPENDENCIES = host-expat host-zlib
> +HOST_PYTHON_DEPENDENCIES = host-expat host-libffi host-zlib
>  
>  ifeq ($(BR2_PACKAGE_HOST_PYTHON_SSL),y)
>  HOST_PYTHON_DEPENDENCIES += host-openssl
> -- 
> 2.32.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH v1 1/1] python: use system libffi for host-python
  2021-06-21  5:53 [Buildroot] [PATCH v1 1/1] python: use system libffi for host-python Christian Stewart
  2021-06-27 15:56 ` Yann E. MORIN
@ 2021-07-12  8:22 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2021-07-12  8:22 UTC (permalink / raw)
  To: buildroot

>>>>> "Christian" == Christian Stewart <christian@paral.in> writes:

 > From: Erico Nunes <nunes.erico@gmail.com>
 > python2 contains a bundled copy of libffi which is currently out of sync with
 > the latest libffi release. There is an option to use a system libffi, buildroot
 > already uses it for the target python2 build and for python3. In python3, the
 > bundled copy doesn't exist anymore and the system-provided libffi is required.

 > The bundled copy currently fails to build on aarch64 host due to a missing
 > definition of AARCH64_CALL_CONTEXT_SIZE. This define was removed from the
 > headers in recent libffi releases and the host compiler might be including the
 > system headers before the bundled headers.

 > To solve this and since buildroot already relies on system libffi for target
 > python2 and python3 anyway, switch host python2 to use system libffi.

 > Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
 > Reviewed-by: Christian Stewart <christian@paral.in>

Committed to 2021.02.x and 2021.05.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-12  8:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21  5:53 [Buildroot] [PATCH v1 1/1] python: use system libffi for host-python Christian Stewart
2021-06-27 15:56 ` Yann E. MORIN
2021-07-12  8:22 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.