libpsl icon indicating copy to clipboard operation
libpsl copied to clipboard

Use cmake for building

Open llothar opened this issue 2 months ago • 6 comments

Seriously, autotools is the worst and needs to die. We have an industry standard now.

Like it that meson is optional, but autotools must die.

llothar avatar Nov 10 '25 04:11 llothar

But given that meson is available as an option, why do you care?

IMHO it's not quite nice to tell people that they "must" delete something that you aren't forced to use, for the sake of some benefit you already have. Your rationale for asking for CMake is "because Autotools is terrible", but that need is already answered.

eli-schwartz avatar Nov 10 '25 04:11 eli-schwartz

Feel free to review #254

Coeur avatar Nov 10 '25 11:11 Coeur

I am not against reconsidering the build system. Autotools are a powerhouse and useful in projects that strive for a high portability. But this project doesn't need such a complex beast and is here mostly for historical reasons (cmake was buggy shit back then and meson didn't even exist).

But we can't simply drop autotools and replace it with cmake - it would break all the build scripts out there. And what @eli-schwartz already mentioned... nobody has to use autotools. There is support for meson already. And second, when building from the provided tarballs (recommended!!!), you only need a shell, c compiler and make.

@Coeur Thanks for your PR. I'd consider merging a fully working cmake config with documentation in README.md. But I won't maintain it and thus ignore any issues for it (feel free to maintain it).

In the meantime, I wonder if we possibly come away with a rather small Makefile. That's possibly the easiest build system, no tarballs. Required configuration can be made via env variables or inside the Makefile itself. Just an idea 🤷🏻

rockdaboot avatar Nov 10 '25 12:11 rockdaboot

My PR adds a GitHub Action that validates that it works for all supported platforms (ubuntu, windows, macos). Apart from a paragraph in the Readme, can you clarify what else you wish to add? [edit] I suppose you want me to add the command-line executable.

Coeur avatar Nov 10 '25 12:11 Coeur

@rockdaboot as an upstream developer of a build system (Meson) and as someone heavily invested in the Linux distribution ecosystem who has worn hats in two Linux distros, I can most emphatically say that there's no such thing as a "rather small" Makefile, and absolutely anything is better than a makefile that doesn't have a configure script.

It is, among other things, absolutely impossible to correctly build a library without highly complex platform-specific conditionals, which autotools / meson / cmake all handle for you and which a "simple makefile" cannot do at all without GNU Make specific extensions and even then cannot be done without reimplementing half of Automake by hand but with bugs.

It would be the worst of all possible worlds.

Moreover I don't see what is offensive about Autotools. The Autotools are actually quite well designed for what they do, and pose no burden on end users by design. The only reasonable objection that can be made about the Autotools is that it is (slow, and) inconvenient to use as an end user on Windows -- but not impossible -- and that is already solved by meson.build. This bug report is highly inflammatory without justifying its position at all.

I see no reason to change anything there. Adding an additional build system could be an option, sure, but that's independent of this bug report.

eli-schwartz avatar Nov 10 '25 13:11 eli-schwartz

Note here, regarding my participation to this topic: I'm not advocating removing anything. I'm just offering to add cmake support through my pull request.

Coeur avatar Nov 10 '25 13:11 Coeur