27

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?

Walter
  • 16,158
  • 8
  • 58
  • 95

9 Answers9

36

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.

AProgrammer
  • 10,404
  • 1
  • 30
  • 45
  • 3
    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 05 '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 06 '11 at 08:09
  • 2
    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 06 '11 at 08:37
  • 7
    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 06 '11 at 08:49
  • 1
    @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 06 '11 at 13:58
  • 1
    A work can be derived even if every line has been rewritten, that's something I don't deny. That's similar to a translation - a Chinese translation of Harry Potter is still a derived work. – user281377 Jun 06 '11 at 16:00
  • The Mono team agrees with this answer: In [Contributing](http://www.mono-project.com/Contributing) : "If you have looked at Microsoft's proprietary implementation of .NET or their shared source code (which is also proprietary), you will not be able to contribute to Mono." – Brian Jun 19 '12 at 20:59
  • _"have someone which hasn't seen the GPLed code write the library"_ this is going **way** too far. I'm not a lawyer, but I'm pretty sure he can just do it himself, as long as he doens't actively use the other library as a reference. – o0'. Oct 19 '14 at 10:18
  • 1
    @Lohoris,see my previous comments; it's not striclty needed, it's a way to ease the proof. About "going way too far", clean room approach was deemed necessary by the lawyers of a company I worked for (not for GPLed code, but I don't think the license has any influence of that), and the lawyers of the current one don't want us to look at GPLed code relevant to our projects. – AProgrammer Oct 19 '14 at 16:31
22

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.

gbjbaanb
  • 48,354
  • 6
  • 102
  • 172
  • 11
    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
  • ^ Unless they had a "contributer's" agreement which reassigned copyright back to the original authors: https://softwareengineering.stackexchange.com/a/225577/93511 – Jonathan Mar 06 '19 at 20:08
17

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.

btilly
  • 18,250
  • 1
  • 49
  • 75
4

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.

ddeflyer
  • 41
  • 1
1

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.

1

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.

Jacek Prucia
  • 2,264
  • 1
  • 17
  • 15
  • or at least ask if the lib can be LGPL as well. – Johan Jun 06 '11 at 11:07
  • 2
    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 06 '11 at 14:04
1

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.

vartec
  • 20,760
  • 1
  • 52
  • 98
  • 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 06 '11 at 09: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: http://www.gnu.org/licenses/gpl-faq.html#NFUseGPLPlugins – vartec Jun 06 '11 at 09: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 06 '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 06 '11 at 11:34
0

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.

Neil Butterworth
  • 4,056
  • 3
  • 23
  • 28
  • You can get the Gnu list of licenses at http://www.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 06 '11 at 14:01
0

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...

Johan
  • 281
  • 2
  • 8
  • 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 06 '11 at 14:08
  • @David Thornley Yes, you are right about derivative work. – Johan Jun 06 '11 at 15:13