I have found the app, which uses the code, released under GPL3 license, however, the app itself isn't open-source. For the last two days tried to find a reasonable answer but couldn't find any. Might it be illegal or I am missing some data here? I always thought that if GPL3 code is used within the app then the app should also fall under the same license.

  • 3
    Whether or not hte app is a derivative work of the prior GPL'ed code depends on how the app uses the code. Without knowing the details (ie, which app) it's impossible to give any kind of specific comment. You can get general advice on the matter on this site by doing a bit of searching.
    – MadHatter
    Dec 22, 2017 at 14:31
  • It also depends on if there is a drop-in replacement for the GPLed part (see readline vs libedit).
    – vonbrand
    Feb 20, 2020 at 11:43

3 Answers 3


If the app is distributed to other users and contains GPL-covered code, its source must be published under the same (or compatible) license.[source] This is one of the basic principles of GPL.

This also applies to source code that contains/links unmodified GPL-covered code.[source] (This is different in the GNU Lesser GPL)

If however the entire app runs on server or is only used internally in an organization, it doesn't have to be open-source. (This is different in the GNU Affero GPL)

Using an unmodified GPL-covered compiler/editor/tool to compile/write another program without open-sourcing it is legal.[source]

  • Just to clarify, if I wrote a game, and I pulled a file from a GPL v. 3 project with useful source code, would I have to release the source code for the entire game under GPL v. 3 (or a compatible license), or would I be obligated to just release any modifications I make to the relevant pulled file under GPL v. 3? If the former is the case, it's kind of crippling for commercial products (considering that technically-savvy would-be buyers of your game can just go compile it for free instead of buying it).
    – Jax
    Jan 9, 2023 at 20:23
  • @Jax Yes, the license must be applied to the entire game, not just the one modified file. This is intentional. You can still sell the game and ask players to purchase it if they like your work and want to support it. Many free software projects do this (or ask for donations on the download page).
    – lukasrozs
    Jan 19, 2023 at 6:28
  • @Jax Also, you are required to give the source code just to your users. You are not required to post it publicly, e.g. on GitHub. Any user can still publish the source, with or without modifications, anywhere they like, and they have the right to do so (assuming they preserve the license). I don't know about any project taking this approach. You might want to consult a lawyer first; I am not one.
    – lukasrozs
    Jan 19, 2023 at 6:29
  • Well yeah, you can still ask the user to buy it, but at that point it becomes entirely optional on their end (the honor system, basically) - more of a donation than an actual transaction.
    – Jax
    Jan 19, 2023 at 14:05
  • Do you know how the GPL mixes with other licenses? Or whether licenses can invalidate each other? For example, I'm using purchased rights to proprietary software - I lack the rights to release the purchased portions of the software under GPL.
    – Jax
    Jan 19, 2023 at 14:08

I will preface this by saying your question feels like it belongs in a legal advice section, so please understand that I do not come from a legal background but a software background. I disclaim any personal liability from my advice given. My advice may be entirely incorrect and very likely is at least partially incorrect.

As the prior commenter MadHatter pointed out, this is not a cookie-cutter thing you're seeking, which is likely also why your searches didn't give you the answer you hoped for.

When dealing with open source in general, the rules differ between each license - sometimes by a little, sometimes by a lot so it's good that you at least know to ask regarding GPLv3 specifically. Having said that, it's important that you understand each licensee has the freedom to provide exceptions and clauses, so just because something is labeled as GPLv3, you need to still look at the license agreement for exceptions and mixed licenses - for example, some of the code base being in a different license than the rest.

Regarding contribution, the GPLv3 license essentially requires that you make available any source code changes you have made to that code, and you also release it under GPLv3.

It is my understanding that if the parent application uses code that is licensed under GPLv3 but the app itself is not licensed that way, they must do the following:

  • Distribute the GPL license with the GPL licensed code when it is distributed (in other words, if it is distributed with the app, they have to also distribute the license)
  • Make available all modifications to the GPLv3 licensed code (if any), and those modifications must be released under the same license.
  • Changes must be documented

There is of course much more to the GPL than this, but this is my attempt at summing up the important part you were asking about. So as I understand it if the source code was not modified/adapted to work with their product, and the license is distributed with it, then they have not violated the GPL.

  • Good point. In particular, this code might be GPLv3 and a closed-source licence. The user might have paid.
    – vonbrand
    Feb 22, 2020 at 1:26

While the GPL allows you to freely share the code, no part of the GPL forces you to make the source code publicly available. If you sell a binary program that uses GPL code, then you either have to provide a copy of the code with the program or give the user instructions on how to get a copy of the code. Only a user of the binary program must get access to the source code, providing access to any other person is at the discretion of the developer.

If they are selling a GPL based program and not providing users with access to the source code then they would be in violation of the GPL. It may be that you won't know this unless you purchase a copy of the program.

From GPLv2 -

  1. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange;

Another consideration is how they use GPL code. If the program uses a GPL library and they only share the library code, then they could get into a grey area depending on how the program is packaged with the GPL based code.

  • 2
    "An open source app is one where the source code is publicly available to anyone." -- this is popular misconception number one. Please read the Open Source definition. It is not your fault, one assumes that the name gives a reasonable summary of what it is, but it does not. Feb 18, 2020 at 15:03
  • @ctrl-alt-delor I don't think that was what I was trying to get across, but the first sentence doesn't really add anything to the answer.
    – sambler
    Feb 19, 2020 at 3:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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