by adrianN · 7y ago · 0 comments
How would a package management system for C++ work?
Would there be a centralized repository containing shared objects, static objects, and header files of all the packages? Who would pay for the hosting? How would you track which libraries are compatible with which compilers/OSes/architectures?
Seems like at this point it would be a herculean effort to create cpppm because of how fragmented the compilers/support is across systems. And so it would be a broken piece of garbage so people wouldn't use it.
> Would there be a centralized repository
> How would you track which libraries are compatible
> Seems like at this point it would be a herculean effort
This is not a bizarre or impossible idea.
Besides the plethora of package managers in more modern languages, there are in fact, actual real-world C/C++ package managers: Conan [1], Buckaroo [2], vcpkg [3], Conda [4], cget [5].
However, it's much like Go before its maintainers did anything: it's the Wild West and every day brings a new package manager.
Having some consensus, standardization, common concepts, or direction would help C++ adoption/usability enormously.
[3] https://docs.microsoft.com/en-us/cpp/build/vcpkg?view=vs-201...
Which build system? CMake? SCons? GNU Make? Unix Make? Autotools? Visual Studio Solution?
Cpp libraries are far from having a standardized build system. And without a standardized build system, you can't do what you describe.
I suppose you could say "CMake is the standard" and then only support CMake-compatible libraries, but again, that leaves hundreds of packages out of reach.
If there were some type of system where library A says it depends on library B (via a URL or some other non-centralized thing), and the compiler knows how to resolve this, then you don't need 90% of the features these tools provide. You still need build parallelization and maybe detection for non-standard compiler features, but this is a much smaller and simpler problem.