4 ms·
For C there isn't really a problem that a package manager would solve. I can think of some problems it would cause, though.
by numlock86 5y ago
For C there isn't really a problem that a package manager would solve. I can think of some problems it would cause, though.
- rk06 5y agoCitation needed. I am confident that it is possible to write reusable C code, and thus there is a need for packaging such reusable code and manage them
- karatinversion 5y agoLike the user you’re replying to, I to find the concept of a C package manager baffling. I don’t know what your background is, but some reasons for my reaction: - a plethora of details that are implementation specific; - different compilers and platforms that differ in important details; - as a consequence of above, most code ends up targeting some limited set is compilers and platforms; - no standard build system to build package management on top of - the header file system, which allows api declaration and implementation to be decoupled By the time you’ve narrowed down enough to make these tractable, you might as well use a given operating system’s package management tools as your “C package manager”.
- maleldil 5y agoC++ has all of these problems, but Conan and vcpkg still exist. They aren't perfect, but they're so much better than nothing. You're also ignoring the fact that Linux isn't the only operating system in the world. Some of us write multi-platform software, and package managers make it so much easier.
- thinkharderdev 5y agoI recently started working in C++ again and my experience with C++ package managers were pretty dismal (I tried vcpkg and Conan). Just trying to setup a PoC project with only two dependencies took me multiple days and neither Conan nor vcpkg worked. And this was on an Intel MBP so not exactly some exotic platform.
- maleldil 5y agoI agree wholeheartedly with you on that. It's certainly a hard problem right now, which is why I don't like people that just say "it's not a problem with C/C++" or "just use the system's package manager".
- rk06 5y agoI once worked on a C program. It has been the worst experience of my programming career, right next to updating excel's vb macro to meet newer business needs. The mere fact that I could not build the project on my local machine (windows) and have to login to a Unix (IBM AIX) was baffling. Yep, Unix, not even linux. And because it was a business critical program which worked, business refused to make any drastic changes to it unless they were absolutely necessary, even if it was a bug fix to a frequently occurring issue. And I maintained it till 2018 when I left that job. I am pretty sure it is still there in same state. So, I understand the build tool woes, and cross platform issues. however, I understand it to mean that package manager is not feasible in current environment, not that it does not add value. Recently there was a post on zig, which aims for providing a standard build tool for C (& zig), and later, a package manager for C (and zig) So, I think such efforts are not only beneficial, but will become reality in future
- phlakaton 5y agoAnd C has a solution for that: Package: tarball of code. Manage: download tarball of code and build/install libraries using configure/make. Then tell the compiler where the headers are and the linker where the libraries are. Easy peasy! (OK, we know it’s not quite _that_ easy in many cases.) The elephant in the room is that people on HN and elsewhere violently nod about the need for a “proper package manager” when they are actually in disagreement about what a “proper package manager” needs to do. Meanwhile, it turns out that you can do without one, as the C community and all the “non-proper package managers” out there amply demonstrate.
- pjc50 5y agoThe nearest thing to a standard solution may be autoconf, which is horrendous. C targets an incredibly broad spectrum of hardware and software platforms, compiler implementations, and OS layouts. That's both blessing and a curse. I think it would be worth at least trying to converge on a "package" system, even if it takes the next 20 years.
- bscphil 5y ago> The nearest thing to a standard solution may be autoconf I believe that is changing. A quite large number of influential projects have standardized on Meson. That includes systemd, Xorg, PipeWire, GLib, libui, hexchat, pacman, and (almost) all Gnome projects. It seems fair to say that most people (a) like it, and (b) see it as the most likely path forward for build systems.
- joelbluminator 5y agoAre you saying the standard library is powerful enough for most things?
- numlock86 5y agoAre you saying you need a package manager to use something other than the standard library?