* [Buildroot] BR2_FORCE_HOST_BUILD broken
@ 2024-08-05 21:29 Markus Mayer via buildroot
2024-08-05 21:48 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 4+ messages in thread
From: Markus Mayer via buildroot @ 2024-08-05 21:29 UTC (permalink / raw)
To: Buildroot Mailing List
Hi all,
The following commit[1] seems to be breaking BR2_FORCE_HOST_BUILD:
4703a7ae9176 package/xz: fix musl static build
Here is a one-liner to reproduce the problem:
$ make O=/tmp/dummy raspberrypi5_defconfig && \
sed -i 's/# BR2_FORCE_HOST_BUILD.*/BR2_FORCE_HOST_BUILD=y/' \
/tmp/dummy/.config && make O=/tmp/dummy
GEN /tmp/dummy/Makefile
#
# configuration written to /tmp/dummy/.config
#
package/xz/xz.mk:72: *** Recursive variable
'HOST_XZ_FINAL_RECURSIVE_DEPENDENCIES' references itself (eventually).
Stop.
make: *** [Makefile:83: _all] Error 2
That means:
1. Configure for Raspberry Pi 5 (but any target would work)
2. Turn on BR2_FORCE_HOST_BUILD
3. Try to build
4. Observe circular dependency for host-xz
I haven't determined the actual circular dependency yet. Are there any
tips for narrowing this down? These circular dependencies don't seem
to be easy to track down.
Thanks,
-Markus
[1] https://github.com/buildroot/buildroot/commit/4703a7ae9176b3a9d824880ef095b1b80c123df4
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] BR2_FORCE_HOST_BUILD broken
2024-08-05 21:29 [Buildroot] BR2_FORCE_HOST_BUILD broken Markus Mayer via buildroot
@ 2024-08-05 21:48 ` Thomas Petazzoni via buildroot
2024-08-06 2:19 ` Markus Mayer via buildroot
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-08-05 21:48 UTC (permalink / raw)
To: Markus Mayer via buildroot
Cc: Buildroot Mailing List, Fabrice Fontaine, Markus Mayer
Hello,
+Fabrice in Cc.
On Mon, 5 Aug 2024 14:29:05 -0700
Markus Mayer via buildroot <buildroot@buildroot.org> wrote:
> I haven't determined the actual circular dependency yet. Are there any
> tips for narrowing this down? These circular dependencies don't seem
> to be easy to track down.
Thanks for reporting the issue. The problem is that AUTORECONF = YES
adds host-autoconf as a dependency to host-xz... but host-autoconf
extracts a .tar.xz tarball, which requires host-xz (when you have
BR2_FORCE_HOST_BUILD=y).
Since the reason why we autoreconf xz is only relevant for the target
build, I think we could use the same trick as the one I've done in the
tar package in commit 69cbb563a124002fcb3e2725c3516b502587f9cc. I.e, we
do the autoreconf only for the target variant, and not the host
variant, which requires a bit of trickery.
Fabrice, or Markus, do you want to have a look?
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] BR2_FORCE_HOST_BUILD broken
2024-08-05 21:48 ` Thomas Petazzoni via buildroot
@ 2024-08-06 2:19 ` Markus Mayer via buildroot
[not found] ` <CAGt4E5v3F3zJyNZPGtWRpOxbO9eNV4+H6bd6tKXR7fwqBiMWmw@mail.gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Markus Mayer via buildroot @ 2024-08-06 2:19 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Buildroot Mailing List, Fabrice Fontaine,
Markus Mayer via buildroot
On Mon, 5 Aug 2024 at 14:48, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello,
>
> +Fabrice in Cc.
>
> Thanks for reporting the issue. The problem is that AUTORECONF = YES
> adds host-autoconf as a dependency to host-xz... but host-autoconf
> extracts a .tar.xz tarball, which requires host-xz (when you have
> BR2_FORCE_HOST_BUILD=y).
Thanks for the explanation.
> Since the reason why we autoreconf xz is only relevant for the target
> build, I think we could use the same trick as the one I've done in the
> tar package in commit 69cbb563a124002fcb3e2725c3516b502587f9cc. I.e, we
> do the autoreconf only for the target variant, and not the host
> variant, which requires a bit of trickery.
>
> Fabrice, or Markus, do you want to have a look?
I don't mind having a look.
Regards,
-Markus
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] BR2_FORCE_HOST_BUILD broken
[not found] ` <CAGt4E5v3F3zJyNZPGtWRpOxbO9eNV4+H6bd6tKXR7fwqBiMWmw@mail.gmail.com>
@ 2024-08-06 14:48 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-08-06 14:48 UTC (permalink / raw)
To: Markus Mayer
Cc: Buildroot Mailing List, Fabrice Fontaine,
Markus Mayer via buildroot
On Mon, 5 Aug 2024 20:08:51 -0700
Markus Mayer <markus.mayer@broadcom.com> wrote:
> Patch submitted. Turns out this one seems to be a bit simpler than the
> "tar" case. In my tests there was no need for a post patch hook. Just
> setting "HOST_XZ_AUTORECONF=NO" seems to suffice.
Indeed, the tar case is different. In the tar case, we apply patches
that touch configure.ac/Makefile.am, so we have to autoreconf. The
patches are also applied when building host-tar, so if we don't do
anything, configure.ac has a newer timestamp than configure, and
therefore even with HOST_TAR_AUTORECONF = NO, and automagic-autoreconf
gets triggered at build time.
In the case of xz, we don't patch anything, it's just that the provided
configure/Makefile are slightly broken for static builds, which is
completely irrelevant for host-xz, so indeed HOST_XZ_AUTORECONF = NO is
sufficient.
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-08-06 14:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-05 21:29 [Buildroot] BR2_FORCE_HOST_BUILD broken Markus Mayer via buildroot
2024-08-05 21:48 ` Thomas Petazzoni via buildroot
2024-08-06 2:19 ` Markus Mayer via buildroot
[not found] ` <CAGt4E5v3F3zJyNZPGtWRpOxbO9eNV4+H6bd6tKXR7fwqBiMWmw@mail.gmail.com>
2024-08-06 14:48 ` 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