4 ms·
From what I understand, statically linking in GNU's libc.a without releasing source code is a violation of LGPL. Which would break maybe 95% of companies out th
by delta_p_delta_x 1y ago
From what I understand, statically linking in GNU's libc.a without releasing source code is a violation of LGPL. Which would break maybe 95% of companies out there running proprietary software on Linux.
musl libc has a more permissive licence, but I hear it performs worse than GNU libc. One can hope for LLVM libc[1] so the entire toolchain would become Clang/LLVM, from the compiler driver to the C/C++ standard libraries. And then it'd be nice to whole-program-optimise from user code all the way to the libc implementation, rip through dead code, and collapse binary sizes.
[1]: https://libc.llvm.org/ https://libc.llvm.org/
- teraflop 1y agoAFAIK, it's technically legal under the LGPL to statically link glibc as long as you also include a copy of the application's object code, along with instructions for how users can re-link against a different glibc if they wish. You don't need to include the source for those .o files. But I don't think I've ever seen anybody actually do this.
- deleted 1y ago[deleted]
- loeg 1y agoYou can (equivalently) distribute some specific libc.so with your application. I don't think anyone other than GNU maximalists believes this infects your application with the (L)GPL.
- Retr0id 1y agoYou'd need to distribute ld.so also, otherwise you'll run into ld/libc incompatibilities.
- cxr 1y ago"GNU maximalist" is an odd choice of wording, since it would seem to imply people who are the most well-informed about the project's licenses, but anyone who thinks that distributing an LGPL library without your own app's corresponding source code is someone who flat out doesn't understand the LGPL.
- cxr 1y agoA mistake in my own wording crept in here; this should have said: > one who thinks that distributing an LGPL library without your own app's corresponding source code is forbidden is someone who flat out doesn't understand the LGPL
- rcxdude 1y agoMusl is probably the better choice for static linking anyway, GNU libc relies on dynamic linking for a few important features.
- resonious 1y agoThe Windows redistributables are so annoying as a user. I remember countless times applications used to ask me to visit the official Microsoft page for downloading them, and it was quite hard to find the right buttons to press to get the thing. Felt like offloading the burden to the users.
- IcyWindows 1y agoMany installers do it right and don't require the user to do it themselves.
- dijit 1y agoGNU LibC is notoriously difficult to statically link to anyway. (getaddrinfo for example). Most people use musl, though some others use uclibc. Musl is actually great, even if it comes with some performance drawbacks in a few cases.