3 ms·
> why is so much harder for C++ than for the JavaScript folks? There are C++ package managers that exist and work - they tend to be your OS' package manager, b
by shakna 7y ago
> why is so much harder for C++ than for the JavaScript folks?
There are C++ package managers that exist and work - they tend to be your OS' package manager, because of the problems they will have to work around.
Because C++ has a lot more flexibility in core components than JavaScript does, which aren't easy to resolve at the package manager level.
Things projects may _require_ to build correctly:
* Multiple compilers that don't always have compatible extensions that sometimes share the same flags, and can falsely report to be each other when queried.
* Multiple simultaneous differing versions of clib to link against. They may requiring differing specific versions of specific implementations.
* Specific kernel libraries to link against. You can't easily build and link against a specific OS kernel in isolation.
* Projects may expect specific paths, and ignore or break attempts to change these. Not being able to compile a project that has a history of twenty years isn't an option.
* Arbitrary execution with intentional side-effects. It's bad, but there is a very long history of projects that you're dealing with here.
* CPATH and CXXPATH are globals. Relative path linking is possible, but difficult and a pile of hacks. You can force a node_modules style to exist, and some projects do, but most are a mix of relative and global, and the global can override your local and break things.