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?
4
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.
2
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.