Hello all.
I have a two part question regarding licenses and distribution of a library.
Background
I started working with a project (let's call it lib-xyz
) that initially used a GPL library. The project is a collection of classes and algorithms that are meant to be used as a library. Regarding the usage of the GPL library, only a class ChildA
that derives a BaseClass
uses it. Moreover, BaseClass
and all its derived classes are used only internally by the library.
Where I work, they are not particularly interested in sharing this library under the GPL, as required when using another GPL library. However, CeCILL licenses are widely accepted.
We came up with the following solution:
- I separated
ChildA
in a separate shared library. Let's saylib-child-a
- I created a
ChildB
that derivesBaseClass
, a class that implements the basic behaviors ofChildA
but it does not use a GPL library at all. It is very basic, it does not provide all the options and tweaks possible withChildA
. - I changed the library so that when a
BaseClass
is created, a factory method checks if theChildA
is available thrudlopen
/dlsym
calls. When available, aChildA
is instantiated. If not, it fallbacks to an instance ofChildB
.
Question 1
Is it possible (I mean legal) to distribute lib-xyz
under a non-GPL license and lib-child-a
under GPL?
Question 2
If answer to question #1 is yes, should I distribute each library separately? Or could I do it in a single container (zip, tgz, deb, pkg, etc...) ?
Thanks you very much for your help
Update Since the comments of ninjalj, Will and JosephH have made good points, I'll clear up a bit my situation.
My case is similar to the case in the response of Will. But in my case, it is not the READLINE library. It is the GNU Scientific Library. I use it to solve some ordinary differential equations (ODE). These equations may be solved by some of the popular numerical integration methods, such as Euler, Runge-Kutta, Cash-Karp, among many others.
Back to my case, I use the GSL in order to solve these equations using a class ChildA
. Since GSL provides many solvers, ChildA
permits to select among a list of solvers. We intend to distribute this class as a GPL library. In the other hand, another class ChildB
also implements one solver. The main library then checks dynamically if the library of ChildA
is available. It uses it when available but fallbacks to the ChildB
class if not.
What I basically want to know (probably answered by ninjalj comment of Will's answer) is if the following case for distribution is acceptable:
- distribute the closed-source library with a non-open-source license. The library will use an open-source library if available or fallback to its default behavior.
- distribute the classes that use GPL library (separately??), with a GPL license