Re: [RFC PATCH v4 00/19] Modernize the build system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/13/24 8:29 AM, Patrick Steinhardt wrote:
> Fair. I don't really expect anybody to use the combination of muon/sumo
> for everyday work, mostly because the usability is not quite up to par
> with Meson/Ninja. But there are two use cases that I deem important:


(samu :P)


>   - Esoteric platforms that may not have Python available. I don't know
>     whether there actually are any relevant ones, but with muon/sumo it
>     is possible to support these.
> 
>   - Bootstrappability, which I think is rather critical for a project
>     like Git that is at the core of the whole software ecosystem.
>     Depending only on a C99 compiler and a shell is a huge win here.
> 
> A bit of an anecdota, but CMake itself for example struggles with this
> quite heavily because it has dependencies that use CMake themselves. So
> it is nice that there is a clear path for bootstrapping with Meson and
> thus Git.


Yeah, the cmake bootstrap route tends to be an issue for Linux distros
because we want to use system packages for those dependencies, and while
it's possible to build a bootstrap seed `cmake` binary using their
shellscript and use it to build a "real" cmake, that doesn't really help
you install cmake's dependencies. There are some tricks you can do like
for example on Gentoo, bootstrap the OS with http2 support in curl
toggled off, so you can build without nghttp2 / no cmake, then use that
to build cmake, then rebuild curl. It requires manual intervention but
then you can reuse the existing cmake binary.

There's generally no path for building cmake with bundled dependencies,
as that would conflict with the desired end state of distributing cmake
linked to system packages.



>> Thanks. I don't want to be the CMake champion, so here are a few
>> helpful/surprising details about the Meson build to help make it better.
>>
>>
>> (1) I first built w/out having "curl-config" installed. I was surprised
>> to find that "ninja -C build install" ended up installing "bin/curl" and
>> "bin/curl-config" into the prefix.
>>
>> Is there a way to have the install step only install Git without
>> bringing along these other non-Git bits?
> 
> It definitely shouldn't install curl and curl-config, I'll have a look
> at that. But other than that Meson is currently set up such that it will
> automatically fall back to the subprojects in case certain dependencies
> cannot be found. This can be disabled via `meson setup --wrap-mode
> nofallback`.



https://github.com/mesonbuild/wrapdb/tree/master/subprojects/packagefiles/curl

could be updated to handle the case where meson.is_subproject() returns
"true", by not installing tooling.

Alternatively, meson install --skip-subprojects can avoid installing
*any* files from subprojects, on the theory that subprojects exist
solely to provide static libraries linked into the real project.

(In theory, one could have a subproject where arbitrary data files from
a subproject dependency are crucial at runtime. I think the gnome
ecosystem does this, hence using GLib / Gtk as a subproject "needs" to
install the subproject too -- but curl definitely doesn't have this
issue...)



-- 
Eli Schwartz

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux