* [Buildroot] [PATCH] package/pkg-python: use _CONFIGURE_OPTS for build env
@ 2019-12-05 23:11 Ryan Barnett
2019-12-06 22:35 ` Thomas Petazzoni
2019-12-22 20:31 ` Peter Korsgaard
0 siblings, 2 replies; 6+ messages in thread
From: Ryan Barnett @ 2019-12-05 23:11 UTC (permalink / raw)
To: buildroot
When building host or target python packages, we need to ensure that
the build environment utilize {HOST|TARGET}_CONFIGURE_OPTS. This
ensures that the correct linker and compiler environment variables are
set to compile utilizing either the host or target folders.
It was discovered that when compiling a host-python package, it was
using linking against the build machines library folder instead of the
host folder because LDFLAGS was not properly set and was improperly
detecting whether or not a shared or static library was present in the
host folder.
CC: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Ryan Barnett <ryan.barnett@rockwellcollins.com>
---
Changes v1 -> v2:
- Merged HOST/TARGET_CONFIGURE_OPTS to single commit (suggested by
Arnout)
- Added HOST/TARGET_CONFIGURE_OPTS to env for setuptools (suggested
by Arnout)
---
package/pkg-python.mk | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/package/pkg-python.mk b/package/pkg-python.mk
index be1ce071df..4ded4fde83 100644
--- a/package/pkg-python.mk
+++ b/package/pkg-python.mk
@@ -27,9 +27,7 @@ endef
# Target distutils-based packages
PKG_PYTHON_DISTUTILS_ENV = \
PATH=$(BR_PATH) \
- CC="$(TARGET_CC)" \
- CFLAGS="$(TARGET_CFLAGS)" \
- LDFLAGS="$(TARGET_LDFLAGS)" \
+ $(TARGET_CONFIGURE_OPTS) \
LDSHARED="$(TARGET_CROSS)gcc -shared" \
PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \
PYTHONNOUSERSITE=1 \
@@ -52,7 +50,8 @@ PKG_PYTHON_DISTUTILS_INSTALL_STAGING_OPTS = \
# Host distutils-based packages
HOST_PKG_PYTHON_DISTUTILS_ENV = \
PATH=$(BR_PATH) \
- PYTHONNOUSERSITE=1
+ PYTHONNOUSERSITE=1 \
+ $(HOST_CONFIGURE_OPTS)
HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPTS = \
--prefix=$(HOST_DIR)
@@ -61,6 +60,7 @@ HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPTS = \
PKG_PYTHON_SETUPTOOLS_ENV = \
_PYTHON_SYSCONFIGDATA_NAME="$(PKG_PYTHON_SYSCONFIGDATA_NAME)" \
PATH=$(BR_PATH) \
+ $(TARGET_CONFIGURE_OPTS) \
PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \
PYTHONNOUSERSITE=1 \
_python_sysroot=$(STAGING_DIR) \
@@ -82,7 +82,8 @@ PKG_PYTHON_SETUPTOOLS_INSTALL_STAGING_OPTS = \
# Host setuptools-based packages
HOST_PKG_PYTHON_SETUPTOOLS_ENV = \
PATH=$(BR_PATH) \
- PYTHONNOUSERSITE=1
+ PYTHONNOUSERSITE=1 \
+ $(HOST_CONFIGURE_OPTS)
HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS = \
--prefix=$(HOST_DIR) \
--
2.18.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [Buildroot] [PATCH] package/pkg-python: use _CONFIGURE_OPTS for build env
2019-12-05 23:11 [Buildroot] [PATCH] package/pkg-python: use _CONFIGURE_OPTS for build env Ryan Barnett
@ 2019-12-06 22:35 ` Thomas Petazzoni
2019-12-07 13:07 ` Peter Korsgaard
2019-12-22 20:31 ` Peter Korsgaard
1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2019-12-06 22:35 UTC (permalink / raw)
To: buildroot
On Thu, 5 Dec 2019 17:11:02 -0600
Ryan Barnett <ryan.barnett@rockwellcollins.com> wrote:
> When building host or target python packages, we need to ensure that
> the build environment utilize {HOST|TARGET}_CONFIGURE_OPTS. This
> ensures that the correct linker and compiler environment variables are
> set to compile utilizing either the host or target folders.
>
> It was discovered that when compiling a host-python package, it was
> using linking against the build machines library folder instead of the
> host folder because LDFLAGS was not properly set and was improperly
> detecting whether or not a shared or static library was present in the
> host folder.
>
> CC: Arnout Vandecappelle <arnout@mind.be>
> Signed-off-by: Ryan Barnett <ryan.barnett@rockwellcollins.com>
>
> ---
> Changes v1 -> v2:
> - Merged HOST/TARGET_CONFIGURE_OPTS to single commit (suggested by
> Arnout)
> - Added HOST/TARGET_CONFIGURE_OPTS to env for setuptools (suggested
> by Arnout)
> ---
> package/pkg-python.mk | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 6+ messages in thread* [Buildroot] [PATCH] package/pkg-python: use _CONFIGURE_OPTS for build env
2019-12-06 22:35 ` Thomas Petazzoni
@ 2019-12-07 13:07 ` Peter Korsgaard
2019-12-09 15:53 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2019-12-07 13:07 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> On Thu, 5 Dec 2019 17:11:02 -0600
> Ryan Barnett <ryan.barnett@rockwellcollins.com> wrote:
>> When building host or target python packages, we need to ensure that
>> the build environment utilize {HOST|TARGET}_CONFIGURE_OPTS. This
>> ensures that the correct linker and compiler environment variables are
>> set to compile utilizing either the host or target folders.
>>
>> It was discovered that when compiling a host-python package, it was
>> using linking against the build machines library folder instead of the
>> host folder because LDFLAGS was not properly set and was improperly
>> detecting whether or not a shared or static library was present in the
>> host folder.
>>
>> CC: Arnout Vandecappelle <arnout@mind.be>
>> Signed-off-by: Ryan Barnett <ryan.barnett@rockwellcollins.com>
>>
>> ---
>> Changes v1 -> v2:
>> - Merged HOST/TARGET_CONFIGURE_OPTS to single commit (suggested by
>> Arnout)
>> - Added HOST/TARGET_CONFIGURE_OPTS to env for setuptools (suggested
>> by Arnout)
>> ---
>> package/pkg-python.mk | 11 ++++++-----
>> 1 file changed, 6 insertions(+), 5 deletions(-)
> Applied to master, thanks.
Hmm, this seems to confuse lirc-tools:
http://autobuild.buildroot.net/results/f7a/f7a9c02add9bde563c7289f7c0be2cb7aefd96b8/build-end.log
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread* [Buildroot] [PATCH] package/pkg-python: use _CONFIGURE_OPTS for build env
2019-12-07 13:07 ` Peter Korsgaard
@ 2019-12-09 15:53 ` Thomas Petazzoni
2019-12-09 16:23 ` Ryan Barnett
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2019-12-09 15:53 UTC (permalink / raw)
To: buildroot
On Sat, 07 Dec 2019 14:07:41 +0100
Peter Korsgaard <peter@korsgaard.com> wrote:
> >> package/pkg-python.mk | 11 ++++++-----
> >> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> > Applied to master, thanks.
>
> Hmm, this seems to confuse lirc-tools:
>
> http://autobuild.buildroot.net/results/f7a/f7a9c02add9bde563c7289f7c0be2cb7aefd96b8/build-end.log
I think this sort of change was pretty likely to cause some build
breakage, so it's good to merge it early.
Ryan, will you take a look at this issue ?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] package/pkg-python: use _CONFIGURE_OPTS for build env
2019-12-09 15:53 ` Thomas Petazzoni
@ 2019-12-09 16:23 ` Ryan Barnett
0 siblings, 0 replies; 6+ messages in thread
From: Ryan Barnett @ 2019-12-09 16:23 UTC (permalink / raw)
To: buildroot
Thomas,
On Mon, Dec 9, 2019 at 9:54 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> On Sat, 07 Dec 2019 14:07:41 +0100
> Peter Korsgaard <peter@korsgaard.com> wrote:
>
> > >> package/pkg-python.mk | 11 ++++++-----
> > >> 1 file changed, 6 insertions(+), 5 deletions(-)
> >
> > > Applied to master, thanks.
> >
> > Hmm, this seems to confuse lirc-tools:
> >
> > http://autobuild.buildroot.net/results/f7a/f7a9c02add9bde563c7289f7c0be2cb7aefd96b8/build-end.log
>
> I think this sort of change was pretty likely to cause some build
> breakage, so it's good to merge it early.
>
> Ryan, will you take a look at this issue ?
Yes - I'm taking a look at it. Looks like it is due to using double
quotes when using PKG_PYTHON_SETUPTOOLS_ENV.
diff --git a/package/lirc-tools/lirc-tools.mk b/package/lirc-tools/lirc-tools.mk
index e468f2a25d..d66f4e9925 100644
--- a/package/lirc-tools/lirc-tools.mk
+++ b/package/lirc-tools/lirc-tools.mk
@@ -47,7 +47,7 @@ endif
ifeq ($(BR2_PACKAGE_PYTHON3),y)
LIRC_TOOLS_DEPENDENCIES += python3 host-python3-setuptools
-LIRC_TOOLS_MAKE_ENV += SETUPTOOLS_ENV="$(PKG_PYTHON_SETUPTOOLS_ENV)"
+LIRC_TOOLS_MAKE_ENV += SETUPTOOLS_ENV='$(PKG_PYTHON_SETUPTOOLS_ENV)'
endif
define LIRC_TOOLS_INSTALL_INIT_SYSV
Working on testing out the change to see if it will build correctly.
Thanks,
-Ryan
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] package/pkg-python: use _CONFIGURE_OPTS for build env
2019-12-05 23:11 [Buildroot] [PATCH] package/pkg-python: use _CONFIGURE_OPTS for build env Ryan Barnett
2019-12-06 22:35 ` Thomas Petazzoni
@ 2019-12-22 20:31 ` Peter Korsgaard
1 sibling, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2019-12-22 20:31 UTC (permalink / raw)
To: buildroot
>>>>> "Ryan" == Ryan Barnett <ryan.barnett@rockwellcollins.com> writes:
> When building host or target python packages, we need to ensure that
> the build environment utilize {HOST|TARGET}_CONFIGURE_OPTS. This
> ensures that the correct linker and compiler environment variables are
> set to compile utilizing either the host or target folders.
> It was discovered that when compiling a host-python package, it was
> using linking against the build machines library folder instead of the
> host folder because LDFLAGS was not properly set and was improperly
> detecting whether or not a shared or static library was present in the
> host folder.
> CC: Arnout Vandecappelle <arnout@mind.be>
> Signed-off-by: Ryan Barnett <ryan.barnett@rockwellcollins.com>
> ---
> Changes v1 -> v2:
> - Merged HOST/TARGET_CONFIGURE_OPTS to single commit (suggested by
> Arnout)
> - Added HOST/TARGET_CONFIGURE_OPTS to env for setuptools (suggested
> by Arnout)
Committed to 2019.02.x and 2019.11.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-12-22 20:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-05 23:11 [Buildroot] [PATCH] package/pkg-python: use _CONFIGURE_OPTS for build env Ryan Barnett
2019-12-06 22:35 ` Thomas Petazzoni
2019-12-07 13:07 ` Peter Korsgaard
2019-12-09 15:53 ` Thomas Petazzoni
2019-12-09 16:23 ` Ryan Barnett
2019-12-22 20:31 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox