3 ms·
> Not every distro has -dev packages to install headers. Really? I would be surprised if every distro didn't have a mechanism to install the headers and static
by twic 9y ago
> Not every distro has -dev packages to install headers.
Really? I would be surprised if every distro didn't have a mechanism to install the headers and static libraries for all of its dynamic library packages. How would the distro's own build process work otherwise?
> But the bigger issue is version requirements mismatches.
This is the killer. Distros are based on the idea that there should be only one version of any package installed at once. A development package manager needs to be able to handle many.
This feels like it should be relatively straightforward to add to distro package managers, though. You would need a package-space concept analogous to a container - a consistent set of packages separate from the host's, and some way to run a build process within it. So i can say:
dnf create-pkgcontainer ~/dev/myproject
dnf --pkgcontainer ~/dev/myproject install zlib-devel-1.2.8
Then inside ~/dev/myproject i have some sort of metadata listing what is installed in that container - say, a bunch of symlinks to pkgconfig files, a ld.so.conf and a ld.so.cache, etc. Then i can say:
dnf pkgcontainer-run ~/dev/myproject make
And make will somehow pick up the environment inside the container, rather than the global environment. That's easier said than done, of course, given how many different independent parts of the toolchain there are, and how intertwined but uncoordinated they are. You could use the sledgehammer of constructing an actual container, or at least a chroot, but ideally you wouldn't have to.
- exDM69 9y agoContainers are a workaround and an overkill solution to this problem. It's a pain in the ass when you need to enter a "blessed" environment to build your project. By "blessed", I mean a container environment, a chroot or just some environment variables that need to be set. > dnf pkgcontainer-run ~/dev/myproject make The issue with this kind of builds is that they integrate poorly with your $EDITOR (or IDE). When I run a build, I want the results to be piped back to my editor so I can comfortably jump to the files with errors and warnings in them. And it's not only the build, it's also running your application, running the debugger, static analysis, linters, etc. Requiring a special environment will introduce friction to all of these. Additionally, your suggestion of using "dnf" would require every developer in the project to use an OS where "dnf" runs. Builds should be reproducible as much as possible without depending on the OS. Development package managers solve lots of these problems, although having a package manager for every language is an issue.