Random rants from a KDE user which also works on making KDE more Hebrew friendly.

Friday, December 25, 2009

Removing GPL code

This is an interesting question I have after reading about MonoDevelop removing GPL code:

I have this application which I license under the terms of BSD, and I saw a GPL library (lets call it libbar ) which might help me. I incorporate the library by dinamic linking. Now my application is effectly a GPL binary, sweet.

Now, I write myself a new replacement library and release it under the terms of BSD. I replace the old "legacy" library by my new one.

Scenario 1:
Lets assume, my application uses (derives classes, whatever) code from libbar. If I remove the GPL code and change it by BSD code - my work even tough it does not contain GPL code - it's a derived work, due to compile time constrains. Am I correct?

Scenario 2:
Lets assume that libbar, uses abstract classes/methods from libfoo (which is BSD). Lets assume that my application uses the interfaces exposed in libfoo, then libbar  extends those interfaces, and I am not directly using libbar. When I use my new BSD library, my application is not compiled against any GPL code (just linked to) and it never used it directly. My old code was GPL by run-time constrains and, and the new one is BSD. Am I correct?

The problem wuth scenario 2, is that even if I am wrong, and my BSD code is "forced" to be GPL, this would not held in court. I still remember the wifi drivers issue the freebsd guys had (openbsd? a link in the comments would be a good idea...)

10 comments:

Pawel said...

It's sad MS evangelists like Icaza, 'Lefty' Schlesinger lobby againt GPL[2,3] code. Novel's mono (sic!) player Banshee is Mit licensed, it also seems Gnome's moving away from GPL to LGPL and others. Another sad thing is such people advertise MS products/technologies at planet gnome. All this lobbying started after MS and Novel deal. Icaza's adoring MS Codeplex over Sourceforge... They choose C# over more mature Java, Silverlight over more mature and much more popular and Linux friendly Flash (however, not perfect), non GPL licenses over GPL. It all started after mentioned deal. While Gnome is becoming MS Gnome I'm really happy there's much more advanced, powerful, really free (as Freedom) and much more Linux' users friendly DE like KDE SC.

Agony said...

I don't understand the big deal here. They are moving it to LGPL not some kind of propritary license. LGPL=Library GPL, and that's what Mono mostly is. We *want* people to build on top of it!

Why was Qt's move from GPL to LGPL welcomed while this is not?

And for the record: I used mono once when I first moved from Windows to Linux and have been using C++/Qt ever since.

Pawel said...
This comment has been removed by the author.
Pawel said...

"LGPL=Library GPL, and that's what Mono mostly is."

Library - this is the point. This license is made for libraries not for applications. However, they're started to be very proprietary (MS) friendly since the Big Deal. I'm talking mainly about Gnome devs (or some members) tendency to move away from GPL which isn't proprietary friendly. I didn't mean Mono only.

Kevin Kofler said...

It's actually the Lesser GPL and not recommended even for libraries.

iain said...

"it also seems Gnome's moving away from GPL to LGPL and others."

Gnome has always used LGPL for its libraries for the past 10 years.

elcuco said...

PEOPLE:

I DON'T CARE ABOUT GNOME NOR MONO... let them write free (GPL/LGPL/BSD/MIT) applications in their own good spot.

My question is about how "legal" this move from GPL to LGPL is, in th scenarios I mentioned.

iain said...

If you link to a GPL library then your binary has to follow the GPL license.

So scenario one is correct, the application is GPL as it links to libbar.

Scenario two is incorrect, the application is still GPL as it is linking to libbar even if it does not use libbar. If you want it to be BSD then you link it just to libfoo, not to libfoo via libbar.

However none of this really has any relevance to the Monodevelop license change, as the GPL code that was in Monodevelop has been completely removed and rewritten.

Pawel said...

@Iain

"Gnome has always used LGPL for its libraries for the past 10 years."

Yes, but I was talking about applications not about libraries.

Paul said...

@elcuco

IANAL, but the relevant part of the GPL v2 license in your case is this one:

"These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it."

Now, in your first scenario, you are #including GPL licensed headers. This is seen by some as including GPL licensed code in your binary (This is the view Trolltech had when they where distributing QT under the GPL). So you would want to talk to the copyright holders of libbar for clarification.

In the second scenario, your program should be an independent work and you can license it under any license you want. BUT, you can not distribute your program with libbar. As long as your program and libbar are distributed separately, then you are ok.