Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have found a GPL library (no dual license), which does exactly what I need. Unfortunately, the GPL license on the library is incompatible with the license of a different library I use. I have therefore decided to rewrite the GPL library, so the license can be changed.

My question is: How extensive do the changes need to be to the library in order to be able to change the license? In other words, what is the cheapest way to do this?

share|improve this question
1  
Rather than ask what's the CHEAPEST way, why not tell us the full story and ask "What's the right thing to do?" –  John R. Strohm Jun 19 '12 at 21:49
1  
If the other library is not compatible with GPL, perhaps that is the library you need to change. –  Paul Butcher Jun 20 '12 at 7:23
    
What license does the other library have? –  Andres F. Jul 17 '13 at 13:25
add comment

10 Answers

up vote 26 down vote accepted

I'm not a lawyer, but AFAIK if you have seen the GPLed library code any emulation library you write would be tainted and may be declared a derived work by a judge if it is too similar in his appreciation.

So the process would be to write a functional spec and have someone which hasn't seen the GPLed code write the library.

Edit: Note that with the way you formulate your question "How extensive do the changes need to be to the library in order to be able to change the license?" the answer is AFAIK clear: whatever you do, if you just modify the library you must respects the term of the license which makes you able to modify it in the first place.

share|improve this answer
1  
The tainting issue is probably not a very serious concern in practice. In cases where you're reverse-engineering a commercial entity's code, then the firewall between the reader and the implementer is necessary for the (essentially inevitable) infringement lawsuit, so you can show that the was no possibility of copying code from the other version. In the case of most GPL code, unless you're blatantly infringing nobody's going to sue you, since it's not in their interest to do so. –  Mark Bessey Jun 5 '11 at 23:07
1  
You may like Russian roulette, its your choice. If for any reason -- competition inheriting the code in a way or the other, or just competition deciding to finance the lawsuit -- you are sued and convicted, its something which may drown your company. Even if you are not sued, if it is known the bad reputation may be a problem. –  AProgrammer Jun 6 '11 at 8:09
    
I think the "tainted" issue mostly applies to NDAs. For copyright issues, it hardly makes sense. Consider that copyright also applies to books, newpapers, movies etc. George Lucas probably saw the Star Trek series on TV before creating Star Wars, does that make Star Wars a derivative work? If a newspaper reporter hears about something on radio, does that prevent him from writing about the same event? –  user281377 Jun 6 '11 at 8:37
3  
Clean room approach is just a way to prove that you haven't infringed copyright law. As I understand it -- and again I'm not a lawyer -- things developed without knowledge of the original work may not infringe copyright (but may infringe patents). Things developed with that knowledge may or may not infringe the copyright -- it is just harder to prove that similarities are due to random events or to the nature of the problem which make an approach natural. –  AProgrammer Jun 6 '11 at 8:49
    
@ammoQ: In the US, there was a copy infringement suit a long time ago (a statistical software package?) where a company was held to have infringed even though every line of code had been rewritten. Note that Star Wars isn't particularly similar to Star Trek, and that a newspaper reporter isn't going to write a story just from what he or she heard on the radio. –  David Thornley Jun 6 '11 at 13:58
show 2 more comments

The usual way round this problem is to first contact the library's owner and ask if they will release it to you under a different licence.

If you're working on an open source project where the GPL is not compatible, then there's a good chance they'll do this, some projects end up with a GPL licence just because it seemed like the best choice.

Of course, this applies to both libraries. Getting the permissive licence dual-licences under a less permissive one shouldn't be a problem.

If you're working with a commercial product, then many library authors will give you a release under a different licence, if you compensate them appropriately.

share|improve this answer
4  
It's worth a shot, but this does not work if the library's owner has accepted or made use of GPLed contributions, which is the case for many libraries. –  Brian Jun 19 '12 at 21:01
add comment

My understanding is that if you start with a work and modify it, no matter how extensive the modifications, the final result is a derived work of the original. You will need to write the library from scratch. If you write the library from scratch, but have seen the code, then if it is too similar you can again be sued for copyright infringement.

These rules are not specific to software, they apply to copyrightable things of all kinds.

I am not a lawyer, and this is not legal advice. I am also quite possibly not in your jurisdiction, and you should always be dubious of legal advice offered on the Internet. If you wish to have reliable legal advice, you'll need to pay a lawyer.

share|improve this answer
add comment

IANAL, but I do know that in the USA, no degree of modification will create a non-derivative work. If it has any code copied from the old library or it has enough internal similarity that it would get you in trouble for plagiarisim in a University class, then you are no-where near a new work. Changing some names of functions or variables won't do anything, neither will moving chunks of code around in the source. You would have to independently re-create it to even stand a chance. IOWs, you'd need to look only at the interfaces that it provides, and decide how to provide that functionality and re-create it that way to stand a chance. Even then you still might not be out of the woods if someone really cares and gets mad.

In the end, your best bet is to contact the author of the library and hope that you can find an arrangement for more permissive licensing of he library.

share|improve this answer
add comment

IANAL and, in any case, this may mean nothing legally, but, I believe that in Steven Levy's book "Hackers", he describe how, at one point, RMS wrote *nix code for money during the day and at night wrote the same stuff at home so that it could be part of... GNU?... this was before Linux... some free Unix type system. I believe that he had to make the home-code different than the day-code, but he was basically doing exactly what you are suggesting.

This probably doesn't matter legally, either but... I am not sure whether Apple and/or Microsoft got permission/license or something, but didn't bell labs invent the desktop/icon/mouse interface, which was used for Macs (or Lisa?) which was then used by Microsoft.

share|improve this answer
    
That would be Xerox PARC, not Bell Labs. –  Marnen Laibow-Koser Feb 18 at 16:02
add comment

There is no answer to this except for a trial before a judge in your particular jurisdiction. But do you want to risk it? Or go to the effort of re-writing the GPL library, the tests etc. etc. Are you sure the other library is incompatible with the GPL? This is actually quite unusual, unless you want to distribute both libraries under the non-GPL libraries terms.

share|improve this answer
    
You can get the Gnu list of licenses at gnu.org/licenses/license-list.html and you will notice that it's divided into free GPL-compatible licenses, free non-GPL-compatible licenses, and nonfree licences. The GPL has some specific requirements that other licenses frequently don't conform to, and one of the goals of GPLv3 was to make compatibility easier. –  David Thornley Jun 6 '11 at 14:01
add comment

It may be cheaper to pay the author of the GPL library to release it to you under a different license.

share|improve this answer
    
Not always possible, if the library itself uses other GPL'ed code. –  Andres F. Jul 17 '13 at 13:23
add comment

If everything else suggested here (asking for double license, rewriting) is not acceptable, please remember that it is still not a clear case whether or not dynamic linking with proprietary program/library is considered derivative work. FSF says it is, but many lawyers (Lawrence Rosen included) have questioned this.

So you can link your software with GPLed library, then make sure source code for it is distributed with every copy of your software. If anybody sues you, they have to prove, that their understanding of this tricky and murky GPL aspect is correct. As it appears (eg. Galoob vs Nintendo) you can't be absolutelly sure what makes derivative work and what doesn't.

share|improve this answer
    
or at least ask if the lib can be LGPL as well. –  Johan Jun 6 '11 at 11:07
1  
The dynamic linking issue is a difficult one, but don't count on a judge ruling your way. The judge might well rule that you accept the Gnu definitions if you use the Gnu license, and you probably don't want to base your software product on the outcome of a court case that hasn't happened yet. –  David Thornley Jun 6 '11 at 14:04
add comment

The only way it would not be derived work, would be if you'd rewrite whole code yourself without using any of the original code. Which is probably infeasible.

There are much easier ways around GPL:

  • in the clear: make it into service, access it through a socket. Socket is a boundary to GPL license (unless it's infamous GPLv3 with Affero clause);
  • in the gray zone: dynamically link it. There is lot of controversy if dynamic linking is or is not boundary to derived work. Few points of view here. This might also depend on jurisdiction you're in.

Also note, that GPL is distribution license, so you only need to license your work if you distribute binaries to third party. And you're only obliged to release source to them, no obligation to release it to general public, unless you release binaries to general public. If you're using your code for example only on your servers, you have no obligation to release any code. This is how for example Google does it with their tweaked Linux kernels.

share|improve this answer
    
I'm far from sure that socket is a barrier. According to our lawyers, engineers are too focused by technical measures while the global effect is what is checked by the law. Publishing a socket interface and giving an example use in emacs lisp was OK for them. But giving the possibility to automatically install emacs along with our program wasn't. You are right for the distribution. But note that you can't prevent the one to whom you distribute to distribute further. –  AProgrammer Jun 6 '11 at 9:51
    
@AProgrammer: even FSF says, that if it's separate process, then these are separate programs, thus not derivate work. FAQ's about the plugins, but the logic still applies: gnu.org/licenses/gpl-faq.html#NFUseGPLPlugins –  vartec Jun 6 '11 at 9:56
    
The question is about plug-in and plug-in are per nature not indispensable. I wouldn't bet my company that structuring a program in two processes, one GPLed because it used GPLed libraries the other not because we want to keep the source private is legit. Especially when both are distributed together. But that's your call. –  AProgrammer Jun 6 '11 at 11:26
1  
@A: distribution with other programs is "aggregation", and explicitly allowed by GPL. And no, that's not my call. Personally, I wouldn't touch GPL library even with 10-feet long stick. –  vartec Jun 6 '11 at 11:34
add comment

How extensive do the changes need to be to the library in order to be able to change the license?

In most parts of the world you need to start from scratch and not cut and past anything. You need new names for functions/classes/variables etc etc, and the structure should be different. Then you are safe.

On the other hand, if a diff-tool can't find any similarities then...

share|improve this answer
2  
If a diff tool can't find any similarities then it still may be a copyright infringement. Look at it from a non-programming viewpoint: I write a book, you translate it into Swedish, and by US (and likely Swedish) copyright law you made a derivative work. –  David Thornley Jun 6 '11 at 14:08
    
@David Thornley Yes, you are right about derivative work. –  Johan Jun 6 '11 at 15:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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