Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/python-subprocess32: add PYTHON_SUBPROCESS32_CONFIGURE_CMDS
@ 2019-12-14 17:10 Fabrice Fontaine
  2019-12-14 20:54 ` Thomas Petazzoni
  2019-12-23  9:06 ` Peter Korsgaard
  0 siblings, 2 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2019-12-14 17:10 UTC (permalink / raw)
  To: buildroot

Since commit 1745fcde740057951dcc5429f3bfabd103b764a1,
python-subprocess32 fails to build because it runs configure with
incorrect arguments so add a PYTHON_SUBPROCESS32_CONFIGURE_CMDS

Fixes:
 - http://autobuild.buildroot.org/results/dcf944129392ee6cacc106e096d8d3adfa4447bb

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../python-subprocess32/python-subprocess32.mk  | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/package/python-subprocess32/python-subprocess32.mk b/package/python-subprocess32/python-subprocess32.mk
index ee591e6a6b..fb8a47f974 100644
--- a/package/python-subprocess32/python-subprocess32.mk
+++ b/package/python-subprocess32/python-subprocess32.mk
@@ -11,4 +11,21 @@ PYTHON_SUBPROCESS32_SETUP_TYPE = setuptools
 PYTHON_SUBPROCESS32_LICENSE = Python-2.0
 PYTHON_SUBPROCESS32_LICENSE_FILES = LICENSE
 
+# The configure step needs to be run outside of the setup.py since it isn't
+# run correctly for cross-compiling
+define PYTHON_SUBPROCESS32_CONFIGURE_CMDS
+	(cd $(@D) && \
+	$(TARGET_CONFIGURE_OPTS) \
+	$(TARGET_CONFIGURE_ARGS) \
+	./configure \
+		--target=$(GNU_TARGET_NAME) \
+		--host=$(GNU_TARGET_NAME) \
+		--build=$(GNU_HOST_NAME) \
+		--prefix=/usr \
+		--exec-prefix=/usr \
+		--sysconfdir=/etc \
+		--program-prefix="" \
+	)
+endef
+
 $(eval $(python-package))
-- 
2.24.0

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

* [Buildroot] [PATCH 1/1] package/python-subprocess32: add PYTHON_SUBPROCESS32_CONFIGURE_CMDS
  2019-12-14 17:10 [Buildroot] [PATCH 1/1] package/python-subprocess32: add PYTHON_SUBPROCESS32_CONFIGURE_CMDS Fabrice Fontaine
@ 2019-12-14 20:54 ` Thomas Petazzoni
  2019-12-15  7:56   ` Peter Korsgaard
  2019-12-23  9:06 ` Peter Korsgaard
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2019-12-14 20:54 UTC (permalink / raw)
  To: buildroot

On Sat, 14 Dec 2019 18:10:23 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Since commit 1745fcde740057951dcc5429f3bfabd103b764a1,
> python-subprocess32 fails to build because it runs configure with
> incorrect arguments so add a PYTHON_SUBPROCESS32_CONFIGURE_CMDS
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/dcf944129392ee6cacc106e096d8d3adfa4447bb
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

When seeing this, I was a bit "meh, how did it work before?". So I
built python-subprocess32 with 1745fcde740057951dcc5429f3bfabd103b764a1
reverted. What happens is that the ./configure script is executed, with
no arguments at all, and no CC variable is passed. So it happily uses
the host compiler, does a bunch of tests with it, and then uses the
resulting config.h file to build some target library. This is obviously
completely bogus!

With 1745fcde740057951dcc5429f3bfabd103b764a1, we now pass
CC=cross-compiler, so ./configure doesn't work because it uses a
cross-compiler, but no --host= value is passed, leading to the build
failure.

So 1745fcde740057951dcc5429f3bfabd103b764a1 really uncovered a real bug
in the python-subprocess32 packaging, which your patch fixes.

Applied to master. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 1/1] package/python-subprocess32: add PYTHON_SUBPROCESS32_CONFIGURE_CMDS
  2019-12-14 20:54 ` Thomas Petazzoni
@ 2019-12-15  7:56   ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2019-12-15  7:56 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 > On Sat, 14 Dec 2019 18:10:23 +0100
 > Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

 >> Since commit 1745fcde740057951dcc5429f3bfabd103b764a1,
 >> python-subprocess32 fails to build because it runs configure with
 >> incorrect arguments so add a PYTHON_SUBPROCESS32_CONFIGURE_CMDS
 >> 
 >> Fixes:
 >> - http://autobuild.buildroot.org/results/dcf944129392ee6cacc106e096d8d3adfa4447bb
 >> 
 >> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

 > When seeing this, I was a bit "meh, how did it work before?". So I
 > built python-subprocess32 with 1745fcde740057951dcc5429f3bfabd103b764a1
 > reverted. What happens is that the ./configure script is executed, with
 > no arguments at all, and no CC variable is passed. So it happily uses
 > the host compiler, does a bunch of tests with it, and then uses the
 > resulting config.h file to build some target library. This is obviously
 > completely bogus!

 > With 1745fcde740057951dcc5429f3bfabd103b764a1, we now pass
 > CC=cross-compiler, so ./configure doesn't work because it uses a
 > cross-compiler, but no --host= value is passed, leading to the build
 > failure.

 > So 1745fcde740057951dcc5429f3bfabd103b764a1 really uncovered a real bug
 > in the python-subprocess32 packaging, which your patch fixes.

Wow, (part of) this info would have been great to add to the commit
message.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 1/1] package/python-subprocess32: add PYTHON_SUBPROCESS32_CONFIGURE_CMDS
  2019-12-14 17:10 [Buildroot] [PATCH 1/1] package/python-subprocess32: add PYTHON_SUBPROCESS32_CONFIGURE_CMDS Fabrice Fontaine
  2019-12-14 20:54 ` Thomas Petazzoni
@ 2019-12-23  9:06 ` Peter Korsgaard
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2019-12-23  9:06 UTC (permalink / raw)
  To: buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Since commit 1745fcde740057951dcc5429f3bfabd103b764a1,
 > python-subprocess32 fails to build because it runs configure with
 > incorrect arguments so add a PYTHON_SUBPROCESS32_CONFIGURE_CMDS

 > Fixes:
 >  - http://autobuild.buildroot.org/results/dcf944129392ee6cacc106e096d8d3adfa4447bb

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2019.02.x and 2019.11.x, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2019-12-23  9:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-14 17:10 [Buildroot] [PATCH 1/1] package/python-subprocess32: add PYTHON_SUBPROCESS32_CONFIGURE_CMDS Fabrice Fontaine
2019-12-14 20:54 ` Thomas Petazzoni
2019-12-15  7:56   ` Peter Korsgaard
2019-12-23  9:06 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox