Let's say there is a software that is build on basis of a GPL v2 licensed software. This software is being distributed in binary form. GPL requires that the source code and build instructions are made available for anyone. But is it legal to provide instructions that state something like this: "To compile you also have to download libraries X, Y and Z from their websites"?

Or must all dependencies be included in the source code distribution?

  • 2
    What is the license of the dependencies? The source code you provide should be usable, so presumably complete. You would, I think, need to host the libraries yourself to protect them from ceasing distribution at any links to other parties you provide.
    – TZHX
    Commented May 1, 2015 at 14:55
  • You could do both: give an URL for each libraries, and also give a tarball. Commented May 1, 2015 at 15:05
  • @TZHX, actually I am the user in this case and want to modify a program. So I am not sure about requirements. But they are like lua and qt.
    – Andrej
    Commented May 1, 2015 at 15:11
  • 1
    This would be a good question for area51.stackexchange.com/proposals/82234/… which still needs 91 users so it can go into beta. But to answer it you need to tell us the licenses of the libraries.
    – Philipp
    Commented May 1, 2015 at 15:13

2 Answers 2


The GPL v2 has this to say:

3. 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; or,

c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

The relevant language here is that you must include whatever modules the program requires except those for the compiler or kernel. That is an archaic way of saying "no need to distribute standard libraries that are part of a standard development toolchain."

This indicates that you must convey (at least make available) whatever you need to compile the code except for the compiler, associated tools, and standard libraries.

To answer your question directly: yes, you are required to make available third-party libraries so that anyone can download your program and compile it without needing to grab libraries from other sources.

In my experience this rarely happens. My educated guess is "nobody cares" because it is so easy to go grab other libraries, or they may come preinstalled in a typical Linux system.

  • 1
    They should care. Versioning problems can be an enormous pain in the ass. Commented May 1, 2015 at 15:20
  • @RobertHarvey I agree. At the very least make the versions of the required libraries available for download assuming the license allows that. Web sites and other repositories can disappear over time. I have been burned by that a few times when trying to compile old code for some niche (but important) task.
    – user22815
    Commented May 1, 2015 at 15:33

From A Practical Guide to GPL Compliance (emphasis mine):

The most important component to maintaining GPL compliance is inclusion of the complete and corresponding source code in any distributions that you make of GPL’d software.

That means you include the source code for any libraries that you use. They go on to say that:

Knowing at all times what sources generated a given binary distribution is paramount. In an unfortunately large number of our enforcement cases, the violating company’s engineering team had difficulty reconstructing the precise sources for a given binary distributed by the company.

In addition:

Too many software projects rely on only one or a very few team members who know how to build and assemble the final released product. Such knowledge centralization not only creates engineering redundancy issues, but it also endangers GPL compliance, which requires you to provide build scripts.

So I'd say that it's pretty clear that the intent of the GPL license is to make it possible for anyone to avail themselves of the freedoms of the license (use, modify, redistribute, etc.) while encountering the fewest practical hurdles.

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.