4 ms·
I don't think the parent comment's point was if this was technically possible. glibc is GPL licensed, and the GPL explicitly forbids statically linking to it u
by luizfelberti 7y ago
I don't think the parent comment's point was if this was technically possible.
glibc is GPL licensed, and the GPL explicitly forbids statically linking to it unless your code is GPL too.
Thus any non-GPL project has it's license tainted by the GPL if you statically link it.
It's not a technical limitation, it's a legal one.
- cesarb 7y agoThis is false. The license for glibc is the LGPL, not the GPL, and the LGPL has an exception to allow static linking without the whole code having to be under the LGPL, as long as the .o files are also distributed to allow linking with a modified glibc ("As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice [...] and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library.")
- luizfelberti 7y agoSounds like I got conned by my (poor) memory. I should have re-googled this before posting, thanks for the correction.
- jfkebwjsbx 7y agoYes, but for many projects it means no static linking in practice.
- freemint 7y agoI might be uneducated but wasn't there a "system library exception" or something like that in GPL to prevent these problems?
- yarrel 7y agoThis isn't a legal limitation. It's FUD. See here - https://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynamic https://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynami...
- luizfelberti 7y agoThanks for the link, that's very useful. I should have re-googled this stuff instead of commenting "from memory", sorry for spreading the FUD :/
- a1369209993 7y agoAlso, right above that: https://www.gnu.org/licenses/gpl-faq.html#GPLStaticVsDynamic https://www.gnu.org/licenses/gpl-faq.html#GPLStaticVsDynamic Dynamically linking a GPL library is the same as statically linking a GPL library; the resulting executable must be GPL-licensed.
- sandov 7y agoThat's also a good reason to avoid glibc and switch to a musl-based system.