I have developed a C++ project which is meant to be used as a plugin in a third party software. The project includes three libraries:

A: The development kit of the third party software mentioned above

B: A GPL'd library (version 3)

C: An MPL'd library (verison 2.0)

The license of A allows me to distribute binaries but not the library source itself. Is it allowed to share all codes, including the part written by me but excluding the library A, as well as the binaries under GPLv3? According to my research, B & C do not conflict with each other since MPL2.0 can be embedded in GPLv3 but recipients would not be able to compile the project and obtain the binaries themselves because of the missing library A.

Thanks for helping me out here!

  • Is the third party software open source, i.e. can you distribute the source code of the main program (i.e. the program that you are going to use the plug-ins with)?
    – Brandin
    Sep 8 '19 at 15:44
  • The main program is free but not open source (you can request it at the vendor's webpage).
    – Tobias
    Sep 8 '19 at 16:34
  • The answer will depend on how the plug-in system works. If the plug-in system effectively combines the GPL program into the closed source one (so that they behave as one program afterwards), then that is not allowed by the GPL; you would have to distribute the source code of the closed source program in order to comply, but you can't do that because it's closed source. See the GPL FAQ item above for more information.
    – Brandin
    Sep 8 '19 at 17:57
  • Are you sure the library is GPL and not LGPL?
    – Brandin
    Sep 8 '19 at 18:07

Recipients would not be able to compile the project and obtain the binaries themselves because of the missing library A.

If you are distributing and including GPL code in your source code distribution (which you are, according to your comments), then to fulfill the GPL requirements you must distribute all source code. If a certain part of the source code (e.g. library A) is not available, then you cannot distribute that GPL component while also fulfilling its requirements. This is what is meant when we say a license is "incompatible" -- it means you tried to fulfill all the requirements (e.g. license A says you cannot distribute its source code, and license B says you must distribute all source code), but failed to do so.

A possible exception would be so-called "system libraries" or components, which are described in the following paragraph of the GPL v2:

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 above quotation (emphasis added) is from the GPLv2, but similar language ("System Libraries") is in the GPLv3 as well.

Based on this, if you were developing, say, a Windows application, you would need not include, for example, the source code to the Windows modules that are normally distributed with the operating system, compiler, kernel, or other major components of the Windows operating system.

However, seeing as you intend to distribute the executable version of library A along with your program, and seeing as the library A does not qualify as "a major component of the compiler, kernel, and so on, of the operating system on which the executable runs," I would say that this this exception does not apply in your case. So you will need to be able to distribute its source code in order to comply with the GPL.

Based on your comments, you are using the FFTW library, which is specifically licensed under the GPL along with a dual-licensing offer. See the FFTW FAQ. It is common to license something under a GPL license as well as a non-GPL license for the use case you describe (for producing non-free software). In this case your only recourse is to ask the author for an alternative (non-GPL) license, or to remove dependence on the library A, which seems to be what is mainly preventing you from distributing all the source code and thus complying with the GPL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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