I am writing a piece of software that I plan to distribute. In my code, I use a GPL licensed library.

Do I have to apply the GPL to my software even if I did not do any changes to the above mentioned GPL library? Or would this condition trigger only in the case of its modification?

2 Answers 2


As a add-on answer to amend what @amon explained in his answer:

That is the point of releasing a library under GPL: Any program which wants to make use of it also needs to be distributed under terms of the GPL.

For most practical purposes, a ready-built program is always a derivative of the libraries it makes use of and thus the distributed binary must fulfill all conditions of all libraries it uses. And it is often a good idea if the same is true for the source code.

If the authors of a library did not care about GPL for programs using it, but only the terms for the library itself, they would have chosen the LGPL or in some cases the GPL with a linking or class path exception as their license.

  • Thanks for the answer, to both of you! I understand this concept when we are talking about libraries. Let me follow up with a more specific example - MongoDB. It is now licensed under SSPL (source-available version of AGPL 3.0). Even in this case the same logic applies? Just to be clear - I will not modify the MongoDB source code, I will just use it as-is in my software.
    – Jakub
    Commented Dec 1, 2021 at 14:00
  • re GPL licences it does not matter if you modify the MongoDB source code or not, It depends on how you use it. (Only LGPL distinguishes between modification of a library's source code and use of the library)
    – mmmmmm
    Commented Dec 1, 2021 at 16:19
  • 2
    @Jakub: The SSPL is not the GPL, and for that matter it is not an open source license at all. Questions pertaining to the GPL may not be applicable to the SSPL, because they are entirely different licenses.
    – Kevin
    Commented Dec 1, 2021 at 23:12
  • 1
    @Jakub it depends on how you're using it. The following sentence is only true if you're not allowing others to directly connect to MongoDB that you host by exposing port 27017 and giving out credentials—if you give a bundle of programs for others to host which includes MongoDB, this may be different. You're very likely using a library to connect to MongoDB in your program, in which case your program is subject to the library's terms, because the network interface separates MongoDB and your program into two separate works for copyright purposes.
    – lights0123
    Commented Dec 2, 2021 at 2:17

In the opinion of the FSF, you could only distribute your software under the terms of the GPL. Your software as a whole includes the GPL-covered library and is thus derived from the library.

The GPL triggers conditions both on modification and on distribution. But modification is not just about editing the library's source code. The GPL-3.0 defines:

To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.

Your software can be considered to be a work based on the GPL-covered library and is, for all practical purposes, a modification.

There have been lengthy debates over whether this argument still holds if the library is dynamically linked, or if the software is not compiled. There are people who argue that the GPL might not apply to your program. But it's safer to assume that the GPL does in fact apply.

If the GPL applies to your software as a whole, this doesn't mean that every component must use the GPL license. Components could also use compatible licenses. So you wouldn't have to license your source code under the GPL terms, and could instead choose a compatible open source license.

  • 3
    If you will be shipping the GPL-covered code, it's completely clear that the GPL as-written and as-intended applies. Doing so is infringing unless you follow the requirements to license the entire program under the GPL. It's only if you will be shipping a dynamic-linked binary without the library, assuming the library is already present on the end user's system, that there's any room to argue you're not bound to follow the requirements of the GPL because you're not doing anything that would need a license. Commented Dec 2, 2021 at 0:33
  • 1
    Personally, I still think that's a very risky position to take, since if you inadvertently convey the same GPL-covered library in another context that could be interpreted as a roundabout way of providing it as a dependency for your non-GPL program to use, your actions could be found to be infringing. Commented Dec 2, 2021 at 0:36
  • As far as I understand the court verdict "Welte vs. VMWARE" correctly, you must have written at least one line of code in some software being distributed to be allowed to say if some license applies to the software or not in Germany. You would be allowed to distribute the object files of a software under a proprietary license although the software won't work unless it is linked to a GPL library. However, you will probably (I think there is no court verdict, yet) not be allowed to link the software in this case! Commented Jan 8, 2022 at 14:17
  • @MartinRosenau The Welte vs VMware case is a bit frustrating because it provides no insight about the interpretation of any open source license. The court found that Welte didn't demonstrate that he had standing to sue for copyright infringement. The lawsuit never go to the point of discussing linking issues.
    – amon
    Commented Jan 8, 2022 at 15:03
  • @amon It was Welte (and the FSF) himself who caused this problem: In the case "Welte vs AVM" both Welte and AVM argued that the Linux kernel is a "Sammelwerk", which implies that each kernel driver is a "work" of its own having its own copyright holder. So VMWARE did not infringe the copyright of the Linux kernel but they infringed the copyright of one or two kernel drivers ... if they did not buy a license from the copyright holders of that kernel driver! Welte cannot know if those developers also sell their GPL driver under a proprietary license (dual-licensing)! Commented Jan 8, 2022 at 15:57

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.