280

I have 3 questions about the GPL here:

  1. If I use GPL software in my application, but don't modify or distribute it, do I have to release my application under the GPL?

  2. What if I modify some software that my application uses. Then do I have to release my application under the GPL, or can I just supply the modified software under the GPLs terms.

  3. And what if I use GPL software, but don't modify it, can I distribute it with my application?

My case in point is, I have a PHP framework which I use the GeSHi library to highlight some output.

  1. Because GeSHi is GPL, does my framework have to be GPL?

  2. Can I modify GeSHi for particular use cases of my application if I supply the modifications back to the GeSHi maintainers?

  3. Can I redistribute my framework with GeSHi?

Stevoisiak
  • 1,264
  • 1
  • 11
  • 20
Petah
  • 3,351
  • 3
  • 18
  • 21
  • 16
    Commercial != Proprietary – Gerstmann Feb 13 '13 at 08:41
  • 4
    Just curious, what does distribute mean in this case? If the program in question were, say, firmware in an appliance where it cannot be touched by anyone but the company that sells the appliance, is that "distribution"? – Wes Miller May 21 '13 at 14:08
  • 2
    Yes the is distribution. That's why you find things like ADSL routers where the source code is (has to be) available for download. Reputable suppliers make the source available because the license conditions require it of them. Same applies to NAS boxes, IP cameras and numerous other gadgets. – quickly_now Jun 22 '13 at 01:11
  • 2
    @quickly_now - that is why the Tivoisation stuff was added in the GPLv3, so if you use GPLv2 code in an appliance, you don't really have to release it, but if you use GPLv3 code, you do. Remember that Tivo used GPL code and never released their modifications, which upset a bunch of people and in part lead to the GPLv3. – Scott Whitlock Feb 11 '15 at 13:13

6 Answers6

248

If I use GPL software in my application, but don't modify or distribute it, do I have to release my application under the GPL?

ANSWER: Your question is a little ambiguous. Two cases:

(a) If you do not distribute YOUR APPLICATION, then the answer is No, because you did not distribute your application. For example if it was for internal use only in your company, then you have no obligation to do anything.

(b) If you do distribute YOUR APPLICATION, and you used something GPL as part of your application (even if only linking at run-time to a library) - and even if you do not charge money - and even if you do not change that GPL s/w in any way - then you MUST make the source of YOUR APPLICATION available.

Making source available does not mean download. IT might be that you must get a written request and you send a photocopy of a listing (see comments: you can't actually send a listing. This was exaggeration to make a point). You are allowed to charge a "reasonable" handling / copying charge. But you can not escape the obligation to make your own source code available.

What if I modify some software that my application uses. Then do I have to release my application under the GPL, or can I just supply the modified software under the GPLs terms.

ANSWER: See above. If you used GPL s/w, then you must make your source code available. This includes the modified GPL code.

And what if I use GPL software, but don't modify it, can I distribute it with my application?

ANSWER: See above. You can distribute it (the GPL code), provided you make your source available.

Because GeSHi is GPL, does my framework have to be GPL?

ANSWER: If you distribute your framework, then YES.

Can I modify GeSHi for particular use cases of my application if I supply the modifications back to the GeSHi maintainers?

ANSWER: You can if you want to. You don't have to. You could modify it, but when you distribute your application you are obliged to make your source available and also the source for the modifications you made to the library.

Can I redistribute my framework with GeSHi?

ANSWER: You can if you want to. If your application is not distributed with the GPL code and you make users download it separately to make use of it, then your case is a little bit more special and might provoke some argument, but the same principle will most likely ultimately apply: you must make your source available.

If you want to avoid these problems then you need to use things with a different license or at the very least the LGPL which will allow run-time calling of libraries without the viral-spread of the GPL conditions back to your code.

When in doubt you need legal advice. Any advice you get here (from me or anyone else)should be treated fairly carefully. Only a lawyer can give you proper legal advice.

Mark Amery
  • 1,241
  • 13
  • 27
quickly_now
  • 14,822
  • 1
  • 35
  • 48
  • So what if my framework provides an interface for a syntax highlighter, and some one implements that interface using GeSHi. What effect does the GPL have on my framework in that case? – Petah Feb 12 '11 at 14:19
  • 100
    Got to love the GPL: Force everything that touches it to be open source – TheLQ Feb 12 '11 at 15:33
  • 37
    Just a note: it probably would violate the license to supply the source code as a photocopy. As noted in the license: "The source code for a work means the preferred form of the work for making modifications to it." – mipadi Feb 12 '11 at 18:49
  • 37
    @Petah: The GPL is like a virus: it infects everything it touches. If you provide a generic interface and you allow a user to install various components of their choosing, you MAY get away with not being contaminated by the GPL. HOWEVER, supposed you gave your stuff away and somebody else were to bundle the 2 together... then it would look like your stuff would be touched by the GPL. You have a very difficult situation no matter how you try and wriggle around it. – quickly_now Feb 12 '11 at 23:48
  • 3
    "Got to love the GPL: Force everything that touches it to be open source" and "The GPL is like a virus: it infects everything it touches." - These are not necessarily true. Refer section 2 of http://www.gnu.org/licenses/gpl-2.0.html. IANAL. TINLA. – bhadra Feb 26 '11 at 12:28
  • 5
    "it probably would violate the license to supply the source code as a photocopy" - In addition to what mipadi has stated it should be noted that section 3 of http://www.gnu.org/licenses/gpl-2.0.html explicitly mentions about "machine-readable source code" and "complete machine-readable copy of the corresponding source code". IANAL. TINLA. – bhadra Feb 26 '11 at 12:38
  • 12
    If the question has been asked several times, then why is this not a duplicate? –  Feb 26 '11 at 12:46
  • 1
    @bhadra: I think section 2 of your link is pretty clear: 2. "You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: ... b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License." <<-- NOTICE use of "must". – quickly_now Feb 27 '11 at 01:06
  • 7
    The spirit of the GPL is to guarantee that any and all users of your program has the same rights to modify the program as you have. The "infectious" nature is a result of preventing users from distributing your code in a way which deprives users from the right to modify the program. If you distribute a plugin under GPL to a program which is not GPL, I don't think that would cause any trouble. The non-GPL program cannot be redistributed *with* your GPL:ed program, but that is hardly your problem. – JesperE Feb 13 '13 at 12:06
  • 2
    GPLv2 requires you to make available the machine-readable source code. GPLv3 says, in part, "You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License...". In other words, offering a photocopy of the source listing is NOT GOOD ENOUGH. – John R. Strohm Feb 13 '13 at 15:58
  • 16
    Note that charging an "reasonable" handling fee is not a strong deterrent to people interested in your source code; the first recipient of your source code can choose to legally provide others with your source code. – Brian May 21 '13 at 14:12
  • OK point taken you can't distribute a photocopy. In the interests of keep the comments meaningful I won't update the original answer. – quickly_now Jun 22 '13 at 01:18
  • 10
    Re "reasonable handling fee". I once worked for a company required by GPL to distribute source code. Our handling fee was US$150, because to handle the request, gather the code from an archive (at latest revision), process paperwork, and email or burn a CD would take about an hour. At commercial engineering rates, the cost + opportunity cost was actually closer to $300 for that hour. So $150 was cheap. We still got shouted at for being "unreasonable". Most of those who criticise "reasonable" don't have much understanding of actual commercial costs. – quickly_now Jun 22 '13 at 01:21
  • 7
    How in sanity's name does something that should in any reasonably set up version control system take about five seconds plus the time to burn a CD if you're going to be old-fashioned about it take "about an hour" ? – Shadur Jul 16 '14 at 06:50
  • 12
    Lets see... in a real company with real people, every person has to be paid. So follow the steps. Mail or email comes in. Somebody has to read it. And then think and figure out what to do with it. Allow 5 mins. Send on to the person who actions it. Person who actions it takes 5 mins as well. Gets up, goes to cabinet, gets CD. Puts in drive. (another 5 mins gone). Finds stuff. Burns. 5 .. 10 mins. Takes out CD. Puts it cover. Finds padded bag. (5 mins). Addresses bag (after finding address... email dude asking). Seals bag. Walks to mail drop. Mail picked up by employee... count every true cost. – quickly_now Jul 21 '14 at 09:04
  • 5
    I worked out a long time ago there is no such thing as free, and no such thing as a 5 minute job. Every distraction, every task has a cost - both in doing it and in opportunity cost. Example above, task is about 30 - 45 mins of human effort consumed. Opportunity cost effectively doubles that. Calling it about an hour is roughly right for most people most of the time. If you seriously think these kind of tasks can be done for free, you'll winder why your boss is always bleating about cost overruns too. – quickly_now Jul 21 '14 at 09:07
  • 1
    and if the Closed Source Application (CSA) makes a system call to the GPL application, the same way we could do in the command line, manually, with parameters? But that call is so important that the CSA requires it to work. So, the GPL application is NOT a library. The CSA is NOT dynamically linking to the GPL application as lib. But, the CSA is, at runtime, on the user machine, making the GPL application create some output in a specific/predethermined way, very often. Do the CSA is forced to make its sources available? (I can make a new question with all I am thinking if it seems better too). – Aquarius Power Dec 14 '14 at 14:25
  • 4
    @quickly_now: So, there is a good reason to put it on a public server, so the first person can just send the link and be done with it. – Deduplicator Dec 14 '14 at 19:08
  • @Aquarius Power: Grey area. Perhaps it is OK. I am not a lawyer. I suggest you get legal advice. – quickly_now Jan 27 '15 at 06:35
  • 2
    @Deduplicator: One could of course put things on a public server. But remember it needs to be kept up to date (that is YOUR OBLIGATION), which means means that you need to have a PERSON regularly snapshot and/or separate things from your source control (after all you don't want public access to your entire proprietary source control do you?). Every change needs to be reflected into that public link thing. See... nothing is free. – quickly_now Jan 27 '15 at 06:37
  • 1
    @TheLQ Yeah right... Fantastic... :/ – Fabio Marcolini Feb 15 '15 at 15:35
  • How are you interpreting "If I use GPL software in my application"? There's a huge difference between referencing a library and not changing or including any of their source code versus integrating it such that your own work becomes a derivative work. It is probably worth clarifying. I think the first statement is open to misinterpretation. – AaronLS Jun 01 '16 at 16:24
  • @quickly_now, So, do you mean if php is open-source, Every php based application MUST be open-source? – Ramesh Pareek Oct 01 '16 at 16:25
  • 1
    You need to read the license terms of PHP. You can find those here: http://www.php.net/license/3_01.txt PHP is not governed by the GPL. When using open source s/w, reading the license is important. – quickly_now Oct 04 '16 at 07:58
  • 1
    @AaronLS - agreed. You need to read the specific license, however GPL tends to be far more embracing than LGPL, for example (or for that matter many other open source licenses). – quickly_now Oct 04 '16 at 08:00
  • 1
    This answer is incomplete. There is a way to include gpl software in your own software, and be to distribute it without having to make your own software gpl. See the official gpl faq on the gnu website on the topic of software aggregates: https://www.gnu.org/licenses/gpl-faq.html#MereAggregation – Sámal Rasmussen Sep 23 '17 at 12:22
  • Yes, by all means read that reference. It clarifies things. If you use pipes or other RPC mechanisms then you are probably not touched by the GPL. Making function / library calls in the same address space (even as run-time binding) then you are touched by the GPL. – quickly_now Feb 04 '18 at 02:29
  • @Petah If someone else writes the syntax highlighter, that has no effect on your program. (The other person would not be allowed to distribute their highlighter together with your program) – user253751 Apr 18 '18 at 03:56
  • 1
    `Only a lawyer can give you proper legal advice.` not really true, nor is there any guarantee that a lawyer advice will hold up though a legal case. Anyone competent on the subject can give a proper advice, and no proper advice is guaranteed to be immune to legal interpretations or court interests. – dtech Nov 20 '18 at 12:48
  • @dtech: Not a very good comment. "Any advice you get here (from me or anyone else)should be treated fairly carefully. Only a lawyer can give you proper legal advice." is known as a DISCLAIMER. I'm not claiming to be a lawyer. A lawyer might know, or not. OR might give good advice. Or not. But don't interpret what I say (OR ANYONE ELSE COMMENTING HERE) as being legal advice. It isn't. – quickly_now Nov 24 '18 at 04:02
  • The properness of an advice depends on the competence behind it. And competence goes beyond labels people put on things ;) Granted, an experienced lawyer who has practiced sufficiently in the field of IP and licensing is significantly more likely to produce a good advice than someone else, but that's a rather specific condition. Being a lawyer is just a profession, it is not some form of divine authority. And again, there is absolutely no guarantee that a lawyer's advice is proper or able to hold up in court, and that a non-lawyer's advice cannot make a legal case. – dtech Nov 24 '18 at 08:40
  • It is OK to wipe your hands clean of liability that your legal advice shouldn't be taken for granted, but neither should your advice on who can and can't give proper legal advice, unless you are central or professional authority on the subject ;) Are you qualified to qualify who is qualified? I'd personally word that disclaimer of yours a bit more carefully. – dtech Nov 24 '18 at 08:44
  • I am using ejabbered instant messaging server and its GPL. if i created a mobile chat app using this will i have to open sourced my whole project code? – Manish Kumar Mar 13 '19 at 15:33
  • What does making available mean ? This answer seem to say that "making available" has very little practical meaning though – David Geismar Apr 13 '21 at 06:57
  • 1
    David Geismar - there are various legal actions have been taken around the world, for GPL violations. Many are settled out of court so "make available" may still be ambiguous in law. Neverthess, it seems to be fairly widely accepted that "make available" means that you either publish the source, or provide it upon request. Effectively, it has a pretty wide applicability and trying to weasel out of "make available" with clever words is unlikely to end well. – quickly_now May 11 '21 at 23:35
  • @quickly_now Maybe it is unreasonable because you could have put the source code on whatever you shipped to begin with. Or on your public web server. It is not the customer's fault that you have made your process unnecessarily difficult for yourself. You don't get to put the code in a locked vault at the bottom of the ocean, throw away the key and then charge the customer $30000 to hire a professional dive team and safe-cracker. Charging for the CD and postage and some labour is reasonable but you can't artificially inflate your costs. IANAL. – user253751 Jul 09 '21 at 09:46
  • Hasn’t been mentioned, but if you don’t fancy having to give source code to random people: If you enclose the source code with every single distribution of your software, then you have no other obligations. That way you create only once what you want to distribute. – gnasher729 Jul 09 '21 at 19:22
  • So how do you do this when shipping an embedded widget thats the size of USB stick and uses open source code? Do I include another USB stick with it, with the source code on? And are customers prepared to pay the additional cost of that being included in every product shipped even though 90% of them will throw it away? – quickly_now Sep 12 '21 at 06:05
17

This very strongly seems to disagree if you are using it on a website, rather than re-distributing an executable:

You may copy, distribute and modify the software as long as you track changes/dates of in source files and keep modifications under GPL. You can distribute your application using a GPL library commercially, but you must also provide the source code. GPL v3 tries to close some loopholes in GPL v2.

Specifically:

If you distribute this library in an executable, you must disclose your source code by providing it either alongside your distribution or list an accessible way (URL, physical copy) to obtain the source for 3 years. Does not apply if you serve through a web portal.

https://tldrlegal.com/license/gnu-general-public-license-v3-%28gpl-3%29

StayOnTarget
  • 487
  • 2
  • 12
Maslow
  • 371
  • 2
  • 7
  • 3
    Could you expand on this? Currently its a one sentence bit of your own and the text from tldrlegal. How does using GPL on a web site differ from using it in a stand alone application? –  Jul 20 '14 at 18:22
  • A web site usually dont distribute software (but just provides a service) – Basile Starynkevitch Jul 20 '14 at 18:23
  • 5
    ASIDE: there is the AGPL license that tries to address GPL running as a service: https://tldrlegal.com/license/gnu-affero-general-public-license-v3-(agpl-3.0) – kbrock Aug 18 '14 at 23:32
  • If the GPL library in question is written in say HTML, javascript, and CSS, and the library code gets "distributed" by the server to the web browser of people visiting the website, I wonder if that might cause your other HTML, javascript, and CSS code to become GPL. One interesting point is that this code would already be "available" just by viewing the source of the webpage, although possibly not in its preferred form. However, even then, your server side code is not being distributed, and therefore I imagine would not need to be GPL. – still_dreaming_1 Nov 15 '15 at 15:20
2

Disclaimer: I am not a lawyer and I haven't read either version of the GPL in a while, so this answer might be legally inaccurate.

If you release/distribute software containing GPL'd components (such as statically linked libraries), your software must be covered by the GPL. (This is the impression given for version 2; version 3 may be different.)

If you release/distribute software using LGPL'd libraries, your software doesn't need to be covered by the GPL, but the libraries must retain the LGPL.

Modification of [L]GPL'd components suggests contribution back to the creator/maintainer. I'm not clear on how that affects your product's licensing.

Agi Hammerthief
  • 564
  • 1
  • 5
  • 16
0

Some points about the “internal” use: 1. careful if you hire contractors and give them the software. That might be distribution. 2. Tell your employees not to distribute the software. So if they do, they are committing copyright infringement, not you. 3. If you distribute the software with source code then you have fulfilled all your obligations. Nobody can ask you for anything. 4. If you distribute the software with a promise to deliver the source code, anyone in the world can ask for the source code.

gnasher729
  • 42,090
  • 4
  • 59
  • 119
0

I Am Not A Lawyer, buuuut:

Unless someone in the comments disagrees, I'd like to point out that if you need to use a bit of GPL code at your devops / build layer, you can make that tool a separate application which CAN, potentially, be made open source w/o giving away the product your other-named tool builds.

If you use GPL code at runtime, you gotta give out the source. If you give out a prebuilt developer environment (docker image, etc), that counts as distributing and you have to make all the gpl-using code also open source... so take some extra time to carve out my-fork-of-gpl-thing that you are comfortable giving away, and just use that app "internally" (see https://opensource.stackexchange.com/questions/2338/can-i-use-gpl-libraries-in-a-closed-source-project-if-only-the-output-is-distrib for more details)

Ajax
  • 161
  • 1
  • 4
-4

We can force such rules in the jungle, but in real life (juridical of country or state) it depends on who, whom, when and what.

The legal problem (law) raise when you do an act of distributing GPL program as binary or library on non GPL OS. GPL program is infecting and infected the parent and the child non GPL process (proprietary and even other open source license) from the perspective of law. Infecting means derived program violate GPL, infected means GPL program violate its own license. No problem exists when you compile a distributed GPL source as act individual (person, org, company).

  • 11
    this seems to merely repeat points made and explained in [prior answer](http://programmers.stackexchange.com/a/47048/31260) that was posted 4 years ago – gnat Aug 10 '15 at 07:04