3

If I were to write say, an embeded linux video server, how much of the code do I have to offer to someone who requests the source? Do I have to offer the code that directly links against the GPL covered code or do I have to offer all code? For instance, if I use gstreamer, or any other LGPL code, on a linux platform in my program, does all of my code become under GPL simply because somewhere in the chain, the LGPL program had to link agaist GPL code?

I guess this is an extension of the question. Can you write a C library that compiles in linux that does not become subject to GPL?

9
  • Code that directly links against the GPL covered code or all code That sentence makes absolutely no sense to me.
    – yannis
    Nov 16, 2011 at 19:02
  • 1
    @Yannis, me neither, let me fix it. Nov 16, 2011 at 19:03
  • So are you asking whether Linux makes all code running on it GPL by virtue of being GPL'd itself?
    – user7043
    Nov 16, 2011 at 19:08
  • 1
    That's pretty easy to answer through logic: If that was the case, there'd be no non-GPL software on linux. There clearly is, there's even entirely proprietary software.
    – user7043
    Nov 16, 2011 at 19:23
  • 4
    The entire purpose of the LGPL existing (as opposed to the GPL) is to allow being called as a library without requiring that the caller is GPL or LGPL. However, LGPL can't call GPL'ed things (because the GPL would then require it to be GPL, not LGPL).
    – Zach
    Nov 17, 2011 at 2:52

4 Answers 4

3

Ob: IANAL, and for legal advice you should go find one.

That said: to answer the question from the title "Is a program linked against an LGPL library in linux still under GPL?" The answer is no, because it never was.

Merely running a program on Linux does not make it subject to GPL. There are all sorts of closed-source programs that run on Linux.

Similarly linking to an LGPL library does not make you subject to GPL, but generally only to LGPL.

So for your case, if you are only using LGPL code, and furthermore linking dynamically as per LGPL section four removes your obligation to supply source code for the library itself.

The summary from the FSF about why you should not in their opinion use the LGPL for a new work is

The GNU Project has two principal licenses to use for libraries. One is the GNU Lesser GPL; the other is the ordinary GNU GPL. The choice of license makes a big difference: using the Lesser GPL permits use of the library in proprietary programs; using the ordinary GPL for a library makes it available only for free programs.

Which attempts to make it clear, that LGPL libraries are not infectious like the GPL itself.

If therefore on the other hand, you are linking to full GPL libraries from your own code, then the situation is quite different, and yes you are obligated to open your program, as you should have been supplying (or offering to supply) the code all along.

1
  • A "good lawyer"? Perhaps you meant a competent one? Nov 17, 2011 at 4:56
5

You really should just read the LGPL, sections 4, 5 and 6. No attempt to simplify those words will preserve their meaning. You will also find that there are multiple positions on some of these questions and the only way to get an authoritative answer you can legally rely on is to get your own written opinion from a lawyer.

4
  • I don't know that "legally rely on" is the right wording. After all, a lawyers opinion is still an opinion - the courts aren't required to act according to that opinion.
    – user8709
    Nov 17, 2011 at 10:32
  • 1
    It's the right wording in many jurisdictions. The lawyer may be wrong, yes, but it won't be negligence on your side if you do rely on his faulty advice. However, if you rely on a faulty internet posting, you are far more likely to be considered negligent.
    – MSalters
    Nov 17, 2011 at 15:31
  • So it's a formal legal meaning behind "legally rely on" - a jargon meaning which is related to but different to the English language meaning, so that the term will naturally mislead non-lawyers. And the trouble with stating that as a criticism of lawyers is that all professionals do the same thing including programmers. Hmmm...
    – user8709
    Nov 19, 2011 at 1:34
  • It's jargon, but it's not exactly legal jargon. The same jargon is used in many professions that deal with liability. For example, pilots understand that if a qualified mechanic tells them that some work was done, there are specific rules that decide whether they may "rely on" the mechanic's statement or whether they are expected to check it themselves. (Whether or not they can rely on it has nothing to do with whether it's true or not. It has to do with whether the statement provides them a defense if it turns out to be false.) Nov 19, 2011 at 3:44
1

The fundamental gist of LGPL is that its code can be linked against any license software without affecting its license, as long as it's done in such a way that the LGPL'd code can be tinkered with, modified, and the code linked against will be possible to get to work with the modified version. The license of the program using LGPL'd pieces can be arbitrary and doesn't change, but the way it is written or distributed must enable replacing the LGPL'd part. And you must provide all the code necessary for the replacement: the code of the LGPL'd part and anything necessary to integrate it in your program.

That means:

  • if you use dynamic linking, provide just the LGPL code, allowing easy replacement of the Free .so/.dll
  • if you use static linking, you must provide object files that can be linked with the library to provide a working executable.
  • if it integrates deeply, compilation units (object files) containing both your and the library code, you must provide your code, at least as much as necessary to compile the ready program after modifying contents of the library.
  • if you modified the library itself to suit your needs - even if the changes are extensive and far beyond scope of the original library - you must provide sources to the new, modified library as LGPL. If you want to keep the changes proprietary, they must land elsewhere outside the library, either as a wrapper/abstraction layer, or as a separate library.
-1

The LGPL exists specifically to allow you to use GPLed source code, without the more restrictive terms of the full GPL.

This is usually applied to Macros,scripts libraries, and complex header files where without including the source in your code the rest of the GPLed library would be unusable.

1
  • Hmm... LGPLd code is not under the GPL, and does not allow you to use code under the GPL without following its requirements. Nov 17, 2011 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.