Comment on What are the main differences between GPLv2, GPLv3, AGPL, and LGPL?

rikudou@lemmings.world ⁨5⁩ ⁨days⁩ ago

GPL = whenever you distribute software which contains GPL code or libraries, your code must also be distributed as GPL or compatible. V2 vs v3 differences are mostly in v3 clearing up some ambiguities.

AGPL = same as GPL, except it applies even if you simply provide your code as a network service

LGPL = same as GPL except it makes it possible to distribute closed source components (or with incompatible license) as long as the user is able to replace the LGPL libraries.

MIT = you can do whatever with the code

So, GPL only concerns you if you distribute your application as a binary to users, think like Photoshop or Microsoft Office. Your code is effectively GPL even if you don’t distribute it, but there’s no requirement to make the source available to everyone, only to those who you distribute the software to.

With AGPL even having the application accessible over the network is considered as distribution to users. You basically cannot have an effectively closed source application with AGPL.

LGPL is usually used with dynamically linked libraries where you can distribute your application easily as long as user can replace those. For example Qt is LGPL and you can sell your app without providing source code as long as the user can replace the Qt framework dll/so libraries.

And with MIT anything goes, you can use it in a closed source product, in fact of those four it’s the only one that allows you to have a truly closed source codebase.


As for how they’re compatible, the most strict license usually applies. All of these four are compatible to some degree, but you can’t simply take a GPL code into a MIT codebase and make it more permissive suddenly.

Your code can be MIT, but the original still is GPL. Meaning that when you distribute the application, it’s effectively GPL. Same with all license combinations.


As for why would you choose one or the other, it’s pretty much about how much you want your users to give back.

With GPL, you want any modifications to be able to be included in your project. With LGPL as well, but you’re not forcing people to open source their whole app, only direct modifications to your code. With AGPL you’re basically forcing everyone to open source their app if they use your project at all. With MIT you don’t care at all, you just give your code to the humanity to do whatever with it.

source
Sort:hotnewtop