In the company I work for, if a member of the development team proposes to use an Open Source library to solve a problem , the project producers always ask what software license comes with the library.
We are not lawyers, but I understand that not all the different licenses can be combined because there are certain requirements that each one requires.
That said, I want to know, what would be the considerations to take into account before including an Open Source library in a software that I created on my own ?
The most important consideration that you should take into account in general is the form of distribution of your application , that is, how it will be used by users. Depending on how the distribution is, the licenses can put some impediment on you.
If your application is a service (SaaS)
In that case the only license that I know of that can limit you is the AGPL license since it forces you to make the entire AGPL application and publish the source code somewhere. The rest of the licenses can be used, without restriction (beyond the fact that it would be nice to link them as a form of thanks). The only exception is JavaScript code , which is sent to the client and executed on their computer, which should be treated as in the next section.
If your app is installable
In this case, we must distinguish two different types of dependencies, those that can be installed separately and those that are compiled within your application.
In the case of dependencies that are installed separately, most of the licenses do not affect you, since it is not mixed with your application, what is done is to leave the installer separate (this is how GitHub for Windows works, for example , which when installed installs behind
git
with GPL license ).In the last case, in which your application uses the libraries internally, it is that the licenses can become complicated, in this case the "open ( BSD , MIT , etc.)" licenses are not a problem, except the obligation to leave a mention of its use and of the license ( example ).
Finally, "free" (or copyleft ) licenses force you to give the user access to their source code. In the case of the LGPL license , it is only necessary to give access to the code of the same library (with the modifications that you have made to it), not to all your code. The case of the GPL is more extreme since it asks you to distribute your entire application under that license (an issue that in some cases is impossible since some are incompatible).
Clarification
In general, licenses force you to distribute the source code with the person you give the application to, not to make it public. So if the app is being sold to a specific company for their internal use, the license requires you to give the company the source, not post the whole thing online.
The most important distinction is whether a license is copyleft (GPL family) or permissive (MIT, BSD, Apache and others). The former require, under some conditions, to relicense the code of the products that use software licensed with them, with the aim of preserving the user's freedoms at all times. Permissive licenses are more lax, allow to be included in closed products under some conditions and are generally simpler. The links Christopher has passed contain a lot of information about it.
A very interesting website is TLDRLegal
https://tldrlegal.com/
In it they explain many free or open software licenses so that they are easy to understand, and in the future it will allow them to be compared.
It is important to note that the absence of a license is not free software . No license means that no right is granted , because according to international treaties ( Berne Convention ) the "copyright" is inalienable. That is why there are software licenses, which develop the concepts of authorship, attribution and permissions in an appropriate language that is compatible with the laws of the different countries. GitHub created a website with the aim of helping developers to choose a license for their project and it contains interesting information on the subject.
This topic is broad (see https://es.wikipedia.org/wiki/Licencia_de_software and https://es.wikipedia.org/wiki/Anexo:Comparaci%C3%B3n_de_licencias_de_software_libre ).
You have to study the licenses (or ask your company's lawyers to do it). This cannot be avoided.
Here we compare the use of the "Lesser GPL" license and the ordinary GPL license (two of the common free licences) with respect to libraries:
(Please also see the great answers from astrojuanlu and yms ).
I am not a lawyer, so use of the information below is at your own risk:
There are various licenses for Open Source projects that allow re-distribution of binaries into closed source commercial applications. Note that the crux of the matter is "re-distribution", if you use an open source project internally in your company, without redistributing it, there is (usually) nothing to worry about.
So, the best known permissive licenses are:
Note 1: LGPL differentiates between using the sources directly, static linking, and dynamic linking. If you use a LGPL library with static linking or in source code, your code is affected by the LGPL license (you must distribute the sources). I understand that there are exceptions for interface files, like .h in C and C++
Note 2: Each of these licenses may or may not impose restrictions on the modifications made to the code, here I am assuming that they will be used without modification.
The best known non-permissive licenses are:
GNU GPL
GNU AGPL This is the strictest I know of, it contains a clause that forces the publication of your source code even in the case of using the open source project on websites or web services, even if a "redistribution" as such of binaries does not occur .
Sometimes the GPL and AGPL licenses are combined with an alternative commercial license for the case of use in closed source commercial projects.
Examples of projects that use this AGPL-Commercial dual license strategy are Ghostscript, iText, QT and MongoDB (I wonder if whoever named this project speaks Spanish).
An important detail is that an Open Source project released under a permissive license could have a dependency released under a non-permissive license, used as an external library. In such situations the non-permissive license prevails.
Another interesting point is the definition of "distribution" of fonts. GPL for example does not say that you have to put your sources on the Internet accessible to anyone, the idea is that each person who receives a binary of your application or system, should be able to receive the sources if they wish, it could even be sent by post on a DVD, including a "reasonable" payment for the effort of burning the disc and sending it.