5

My programm is using the java drivers of mongodb which are licensed with AGPL 3. I heard there are some licenses which aren't compatible with each other.

I want to use some libs which are licensed with GPL or LGPL, can I use them in the same project?

Which licenses can I use for the project itself if some libs are licensed under GPL, LGPL & AGPL? Are there any compatibility problems?

2
  • 2
    The people down-voting the question should leave a comment suggesting how to improve it.
    – Zimm i48
    Sep 16, 2016 at 11:48
  • Officially supported MongoDB drivers are licensed under Apache License v2.0, which is a more permissive license than GPL or AGPL. Apache License doesn't require derivative or modified works to be distributed using the same license, but you must preserve copyright notices & disclaimers. The MongoDB community server is AGPL v3.0 and also available with a commercial license from MongoDB, Inc (see: MongoDB Licensing). Even permissive licenses usually require attribution, so you should review requirements for any libraries used by your application.
    – Stennie
    Feb 24, 2018 at 23:54

2 Answers 2

0

Which license can I use?

When modifying a code under AGPL 3.0, or including it into a larger work, the resulting code must be distributed, as a whole under AGPL 3.0.

Are there compatibility problems?

It depends under which version of the (L)GPL the libraries you want to use are licensed.

  • The LGPL and GPL 3.0 are essentially the same license (plus an additional exception in LGPL) and, as remarked by @EMBLEM, they contain a provision which allows combination with AGPL code: the resulting combination is then governed by the terms of the AGPL 3.0.

  • If a library is licensed under the GPL 2.0 (and not "at your option, any later version"), then any modified code or larger work must remain under the terms of this license. Thus, it is not compatible with AGPL code. But the FSF reminds (in the text of the license itself):

    If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission.

  • If a library is licensed under the LGPL 2.1 (and not "at your option, any later version"), then it contains a provision to relicense code under GPL. To use the library in your program, you must follow this provision to relicense it under GPL 3.0 and then you can use it in your larger work as mentionned above.

    You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.

5
  • So I need to license my project under AGPL 3. The libraries I use are licensed with LGPL3 & AGPL3, so that should be ok too, shouldn't it?
    – Florian
    Sep 16, 2016 at 15:54
  • Yes, it's fine.
    – Zimm i48
    Sep 16, 2016 at 15:56
  • Thanks! So I need to hope that AGPL is nice for me as dev :p
    – Florian
    Sep 16, 2016 at 15:59
  • What do you mean? Do you have any concerns? The AGPL is not going to prevent you to do anything with your own code, you know?
    – Zimm i48
    Sep 16, 2016 at 16:27
  • No, I haven't any concerns, I'm a lonely developer. ^^ I've read a AGPL short form and it looks awesome ^^
    – Florian
    Sep 16, 2016 at 18:48
1

You can use both LGPL and AGPL code, provided that you link to them. The GPL and AGPL both include exceptions allowing linking to code under the other:

Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.

and the LGPL specifically aims to allow linking. As long as you're not copying code (and assuming all the projects can be distributed under (A/L)GPLv3), the project as a whole will be under GPLv3.

See this table for more information.

3
  • MongoDB is writing: "Our goal in selecting the AGPL v3.0 as our open source license is to require that enhancements to MongoDB be released to the community", so I need to release it under an open license like GPL 3? The table is nice for newbies like me, but it doesn't contains AGPL ._.
    – Florian
    Sep 15, 2016 at 16:12
  • @Florian Yes, you do need to release it under AGPL 3.0. But if you are merely linking to it you can release your code under GPL 3.0.
    – EMBLEM
    Sep 16, 2016 at 2:04
  • This compatibility matrix is great! A matrix is worth 10,000 web pages.
    – vhs
    May 26, 2017 at 19:12

Your Answer

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

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