34

I'm looking at licensing some open source software and am looking at the GPL. What are the pros and cons of using this license?

Huperniketes
  • 2,205
  • 14
  • 17
makerofthings7
  • 6,038
  • 4
  • 39
  • 77
  • 1
    possible duplicate of [Why is free software good for programmers?](http://programmers.stackexchange.com/questions/2932/why-is-free-software-good-for-programmers) –  Sep 28 '10 at 16:02
  • 6
    not a duplicate. This question is focused narrowly on the GPL and not taking a "high view" perspective. – makerofthings7 Sep 29 '10 at 15:45
  • 1
    I'd tend to go for one extreme or the other: AGPL or WTFPL. – TRiG Dec 07 '10 at 13:10
  • Let's put this into perspective. If Microsoft would of come up with this license first and kept all the provisions exactly the same, the license would not have the same following. The FOSS and GLP are not what they appear to be. Read their Manifesto. They are not about Anarchy, they are about control. – Andrew T Finnell Jun 15 '12 at 14:42

6 Answers6

49

Ok, my list of pros and cons of GPL:

Pros

  • It makes people think hard about whether they really buy into Open Source; are you prepared to live by it, and let other people use what you've written, rather than just liking it because of what you can get out of it?
  • It makes sure that when something has been developed by the Open Source community, it stays Open Source; no chance of someone taking all the work that others have been doing, repackaging it and selling it on.

Cons

  • It's a complete no-no for most corporate organisations; they can't afford the risk of GPL-licenced code getting into their products, so virtually all medium-large companies have clauses explicitly banning GPL-licenced code.
  • It puts people off Open Source.
  • Is it really fair, that because I use your Open-Source image picker control in my app, my whole app must now be Open Source too? Even if I improved the image picker and contributed that code back to the community? The terms are too onerous for many developers.
  • Lots of people aren't aware of the stringent terms of GPL, so use it as it's the licence they've heard of without realising what restrictions they're placing on anyone else that wants to use it.
  • Its extremely viral. If your project contains a component that contains a component that contains a component that is under the GPL (phew!), your whole project is subject to the GPL too.

Ultimately for me the cons outweigh the pros. To me it smacks of Open Source Evangelists trying to trick the world into going Open Source instead of persuading the world of its benefits.

h4xxr
  • 646
  • 6
  • 4
  • 10
    +1 for some of the cons, for which yes, I agree, are too "strict". MIT licence is a nice alternative. – Rook Sep 28 '10 at 00:22
  • 3
    +1. I think the worst part of it is that it doesn't even play well with other open-source licenses. If there's a really great library that's GPL licensed and a really great library that's MPL licensed, I can't use them both in the same (free and open-source) project. – Mason Wheeler Sep 28 '10 at 00:24
  • 18
    This is such transparent FUD: "It's a complete no-no for most corporate organisations; they can't afford the risk of GPL-licenced code getting into their products, so virtually all medium-large companies have clauses explicitly banning GPL-licenced code." GPL-licensed code and projects have been non-controversial at Fortune 500s since at least 2004, and indeed many large companies (Google, IBM, Oracle to name a few) have based much of their business off of it. –  Sep 28 '10 at 16:01
  • 1
    In fact, if you run Linux (which even [Steve Ballmer admits captures more sever share than Windows](http://www.pcworld.com/businesscenter/article/151568/ballmer_still_searching_for_an_answer_to_google.html)), you deal with the GPL. –  Sep 28 '10 at 16:01
  • One major problem with GPL'd code is that you can't incorporate it into major projects with more permissive licenses (e.g. PostgreSQL, X11). There is a situation I'm currently facing involving a patch to PostgreSQL which included some modified code of GPL origin. Although it's been modified to the point of hardly being a "copy" anymore, it still raises concern of "GPL contamination". So yes, the GPL really is viral, and it affects more than just proprietary software. – Joey Adams Sep 28 '10 at 17:03
  • 1
    Mark Trapp, I think you're confusing GPL-licensed code with open-source in general (noting your incorrect comment on the OP too). I am *hugely* in favour of open-source, but there are a number of very specific problems with GPL. And yes, Google have made extensive use of GPL-licensed software, and look now at the lawsuit they've got from Sun/Oracle!... – h4xxr Oct 07 '10 at 15:56
  • 15
    There's a difference here between software product companies, who often can't touch GPLed code, and companies that use software for internal use, where the GPL has essentially no effect. There are a lot more of the latter than the former. – David Thornley Oct 08 '10 at 14:56
  • 9
    BTW, the GPL was designed as a driver of a social movement, but the intention was to create a repository of Free Software that would always remain Free, and which would become increasingly tempting to use. It was not, as far as I can tell, an attempt to trick developers into anything. Further, the person behind the GPL, Richard Stallman, disavows all connection with Open Source as opposed to Free Software. – David Thornley Oct 08 '10 at 15:58
  • 5
    David Thornley's experience basically matches mine. I've never heard of a company that wouldn't use GPL'd code for internal use. Heck, everyone's got Linux in dozens of places. However, many companies that develop software for distribution will not allow GPL code anywhere near their development code base. LGPL is typically okay, but not always. – David Schwartz Aug 23 '11 at 13:35
  • 1
    @MarkTrapp Running Linux has a special GPL provision or else no one could run commercial software on Linux. GPL essentially has a corporate mentality like other proprietary corporations. Do it our way or you don't get it. It's like your SO saying: I support you in any decisions you make, as long as they are my decisions. – Andrew T Finnell Jun 15 '12 at 14:36
  • @DavidSchwartz He needs to update the answer to be more specific about the uses of GPL code. Internal products normally are not a problem. Integrating them into services or products that will be used for profit is a problem. – Andrew T Finnell Jun 15 '12 at 14:37
  • @AndrewFinnell What special GPL provision for running Linux are you talking about? Also, the GPL isn't a corporation (or even an organization) so it cannot have a "corporate mentality", or any other mentality for that matter. You probably meant the Free Software Foundation (in which case I'd still disagree, but at least your comment would make sense!) – Andres F. Jun 15 '12 at 14:42
  • @MarkTrapp: if we're talking Google, then the case is that they understand GPL quite well, and they also understand concept of GPL-condom. For example bionic is GPL-condom shielding Android from implications of GPL-ed kernel. – vartec Jun 15 '12 at 14:46
  • 1
    I disagree with this answer, and have specific problems with some "Cons": that the GPL "puts people off Open Source" is wrong for two things: first, the GPL is about Free Software, not Open Source. Second, the _vast_ number of GPL'ed projects seems to contradict the assertion. – Andres F. Jun 15 '12 at 14:46
  • @AndresF. There is a group of lawyers whose sole job is to sue people that violate the GPL. http://www.theinquirer.net/inquirer/news/1726810/free-software-lawyers-win-gpl-lawsuit . While that group is not specific to the GPL license per say, it's for the FOSS. Read "Legal Aspects" under http://en.wikipedia.org/wiki/Linux_kernel – Andrew T Finnell Jun 15 '12 at 14:46
  • 1
    @AndresF. I haven't come many GPL'ed libraries that I've needed excluding the linux kernel. Apache, BSD and MIT licensed software competes with most of the GPL libraries. – Andrew T Finnell Jun 15 '12 at 14:47
  • @AndrewFinnell Sorry, but you're not making sense to me. This is not the best place to discuss it, I know, but none of the "legal aspects" section from the wiki points to "special provisions" for using Linux. Also, if the GPL is enforceable, are you really surprised there are lawyers that do it? Not sure what your point is... – Andres F. Jun 15 '12 at 14:50
  • @AndresF. Er, you are correct about the Wikipedia. We can bring it to chat if you wish or e-mail me. We'll take it off SE – Andrew T Finnell Jun 15 '12 at 14:52
  • @DavidSchwartz: *"I've never heard of a company that wouldn't use GPL'd code for internal use."*, mind you that FSF has closed "SaaS loophole" (I love how FSF uses RIAA/MPAA lingo), which means with GPLv3 you have to be careful even about internal use. Luckily Linus Torvalds said that Linux kernel will never switch to GPLv3. – vartec Jun 15 '12 at 14:55
3

Although h4xxr definitely gave an answer FTW, here are a few more links which could prove useful, if you're unsure of what different types of licences represent.

Comparison of free software licenses (table comparison)
Open Source Initiative - Licenses by Name (what it says - commonly used licences in today's software world) List of software licences, including those compatible with GPL

F--- GPL <-- intelligent criticism (gotta love these "pearls of wisdom" :-)

Rook
  • 19,861
  • 9
  • 53
  • 96
2

Choosing GPL is the ideological step:

You are giving the advantage to free software developers, because they can use your library, and the commercial players can't (at least as long they don't want to release their product as GPL). Corporations must pay their workers to write the library that has the same functionality. You're promoting free software in that way.

Choosing less restricted licence, such as MIT is more practical:

You can use your library yourself, when coding for money (as freelancer, as employee). However, everyone can, so you're helping in that way the corporations to save money, although they are already rich without it.

  • +1 The GPL is an ideological/philosophical decision, not technical. Whether this is a good or a bad thing depends on philosophical matters, and is up to each project or team to decide. – Andres F. Jun 15 '12 at 14:52
2

FWIW I personally have a big open source project which I am lead developer on and I've adopted a multiple license model precisely because the GPL was holding some people back from using my code. My code is licensed under a choose your own license model and allows any of the following licenses - GPL, LGPL, MIT

The LGPL allows people to incorporate your code/library/executable as-is in their product providing it is not modified. This is most useful for companies building commercial/closed source products that might need your product to function but don't need to change how your product functions.

The MIT License is essentially a permissive license that lets people modify your work however they wish and repurpose it for their own work. Use this if you've suspect users may want to do this and you don't mind not having access to the source of any modifications people might make.

RobV
  • 121
  • 4
  • Wouldn't it be enough to release under the MIT license, as it is compatible with the GPL and LGPL license? – Gellweiler Jun 06 '20 at 15:12
  • @Gellweiler Sure, with historical hindsight I now license any new projects under a permissive license (typically ASLv2 for me). But ultimately as other answers have said its as much about preference and ideology than any technical arguments – RobV Jun 09 '20 at 08:29
1

When it comes to liberally-licensed open source projects (e.g. X11, PostgreSQL, Haskell), the GPL and LGPL backfire. GPLed code cannot be used in such projects, not because the GPL forbids it or the X11 license forbids it, but because such projects do not want to "upgrade" their entire product's effective license to the GPL.

Joey Adams
  • 5,535
  • 3
  • 30
  • 34
0
  • Benefit: you are legally guaranteed that people make their changes/contributions available to you.
  • Cost: many commerical users can not use your code. They will not use your code and thus will never contribute. See this thread explaining why the libcinder people can not use (L)GPL code. Even the LGPL can be problematic when they need to statically link the library.
LennyProgrammers
  • 5,649
  • 24
  • 37
  • I think that's only true if in non SaaS scenarios... and also I may need to find my forks and ask them to share a copy with me. – makerofthings7 Sep 30 '10 at 01:42
  • That's true, for SaaS there is the AGPL. Identifying breaches is non-trivial but when found, there are people to help you: http://gpl-violations.org/ – LennyProgrammers Sep 30 '10 at 08:16
  • Your benefit is wrong: if I edit the software and use it myself, you have no right to see my edits. Same goes if I distribute it to a group with no interest of sharing it. The *user* has the right to see the source, not everyone. – K.Steff Jun 15 '12 at 14:19