1

I can find lots of information regarding the restrictions imposed on linking GPL licensed libraries from non-GPL licensed software. However, I'd like to do the opposite - I'd like to distribute some software under a GPLv3 license that has the option to dynamically link to a proprietary shared library.

The proprietary library would not constitute an essential component of the functioning software, since there are other open source (BSD licensed) libraries that could be linked at runtime instead (specifically, I'm thinking about linking MKL BLAS versus ATLAS, OpenBLAS etc.).

I found this relevant section in the GPL FAQ.

  • Does this mean that I would need to explicitly grant an exception for every possible non-GPL licensed shared library the user might choose to link to at run-time?
  • Would I need to write exceptions for libraries that are open source, but not GPL licensed (e.g. BSD)?
  • If the library that is being linked to is not covered by an exception (i.e. if it is GPL or LGPL), what would be my obligation to distribute the source code for that library?
  • Question: Are the open-source libraries drop-in replacements for the non-free library? Or do you need to adapt your program to use an alternative library? – Bart van Ingen Schenau Aug 9 '14 at 14:31
  • @BartvanIngenSchenau Any library that implements Level 3 BLAS would basically be a drop-in replacement – ali_m Aug 9 '14 at 14:32
1

As BLAS is effectively an API with multiple (both free and non-free) implementations, it is possible that it falls under the GPL definition of a "Standard Interface". In that case, the GPL requirements don't extend to the BLAS library that you happen to distribute with your application.
It might be worth the effort to ask the FSF if they consider the BLAS API to fall under that definition.

If that route doesn't work out, you can give explicit permission to use a particular library (or set of libraries) as indicated by the GPL FAQ section you linked to:

[...] If you're using GPLv3, you can accomplish this goal by granting an additional permission under section 7. The following license notice will do that. You must replace all the text in brackets with text that is appropriate for your program. If not everybody can distribute source for the libraries you intend to link with, you should remove the text in braces; otherwise, just remove the braces themselves.

Copyright (C) [years] [name of copyright holder]

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses.

Additional permission under GNU GPL version 3 section 7

If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license], the licensors of this Program grant you additional permission to convey the resulting work. {Corresponding Source for a non-source form of such a combination shall include the source code for the parts of [name of library] used as well as that of the covered work.}

This explicit permission is only needed for libraries whose license is otherwise incompatible with the GPL. Libraries licensed under a permissive license, like BSD or MIT are compatible with GPL programs, so you don't need to exempt them.

If your program is linked to a library that has an incompatible license and isn't exempted, then you are not allowed to distribute that combination. Neither in source, nor in binary form.

  • 1
    Thanks, that clears up a lot of my questions. Regarding my last point, would I also be obliged to distribute the source code for any GPL-compatible (non-exempted) library that might be linked by my software? Would it be enough to simply give URLs for the relevant GitHub repositories? – ali_m Aug 9 '14 at 15:31
  • 1
    @ali_m: That probably depends on if it is a static or dynamic library. For static libraries, it is better to provide the source along with yours to ensure the versions match. For dynamic libraries, it is more likely that the user already has them and the interfaces are generally more stable, so providing just a link will be acceptable. – Bart van Ingen Schenau Aug 9 '14 at 16:05
  • @ali_m Obliged? No. But Bart's point about static libraries is well-taken. – Ross Patterson Aug 10 '14 at 13:37

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.