Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/xz: avoid cicular dependency on autoconf for host builds
@ 2024-08-06  3:06 Markus Mayer via buildroot
  2024-08-06 15:03 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Mayer via buildroot @ 2024-08-06  3:06 UTC (permalink / raw)
  To: Buildroot Mailing List; +Cc: Thomas Petazzoni, Markus Mayer, Fabrice Fontaine

autoconf has an implicit dependency on HOST_XZ due to extracting a
tar.xz archive. By enabling XZ_AUTORECONF we create a reverse dependency
for xz on autoconf. This is fine for target builds, but it won't work
for host builds, as the two packages now depend on each other.

This problem only occurs if host tools are being built by Buildroot. If
the build relies on host tools provided by the distro, there is no
circular dependency problem.

Fixes:
4703a7ae9176 package/xz: fix musl static build

Signed-off-by: Markus Mayer <mmayer@broadcom.com>
---
 package/xz/xz.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/xz/xz.mk b/package/xz/xz.mk
index 9fb93ff4d6b5..028cd5bdf525 100644
--- a/package/xz/xz.mk
+++ b/package/xz/xz.mk
@@ -68,5 +68,12 @@ HOST_XZ_CONF_ENV = \
 	CC="$(HOSTCC_NOCCACHE)" \
 	CXX="$(HOSTCXX_NOCCACHE)"
 
+# We need to prevent XZ_AUTORECONF for host builds or we end up with a circular
+# dependency. Since the autoconf build needs to extract a tar.xz archive,
+# autoconf has an implicit dependency on HOST_XZ. By enabling XZ_AUTORECONF we
+# also make host-xz depend on autoconf, which we can't do. It is also not
+# necessary.
+HOST_XZ_AUTORECONF = NO
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
-- 
2.46.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/xz: avoid cicular dependency on autoconf for host builds
  2024-08-06  3:06 [Buildroot] [PATCH] package/xz: avoid cicular dependency on autoconf for host builds Markus Mayer via buildroot
@ 2024-08-06 15:03 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-08-06 15:03 UTC (permalink / raw)
  To: Markus Mayer via buildroot; +Cc: Fabrice Fontaine, Markus Mayer

On Mon,  5 Aug 2024 20:06:59 -0700
Markus Mayer via buildroot <buildroot@buildroot.org> wrote:

> autoconf has an implicit dependency on HOST_XZ due to extracting a
> tar.xz archive. By enabling XZ_AUTORECONF we create a reverse dependency
> for xz on autoconf. This is fine for target builds, but it won't work
> for host builds, as the two packages now depend on each other.
> 
> This problem only occurs if host tools are being built by Buildroot. If
> the build relies on host tools provided by the distro, there is no
> circular dependency problem.
> 
> Fixes:
> 4703a7ae9176 package/xz: fix musl static build
> 
> Signed-off-by: Markus Mayer <mmayer@broadcom.com>
> ---
>  package/xz/xz.mk | 7 +++++++
>  1 file changed, 7 insertions(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-08-06 15:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-06  3:06 [Buildroot] [PATCH] package/xz: avoid cicular dependency on autoconf for host builds Markus Mayer via buildroot
2024-08-06 15:03 ` Thomas Petazzoni via buildroot

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