The make all command run the tools/makefile on the process.
This makefile use "pkg-config" command to support static link.
The issue is the use of pkg-config configured for crosscompiling
to build binaries tools for host architecture.
To fix it, I copied the behavior of QtWebengine by using a pkg-config
executable preconfigured for host.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
boot/uboot/host-pkg-config.in | 6 ++++++
boot/uboot/uboot.mk | 10 +++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
create mode 100644 boot/uboot/host-pkg-config.in
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Date: 2021-03-16 22:08:52
Hello Kory,
On Thu, 4 Feb 2021 18:04:46 +0100
Kory Maincent [off-list ref] wrote:
The make all command run the tools/makefile on the process.
This makefile use "pkg-config" command to support static link.
The issue is the use of pkg-config configured for crosscompiling
to build binaries tools for host architecture.
To fix it, I copied the behavior of QtWebengine by using a pkg-config
executable preconfigured for host.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Thanks for the patch. It would require a better commit title though, as
"fix uboot build" is very vague.
After discussing with Yann E. Morin on IRC, could you try this change
instead:
$(TARGET_CONFIGURE_OPTS) \
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
PKG_CONFIG_SYSROOT_DIR="/" \
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
PKG_CONFIG_LIBDIR="$(HOST_DIR)/lib/pkgconfig:$(HOST_DIR)/share/pkgconfig"
The reasoning is that U-Boot anyway only uses pkg-config for host
tools, so we could just as well pass those environment variables when
building U-Boot.
Could you try this out?
Also, do you have a Buildroot .config to reproduce the issue? Perhaps
it would be nice to have a test case in our runtime test infrastructure.
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Hello Thomas,
On Tue, 16 Mar 2021 23:08:52 +0100
Thomas Petazzoni [off-list ref] wrote:
Hello Kory,
On Thu, 4 Feb 2021 18:04:46 +0100
Kory Maincent [off-list ref] wrote:
quoted
The make all command run the tools/makefile on the process.
This makefile use "pkg-config" command to support static link.
The issue is the use of pkg-config configured for crosscompiling
to build binaries tools for host architecture.
To fix it, I copied the behavior of QtWebengine by using a pkg-config
executable preconfigured for host.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Thanks for the patch. It would require a better commit title though, as
"fix uboot build" is very vague.
Ok I will change it for v2.
After discussing with Yann E. Morin on IRC, could you try this change
instead:
$(TARGET_CONFIGURE_OPTS) \
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
PKG_CONFIG_SYSROOT_DIR="/" \
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
PKG_CONFIG_LIBDIR="$(HOST_DIR)/lib/pkgconfig:$(HOST_DIR)/share/pkgconfig"
The reasoning is that U-Boot anyway only uses pkg-config for host
tools, so we could just as well pass those environment variables when
building U-Boot.
Could you try this out?
This change works well, the build of U-boot ends properly.
Also, do you have a Buildroot .config to reproduce the issue? Perhaps
it would be nice to have a test case in our runtime test infrastructure.
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Date: 2021-03-25 16:36:39
On Thu, 25 Mar 2021 17:34:59 +0100
K?ry Maincent [off-list ref] wrote:
quoted
After discussing with Yann E. Morin on IRC, could you try this change
instead:
$(TARGET_CONFIGURE_OPTS) \
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
PKG_CONFIG_SYSROOT_DIR="/" \
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
PKG_CONFIG_LIBDIR="$(HOST_DIR)/lib/pkgconfig:$(HOST_DIR)/share/pkgconfig"
The reasoning is that U-Boot anyway only uses pkg-config for host
tools, so we could just as well pass those environment variables when
building U-Boot.
Could you try this out?
This change works well, the build of U-boot ends properly.
Excellent, thanks!
You can find the defconfig that break the U-boot build in attachment.
Perhaps it would be good to capture this defconfig as a test in
support/testing/, so we can make sure this doesn't regress?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
From: Yann E. MORIN <hidden> Date: 2021-06-28 20:26:56
K?ry, All,
On 2021-03-25 17:34 +0100, K?ry Maincent spake thusly:
On Tue, 16 Mar 2021 23:08:52 +0100
Thomas Petazzoni [off-list ref] wrote:
quoted
On Thu, 4 Feb 2021 18:04:46 +0100
Kory Maincent [off-list ref] wrote:
quoted
The make all command run the tools/makefile on the process.
This makefile use "pkg-config" command to support static link.
The issue is the use of pkg-config configured for crosscompiling
to build binaries tools for host architecture.
To fix it, I copied the behavior of QtWebengine by using a pkg-config
executable preconfigured for host.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Thanks for the patch. It would require a better commit title though, as
"fix uboot build" is very vague.
Ok I will change it for v2.
quoted
After discussing with Yann E. Morin on IRC, could you try this change
instead:
$(TARGET_CONFIGURE_OPTS) \
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
PKG_CONFIG_SYSROOT_DIR="/" \
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
PKG_CONFIG_LIBDIR="$(HOST_DIR)/lib/pkgconfig:$(HOST_DIR)/share/pkgconfig"
The reasoning is that U-Boot anyway only uses pkg-config for host
tools, so we could just as well pass those environment variables when
building U-Boot.
Could you try this out?
This change works well, the build of U-boot ends properly.
I don't seem to have seen a v2 of this patch. Do you plan on sending it
soonish? ;-)
Thanks!
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
Hello Yann,
On Mon, 28 Jun 2021 22:26:56 +0200
"Yann E. MORIN" [off-list ref] wrote:
K?ry, All,
On 2021-03-25 17:34 +0100, K?ry Maincent spake thusly:
quoted
On Tue, 16 Mar 2021 23:08:52 +0100
Thomas Petazzoni [off-list ref] wrote:
quoted
On Thu, 4 Feb 2021 18:04:46 +0100
Kory Maincent [off-list ref] wrote:
quoted
The make all command run the tools/makefile on the process.
This makefile use "pkg-config" command to support static link.
The issue is the use of pkg-config configured for crosscompiling
to build binaries tools for host architecture.
To fix it, I copied the behavior of QtWebengine by using a pkg-config
executable preconfigured for host.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Thanks for the patch. It would require a better commit title though, as
"fix uboot build" is very vague.
Ok I will change it for v2.
quoted
quoted
After discussing with Yann E. Morin on IRC, could you try this change
instead:
$(TARGET_CONFIGURE_OPTS) \
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
PKG_CONFIG_SYSROOT_DIR="/" \
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
PKG_CONFIG_LIBDIR="$(HOST_DIR)/lib/pkgconfig:$(HOST_DIR)/share/pkgconfig"
The reasoning is that U-Boot anyway only uses pkg-config for host
tools, so we could just as well pass those environment variables when
building U-Boot.
Could you try this out?
This change works well, the build of U-boot ends properly.
I don't seem to have seen a v2 of this patch. Do you plan on sending it
soonish? ;-)
Sorry, I put it aside for a time.
I need to finish the test case asked by Thomas, I will try to find time to do
it soon.
Regards
K?ry