I am dynamically loading an MPL 2.0 licensed library to use some of its exported functions in a feature. My code does not distribute the library, it simply detects it's presence on the system and uses it if it's available. I also browsed the library's source code to extract the function and certain type definitions.

What ramifications does this have on my software? Do I have to distribute the MPL, open-source part of my code that uses the mentioned type definitions, do I have to mention something in my EULA, etc.?


From reading the Wikipedia page on the MPL, it seems to me that you can "link from code with a different license". The license is even marked as such in the summary box.

If you read the actual license, in its 2.0 version, section "Distribution of a Larger Work", you can read that you have to keep the library in question under MPL, regardless if you distribute your own software in source or executable form. That is, you may not keep the source code of that library under a closed, proprietary license; but this does not apply at all to your code. This is true even if the MPL code is marked as "Incompatible with secondary licenses", since that would only apply if you were mixing the library's source with your own.

The LGPL provides a similar case, and it states explicitly that:

If you dynamically link against an LGPL'd library already present on the user's computer, you need not convey the library's source. On the other hand, if you yourself convey the executable LGPL'd library along with your application, whether linked with statically or dynamically, you must also convey the library's sources, in one of the ways for which the LGPL provides.

Substitute "convey the library's source" (LGPL) by "create a Larger Work under terms of Your choice" (MPL) and you have your case, I guess.

This is my opinion, but I am not a legal expert. Furthermore, this is under the assumption that when you say you "extracted a function and certain type definitions", you mean that you browsed the library in order to understand how to use it; you did not copy a relevant piece of code and integrated it with your own source code.

  • I am kind of unsure what would fall under the designation of "code" . What I did copy from the library's source were enums, other constants, and function type definitions, nothing that could be referred to as executable, in order to use use the library. – LakatosI Apr 2 '14 at 13:56
  • @LakatosI: If you only copied interfacing stuff (function names/signatures, public constants, that what you normally publish in a header file in C), then a very strict reading could make your code a derived work. In practice, you are unlikely to get into real trouble, as the spirit of the MPL is not to disallow combining MPL software with closed-source software. – Bart van Ingen Schenau Apr 3 '14 at 7:12
  • @Bart That's good to know. – LakatosI Apr 3 '14 at 8:27
  • @BartvanIngenSchenau: Thanks, I tried to formulate something like that yesterday, but wasn't sure how to. – logc Apr 3 '14 at 12:26
  • @LakatosI: here you have an FAQ about GPL and LGPL licenses. It can be useful because many definitions apply to other free software licenses, such as the MPL. Look out specially for the "Combining work with code released under the GNU licenses" section. – logc Apr 3 '14 at 12:47

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.