9

I have read Interfacing with GPL applications from MIT licensed code - is a dual-license unavoidable? (now deleted) on Stack Overflow, but it doesn't appear to fully answer my question.

I maintain a library which is licensed under the MIT License. In my MIT licensed library, I dynamically link (Python ctypes to be specific) against another library which is licensed under the GNU Lesser General Public License 2.1 (LibRaw). This would be fine by itself, however, LibRaw is sometimes statically linked against a sort of "plugin" called the LibRaw Demosaic Pack which is licensed under GNU General Public License 2+ or GNU General Public License 3 depending on the version. I have no way of checking if LibRaw has been linked against these libraries. (LibRaw is just installed on the end users computer and when they download our library and use it it links against it, I am not redistributing or building LibRaw.)

Does linking against the LGPL library from my MIT library when the LGPL library has been linked against GPL code mean that I'm illegally using GPL code in my MIT Library?
If it is so, is there some way around this short of sub-licensing parts of my code under the GPL, or dual-licensing (which is just confusing for the end user)? Or can I still link against the LGPL library under the terms of the LGPL even though it then links against GPLed code?

7
  • 1
    When you say the LGPL lib is "sometimes" statically linked against a GPL plugin, is that because the LGPL lib is sometimes distributed with that plugin (if so, by you? them?) or is that static linking just something a technical end user might do?
    – Ixrec
    Commented Jun 1, 2015 at 19:31
  • 1
    What exactly is the "plugin" which is GPLv3 licensed? Why is it useful for? Which program is using that plugin? Under which license? Commented Jun 1, 2015 at 19:31
  • 1
    I've updated with links to the GPL code (click GPLv2 or GPLv3 in the question). It's a "plugin pack" that basically ads a few demosaic methods to LibRaw (so LibRaw, the LGPL code, would be calling out to these methods if it was built with the GPL code. If it's not built with the GPL code and you call the libraw methods that use it, it just falls back to its internal LGPL code). LibRaw is just on the users system and I'm dynamically linking against it; I can't tell at link time if it's been built with the GPL code or not.
    – user56619
    Commented Jun 1, 2015 at 19:35
  • 7
    My educated guess would be that you're totally in the clear. In principle you can stick any GPL'd code into any LGPL'd library for your personal use (and that freedom is the whole point of the GPL license family), so trying to outlaw that would be silly. As long as no one's distributing your code in a state where it's linked against GPL'd code, I see nothing wrong. But this goes too far beyond my expertise for me to feel confident so I'll leave this as a comment.
    – Ixrec
    Commented Jun 1, 2015 at 20:15
  • 1
    Does the MIT licensed library work without libRaw? If not, it could be argued that the unnamed MIT licensed library is actually a derivative work of libRaw.
    – Craig
    Commented Jun 2, 2015 at 16:31

2 Answers 2

10
+100

You designed your library to depend only on the LGPL version of LibRaw. That way you are following the license conditions of LibRaw. When the end-user links it against a version of that library which contains GPL code, that's their own business, not yours.

You can not prevent your end-users from doing this. And doing that is not even illegal for them: The (L)GPL only governs redistribution, it does not restrict what people may do with the software on their own machines.

However, other people are not allowed to distribute an application which depends on the GPL version of the library under MIT, because in that case they would be violating the GPL license of the demosaic pack. But what they can do is redistribute the whole application with your library all under GPL. Both the LGPL and the MIT license allow relicensing under the GPL, so anyone can turn a MIT-licensed work into a GPL work. But that's an issue between them and the authors of said plugin. You are out of it because your library only requires the LGPL version.

By the way: If you have any similar questions, then you might want to ask them on Open Source Stackexchange.

3
  • > The (L)GPL only governs redistribution That makes good sense; I don't see how it would be legally enforceable otherwise. Do you have a citation for that?
    – user56619
    Commented Jun 9, 2015 at 23:51
  • @SamWhited It's implied in the text of the LGPL and GPL themselves. If you read through them, you'll see that every restriction on what you can do is a restriction on distribution. Commented Jan 10, 2016 at 13:05
  • I'm sure it is in there, but deciphering the legalese in both those documents was the purpose of this question :)
    – user56619
    Commented Jan 10, 2016 at 17:04
-1

The question becomes really simple if you are releasing as free and open source and everything using your code is also free and open source: everything will be fine as long as your code is using a compatible license. If your code is proprietary or is used in proprietary software, it becomes a bit more complicated. The main question is whether or not you or others are using your MIT licensed code in a proprietary manner.

You can link to code covered by the GPL even in proprietary systems as long as the license is compatible. The MIT license is generally compatible with the GPL, but I recommend asking FSF directly as these multi-license situations can be tricky.

8
  • 1
    Not quite. You can use GPL'd code for your own private use (which includes internal corporate use) without any restrictions. That's true of almost all licenses. When you start distributing your combinations/modifications to others, that's when the GPL requires that your combinations/modifications as a whole be released under a license compatible with GPL. Just being open source isn't enough, because being open source and being free software/GPL-licensed are not even close to the same thing.
    – Ixrec
    Commented Jun 9, 2015 at 18:41
  • True. I will edit my answer accordingly. Commented Jun 9, 2015 at 18:52
  • Actually, he did say that he is distributing it, so the private use part is irrelevant to his question. Commented Jun 9, 2015 at 18:55
  • 1
    While I'm not using the library I've written in any proprietary software, I can not guarantee that others won't. I'm assuming that puts the legal burden on them, but I'm unclear if that's actually true, or if it then becomes my problem since I used a license which allows other people to use my library in a proprietary system.
    – user56619
    Commented Jun 9, 2015 at 19:03
  • If someone uses your code in anything they distribute, then it is their responsibility to conform to all licenses attached to your code. You are not responsible for anyone else's use of your code, but you can take measures to enforce it if you want to. See here, here, here, and here. Commented Jun 10, 2015 at 1:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.