FRIDAY, OCTOBER 16, 2026
gcc — Proposed
shared_libs
Question raised about the necessity of shared libraries on Linux given information replication in modern software like Git and Docker.
André Coelho questions the current practice of using shared libraries on Linux, pointing to software like Git, Docker, and Flatpak that replicate information. He suggests that using the ‘-static’ compile option to link libraries might be a more efficient approach.
In Details
This is a high-level question about build system choices, specifically regarding dynamic vs. static linking on Linux. It touches on software distribution patterns and potential redundancy with modern containerized or self-contained applications.
For Context
- shared libraries
- Code libraries that are loaded into memory and shared by multiple programs. This contrasts with static linking, where library code is embedded directly into the executable.
- -static
- A compiler/linker flag that instructs the build process to statically link all necessary libraries into the final executable, rather than using shared libraries.
- Git
- A distributed version control system commonly used for software development.
- Docker
- A platform for developing, shipping, and running applications in containers, which often bundle dependencies.
- Flatpak
- A system for building, distributing, and running sandboxed desktop applications on Linux, which can include bundled runtimes and libraries.