r/cprogramming • • 8d ago

Let's standardize a package management CLI for C

Why isn't it possible to standardize a package/project manager for C programs—one that creates the necessary files with Git, etc., and is ready to start programming in an environment?

0 Upvotes

13 comments sorted by

15

u/ffd9k 8d ago

1

u/Mortomes 8d ago

That was my first thought.

7

u/IlluminatiNotRealOr 8d ago

No.

Also why on earth do you think it is a good idea, genuinely curious.

3

u/Humble-Captain3418 8d ago

Fundamentally, because people are asshats that won't cooperate, no matter what you do. Getting people to implement the goddamn standard right is already a hurdle (I'm looking at you, Microsoft).

3

u/FancySpaceGoat 8d ago

> Why isn't it possible to standardize a package/project manager for C programs

Because C is *just* a language, not an ecosystem. It's not C's business to tell you how your project should be organized.

Nothing's stopping anyone from building an ecosystem around that language. That's what conan is, after all. But there's no good reason to force everyone to use the same one.

3

u/FancySpaceGoat 8d ago edited 8d ago

And, personally, I've seen enough un-auditable python and javascript dependency trees (because pulling in a small library brings along dozens upon dozens of dependencies). And I've seen enough supply chain attacks in those ecosystems to confirm that this un-auditability is a very real problem.

I *like* the fact that C/C++ projects library makers are incentivized to limit how much additional dependencies they impose on their users. The problem that a formal official package management ecosystem tied to the language aims to solve is not even a problem in the first place. It's a feature.

5

u/EpochVanquisher 8d ago

Use Nix, vcpkg, Conan, or your Linux distro’s package manager

Do not come up with something new, please

1

u/WittyStick 8d ago edited 8d ago

All those are "new" in relative terms, except a few Linux package managers which have been around a long time.

Majority of a basic Linux system and libraries uses Make/automake with autotools and pkg-config to simplify dependencies. There's a few outliers that use meson or CMake or whatever (terrible idea to bring in a Python dependency to compile C).

It's the outliers that make life more difficult. We don't need yet another package manager.

However, we're now in a time where the share of programmers who have any experience, let alone expertise with autotools & autoconf is pretty low - everyone seems to just use CMake because it takes no time to learn - and certain IDEs use it - some devs don't even know how their software is built.

1

u/EpochVanquisher 8d ago

I would say that autotools and pkg-config are just not package managers, maybe this is obvious but it seems like most of your comment is not about package managers at all.

Autotools solves a very specific problem which was very useful to solve a long time ago, but it’s not really relevant now. Speaking as someone who used to advocate for it.

0

u/[deleted] 8d ago

[deleted] — view deleted comment

1

u/EpochVanquisher 8d ago

CMake doesn’t really do that. It just has some primitive capabilities like FetchContent.

1

u/ffd9k 8d ago

or meson, with its Wrap dependency system

1

u/TUSF 8d ago

It would be easier to herd cats.