News for hackers. Stuff that matters.
Re:A Modern C Development Environment by maccard on Thursday August 10, 2023 @06:41PM (#37082647)
A dockerfile gives a clean, repeatable build environment. If there is ever a toolchain that needed that, it's native toolchains like gcc and clang.
Re:A Modern C Development Environment by seabass-labrax on Thursday August 10, 2023 @07:31PM (#37083085)
That reads almost like a disparagement of GCC/Clang; the reality is you can just build on pretty much any host system directly and it will work. Having clean and repeatable builds is extremely useful, and Docker is a reasonable way to do that, but that shouldn't mask the importance of understanding the native runtime dependencies of the program once used outside of that one container. A concrete example of that: don't compile a C program in an Alpine Linux Docker image with dynamic linking, or it you won't be able to run the resultant binary on a RHEL machine. This is contrast to languages which run atop a virtual machine or interpreter, where the details of the build environment rarely matter on the runtime machine.
Re:A Modern C Development Environment by maccard on Thursday August 10, 2023 @07:43PM (#37083181)
Its a disparagement at the fact they're dated, rather than the software itself.

GCC searches by default in /usr/include and friends, (and a similar set of paths for library paths), meaning that one random library you downloaded 11 years ago is now perpetually on your search path.

Re:A Modern C Development Environment by Dwedit on Thursday August 10, 2023 @11:47PM (#37084892)
If your code is using a version of GCC that's many years old, then the compiler will have changed sufficiently that code can break.
Re:A Modern C Development Environment by hot_gril on Thursday August 10, 2023 @07:16PM (#37082966)
Exactly. The one dev environment I can name where a Dockerfile really isn't useful is also the highest-level, NodeJS.
Re:A Modern C Development Environment by maccard on Thursday August 10, 2023 @07:44PM (#37083187)
I write a decent amount of go, and it's not wildly useful there either but I still use them as the rest of the tooling is good enough that it works for me.