News for hackers. Stuff that matters.
Re:The Journey Before main() by liqilin1567 on Saturday October 25, 2025 @10:59PM (#45708802)
I'm sick of glibc compatibility problems. Are there any recommended replacements?
Re:The Journey Before main() by emidln on Sunday October 26, 2025 @01:10AM (#45709317)
.interp to a glibc/libc you ship or static linking. These days it’s probably faster (in dev time) to just run a container than setting up a bespoke interp and a parallel set of libraries (and the associated toolchain changes or binary patching needed to support it).
Re:The Journey Before main() by liqilin1567 on Sunday October 26, 2025 @02:48AM (#45709665)
Running a container is exactly my current solution as well.

Are there any other solutions that don't depend on glibc?

Re:The Journey Before main() by retatop on Sunday October 26, 2025 @11:28AM (#45712670)
Guix (and I assume Nix as well, but I only know Guix) can create a package that is completely self contained including glibc. You can even have it be an AppImage https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix...
Re:The Journey Before main() by 1718627440 on Sunday October 26, 2025 @12:46PM (#45713257)
Glibc is half of GNU/Linux. You can of course use another libc, but it will be a different OS.
Re:The Journey Before main() by liqilin1567 on Sunday October 26, 2025 @09:58PM (#45716638)
Yeah, even library loading relies on glibc, so we can't really escape glibc on GNU/Linux.
Re:The Journey Before main() by vbezhenar on Monday October 27, 2025 @02:37AM (#45718009)
I wonder if anyone implemented loading shared libraries without glibc? It shouldn't be that hard, just need to implement ELF parser and glibc-compatible relocation mechanism.
Re:The Journey Before main() by 1718627440 on Monday October 27, 2025 @06:29AM (#45719321)
I don't think nobody has done, that. It is just that vendoring your own OS comes with a lot of work.
Re:The Journey Before main() by 1718627440 on Monday October 27, 2025 @06:29AM (#45719317)
I don't really know why people expect to be able to bypass the OS and not have problems. It seems to come from people who think a "Linux OS" only consists of the Linux kernel.
Re:The Journey Before main() by electroly on Sunday October 26, 2025 @09:39PM (#45716541)
For non-graphical apps, you can link statically against musl to produce a binary that only depends on the Linux kernel version and not the version or type of libc on the system. You may take a performance hit as musl isn't optimized for speed, and a size hit for shipping your own libc, and a feature hit because musl is designed to be minimal, but for many command line tools all of these downsides are acceptable.