|
|
Log in / Subscribe / Register

Glibc and static linking

Glibc and static linking

Posted Jan 6, 2005 6:02 UTC (Thu) by ncm (guest, #165)
Parent article: Blessing and cursing

There is one probably-common practice among corporate distributors of proprietary software that is a source of potential trouble.

The GNU C library, glibc, is licensed under the Lesser General Public License, LGPL. This means that it is permitted to distribute proprietary programs that call functions in glibc -- but only under certain conditions. The default way to build programs is to dynamic-link to libc.so, and that's permitted. However, some vendors (reasonably) prefer to minimize dependence on the runtime environment, or eke out a little better efficiency, and so they static-link libc.a into the program they distribute. That is not permitted, at least without jumping through some hoops that some vendors might prefer to avoid.

If you're one of these vendors, what can you do instead, without exposing your program to an unstable runtime environment? One way is to ship a tarball of all your ".o" files on the CD with the program, and a Makefile or script that can rebuild your program, linking to libc however the customer might prefer. A simpler way is to ship your own copy of the preferred glibc version, and arrange for your program to find it in some non-standard place. This way if a customer wants to use a different (e.g. fixed) version of glibc, they just drop it into that non-standard place. A third option is to link against some libc other than glibc, such as dietlibc. What is not an option is to continue shipping a program with a static-linked glibc.

Is this a risk, exposing businesses to crippling lawsuits? As usual, not if simple and cheap precautions are taken to abide by the published and readily-understood licenses. In the event of a violation, the greatest risk really comes from pigheaded refusal by management to abide by the rules, not from any extortionate copyright holder.

If you happen to know that a vendor, or your employer or its competitor, is violating the rule, please report it to the Free Software Foundation, so things can be worked out. The FSF prefers to avoid litigation, and has been successful in that thus far. Any sane person would certainly prefer for the FSF to be after them than, e.g., the BSA.


The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:

Note: you can avoid this step in the future by logging into your LWN account.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds