16

Possible Duplicate:
Using LGPL library in a commercial Java application

Hello guys!

There is a project under the GNU Lesser GPL license. I want to use this project in my application. Can I sell my application using this license?

Community
  • 1
  • 1
Infinite Possibilities
  • 7,415
  • 13
  • 55
  • 118
  • dupe: http://stackoverflow.com/questions/1910979/using-lgpl-library-in-a-commercial-java-application – Thilo Jan 27 '10 at 07:58

5 Answers5

19

In a nutshell, the idea of LGPL'd projects (usually libraries) is that you are free to use them as you wish in your own application, be it open or closed source, free or proprietary - as long as you publish the source code of the LGPL'd part (if you modify the LGPL'd part, you must publish the modified sources, under LGPL).

Additionally, the libraries must be linked dynamically so that they could be replaced to another version by the user if he so wishes. For libraries (.dll, .so, .jar...), this is usually self-evident. Side note: this is inherently pointless requirement, because nothing requires that your application works with any other library version than the one that you originally provided. You could even actively prevent your application from working with other versions.

Joonas Pulakka
  • 36,252
  • 29
  • 106
  • 169
  • 3
    "You could even actively prevent your application from working with other versions." is plain wrong. Read the LGPL. – Erich Kitzmueller Jan 27 '10 at 08:51
  • 6
    Please show me where it's forbidden. LGPL requires that "it must be possible for the software to be linked with a newer version of the LGPL-covered program". But it doesn't require that the resulting program works! And how could it require that -- it's not uncommon that downward compatibility breaks every now and then, even with libraries. Granted, breaking the program intentionally is against the *spirit* of LGPL. – Joonas Pulakka Jan 27 '10 at 09:17
  • Addition: what LGPL actually requires is that your proprietary software's license must *allow reverse engineering and modifying* of *your* program so that compatibility problems with other versions of LGPL libraries could be resolved. But as it doesn't require publishing sources of your proprietary application, this reverse engineering business is pretty much a theoretical possibility. – Joonas Pulakka Jan 27 '10 at 09:29
  • 2
    "breaking the program intentionally" -> see comment on my answer – Erich Kitzmueller Jan 27 '10 at 10:23
  • Can i use api provided by LGPL libraries for commercial purposes and use my own license? Do I have to open my code to public.Sentil – user1503117 Oct 16 '14 at 09:12
  • @user1503117 You can use LGPL libraries in a commercial product, with your own license. The LGPL libraries remain LGPL, but your code remains your code. – Joonas Pulakka Oct 16 '14 at 12:00
  • "Your proprietary software's license must allow reverse engineering and modifying of your program" - does that also apply in case when LGPL-licensed part is a helper *application*, not a library? This might be very important when the non-LGPL part is written in interpreted language and so the technical barrier to reverse engineering does not exist, leaving only the legal barrier standing. – Septagram Mar 20 '16 at 07:16
  • @Septagram I'm not a lawyer but I guess that if your program requires / depends on the LGPL-licensed part, and you distribute the LGPL-licensed part, then you have to follow LGPL. – Joonas Pulakka Mar 20 '16 at 18:49
5

You can use LPGLed libs with your proprietary software, but there are some restrictions you must observe. Better read the LGPL carefully and contact a lawyer.

Erich Kitzmueller
  • 36,381
  • 5
  • 80
  • 102
  • 1
    See http://www.gnu.org/copyleft/lesser.html and http://www.gnu.org/licenses/gpl-faq.html – csl Jan 27 '10 at 07:48
  • What this means that my proprietary software? – Infinite Possibilities Jan 27 '10 at 07:48
  • 4
    Besides all the "must include copyright notice, must provide source for the lgpled lib" stuff, you have to make sure that users of your software can use a modified version of that lib. – Erich Kitzmueller Jan 27 '10 at 07:54
  • 1
    "you have to make sure that users of your software can use a modified version of that lib." - Sorry, but this doesn't make sense. How on earth could you *make sure* that your software can be used with something that *doesn't necessarily exist yet*? I surely can modify some LGPL lib so that your software doesn't work with it. But it doesn't imply that either of us is violating the LGPL :-) – Joonas Pulakka Jan 27 '10 at 09:21
  • 1
    I'm refering to section 4, i.e. the "A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version." part. Of course the software can break if the modified lib is broken. But "... will operate properly..." means, at least IMO, that you may not intentionally prevent the use of modified libs. – Erich Kitzmueller Jan 27 '10 at 10:22
  • Thanks for the clarification. I think the keyword is *interface-compatible*. So with criminal mind, you could provide an interface-modified version of the original LGPL library with your application, and make your application to work with that interface only. Of course you need to publish the modified sources too, but regardless, this modification effectively prevents using any other version with your app. Anyone who wanted to use a newer library version would have to somehow merge your interface modifications into it. Well, so much for the criminal mind, I think the *spirit* of LGPL is clear. – Joonas Pulakka Jan 27 '10 at 10:32
  • 1
    I've done exactly that, with a non-criminal mind (Added an environment-specific initialization function that I call). It effectively creates a branch, but it doesn't take away any LGPL rights my users have. – MSalters Jan 27 '10 at 12:12
5

General notes, You can use a LGPL library if

  • You link with it dynamically only allowing user to replace specific library (for example replace dll to newer compatible version).
  • If you make changes in LGPL code, you release the changed library sources as well.

Generally many closed source projects use LGPL code, it is common practice, but read license carefully, especially this GPL-FAQ.

If you have doubts, contact lawyer.

Artyom
  • 31,019
  • 21
  • 127
  • 215
1

If you are using the GNU app as part of the development process, then the resulting code is saleable.

If you are calling or otherwise using the public APIs of the GNU app then your app is saleable provided you package and distribute the GNU app as a separate component complete with the original app -- and make it clear in your documentation that you are using the GNU library and it still belongs to its original authors under the GNU license terms.

If on the otherhand you have modified the package, cut and pasted code from the package, inserted your code into thier programs or otherwise changed thier code to get yours to work you can only further distribute with the same gnu license. This does not actually preclude selling the software, but, there are all sorts of complications so its best not to go there.

If in doubt contact the original authors, tell them what you have done/intend and ask them what they think - it is afterall thier software your messing with.

James Anderson
  • 27,109
  • 7
  • 50
  • 78
1

Short answer is yes, you can sell your application under any license you like. The only thing you need to do is:

  1. Mention somewhere that your product uses that library, anywhere, in the about box, in the splash screen, in the manual...

  2. If your customers ever ask for the source code of that library (not necessarily your application), then you must give it to them or tell them how to obtain it. But note that only your customers/users actually have this right (and most customers don't bother right?).

That is basically it in a nutshell though I would still recommend you read the GPL FAQ posted by Artyom.

slebetman
  • 109,858
  • 19
  • 140
  • 171