[Buildroot] [Feature Request] Host cmake built with the --system-curl option

James Hilliard james.hilliard1 at gmail.com
Wed Apr 6 22:26:59 UTC 2022


On Wed, Apr 6, 2022 at 4:15 PM Emile Cormier <emile.cormier.jr at gmail.com> wrote:
>
> On Wed, Apr 6, 2022 at 6:50 PM James Hilliard <james.hilliard1 at gmail.com> wrote:
>>
>> On Wed, Apr 6, 2022 at 2:13 PM Emile Cormier <emile.cormier.jr at gmail.com> wrote:
>> > Buildroot's cmake is being executed in my post-build script instead of my system's cmake. How do I make my system's cmake take precedence?

Why are you executing cmake in a post-build script?

You should probably create a proper cmake package in your BR2_EXTERNAL:
https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_cmake_based_packages
https://buildroot.org/downloads/manual/manual.html#outside-br-custom

>>
>> I think you just need to update your system's cmake to something that meets the
>> required minimum version:
>> https://github.com/buildroot/buildroot/blob/ac91235797fe9b234fb820c0112f21c26be1349f/support/dependencies/check-host-cmake.mk#L6
>
>
> Ah, that explains why I started getting CMake https download failures _after_ the buildroot cmake version was bumped. My system's cmake version was in between buildroot's versions for cmake.
>
> However, I think having to rely on the system's CMake version goes against the buildroot philosophy of an image build not relying on the tools and libraries available on the build system.

Yes, however the issue here is that you are bypassing buildroot's package
download infrastructure.

>
> What I have done as a workaround in my post-build script is pre-download the needed source tarballs via wget. Later, when ExternalProject_add attempts to download the same source tarball, it sees that it's already downloaded and matches the expected hash. It then skips the https download, thus preventing the error. This way, whatever version of wget is installed on the build system makes little difference.

So create a separate buildroot package for those dependencies that your main
package selects.

Use the cmake package infrastructure instead of trying to use cmake to download
the dependency.



More information about the buildroot mailing list