A lot of questions arise:
1) How do you do deployments? e.g in Node/Ruby/Python u can simply have a package.json (or Gemfile) with all the dependencies.
2) How do you dependencies? Let's say I am building a new C library that depends on 5 other dependencies, how do I let users know?
> How do you dependencies? Let's say I am building a new C library that depends on 5 other dependencies, how do I let users know?
Via a Dockerfile? ;)
But seriously, this is typically done in the INSTALL.txt installation instruction file for your library, and it’s up to the user to make sure any dependencies are properly installed and configured.
For dependencies that aren’t commonly installed, tools will often include their source and build them from scratch.
It’s a misnomer to say C package management is broken, because it doesn’t have any.
1. The same way you deploy Ruby/python to your system? They are written in C and most teams have no issue getting those deployed. If your answer is that you are deploying Ruby and python using the system package manager; then the answer here is that you deploy your dependencies for your C code using your package manager.
2. cmake and autoconf will both let you list dependencies and provide error messages to tell users to install them. It won't auto-install dependencies like a package.json or tell a user where to get the dependencies, but the message that something needs to be installed can be passed to the user.
For executables: actual real statically linked binary. You have a single executable containing all the dependencies and all necessary runtime support.
For libraries: no standard mechanism. On Linux, you can generally make a "libfoo" package that specifies the dependencies. On Windows, this is a bit more of a problem, but people can and do just hand out a DLL.
Or you make people build the dependencies from source as well.
(As an old school C developer, I see containers as occupying the same conceptual space as statically linked binaries for distribution. It's just that very few other languages will let you make a true standalone executable.)
You can do deployments with dependencies by building a distribution package of your own software, using the distribution's packaging tools. The tools do work quite well. The real problem is that this only works reliably for a single OS distribution. To support another Linux distribution, you need to redo the packaging. Even distributions that use the same package format (such as rpm or deb) are not quite compatible, since the names and versions of the dependencies vary.
I just make a PKGBUILD file for my project. Lets me specify dependencies, build and install instructions, anything it needs. Then I can build the package and install it on any Arch Linux system.