ECL license
Tagged as license, free software, distribution
Written by Daniel Kochmański on 2017-12-15 13:30
From time to time a little misconception emerges regarding the ECL license - namely some people seem to have the impression that it is GPL-2.0, while in fact it is LGPL-2.1+. In this post I want to talk a little about the history of ECL and to describe what the practical implications of such licensing are.
The heritage of Embeddable Common Lisp is rich, as you can read
here. The
software has had a few maintainers throughout its history who hold
copyrights to various parts of the code. ECL was licensed under
GPL-2.0, but that license was changed after ECLS (or ECL-Spain) and
ECoLisp were once again one project and Prof. Juanjo García-Ripoll
changed the license to LGPL-2.1+ with agreement of Prof. Giuseppe
Attardi. That's the point from which I took over in 2015 with blessing
from the previous maintainer. I do not own all copyrights to the
software and I can't change its license to anything that is
incompatible with working in LGPL-2.1+. Note that parts of the
codebase are licensed more liberally (like programs in the examples
directory which may be used for any purpose and are licensed under the
terms of BSD-2-Clause).
That said, I feel very comfortable with current licensing. It preserves a reasonable balance between producent and consumer rights and fits project goals perfectly. The meaning of our current license is, in short, the following: you can use ECL for any purpose in any setting (including commercial applications), but if you commit changes to ECL itself you are obliged to share these changes (and only them).
The core library is a shared object libecl.so
and it is dynamically
linked with the software. The binary called ecl
is just a program
which is a client of this library. Moreover, ECL compilation artifacts
are usually shared objects themself (usually disguised under the fas
extension):
➜ ~ ldd `which ecl`
linux-vdso.so.1 => (0x00007ffff80c3000)
libecl.so.16.1 => /home/jack/Pulpit/lisps/ecl-16.1.3/lib/libecl.so.16.1 (0x00007fc7c4665000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc7c427a000)
libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007fc7c3ffa000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fc7c3df2000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc7c3bd4000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc7c39ce000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc7c36c5000)
/lib64/ld-linux-x86-64.so.2 (0x00005592f1735000)
➜ ~ cd .cache/common-lisp/ecl-16.1.3-21f0b92f-linux-x64/home/jack/Pulpit/repo/mcclim/Apps/Listener
➜ Listener ls listener*
listener.fas listener.o
➜ Listener ldd listener.fas
linux-vdso.so.1 => (0x00007fffb43f5000)
libecl.so.16.1 => /home/jack/Pulpit/lisps/ecl-develop/lib/libecl.so.16.1 (0x00007fa2bbfc1000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa2bbbd6000)
libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007fa2bb956000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fa2bb74e000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa2bb530000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa2bb32a000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa2bb021000)
/lib64/ld-linux-x86-64.so.2 (0x0000563db6716000)
➜ Listener file listener.fas
listener.fas: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=ed1cece88028eb3a388ab0a589a9ee12415532e9, not stripped
There are a few implications of this. First, I will explain (informally) what LLGPL clarification to LGPL is. Many Common Lisp implementations don't work with the notion of linking, so "static linking" and "dynamic linking" doesn't make much sense in them. Libraries are simply added to the image. That may raise questions whenever a binary with an LGPL library in it may be considered derivative work or not? My strong belief lies on the side that it is not derived work and if the author of the Lisp library gave it the LGPL license – they meant it. If we take another interpretation, then it is no different than licensing it with GPL, so it would be nonsense. I think that what is tested in court is intention and there is no rational interpretation of giving a Lisp library the LGPL license except the one that the software does not influence other image components. LLGPL additionally clarifies some wording to make it less ambiguous and clear up unnecessary doubts.
The point above is reinforced by the fact, that the Free Software Foundation itself made a clarification about dynamic linking in the context of Java programming language, but equally applicable to Common Lisp, and it addresses both the "linking" and the "inheritance" problem. But are macro expansions derivative work? The compiler output is not the subject of the compiler license and macros should not be much different with this regards.
All that said, ECL is safe from concerns like that and such clarification is not necessary because it works with the very same notion LGPL talks about (static and dynamic linking). There is no program image, only objects which a binary is composed of and linked with (exactly like in C programs).
Another interesting license (with which ECL is compatible with thanks to "or later version" clause) is LGPL-3.0. This license is for example used by ECL's fork named MKCL and GMP since version 6. In short, this license adds an important restriction to LGPL-2.1+ called the anti-tivoization provision. This privision adds a new freedom for software users – they must have the ability to update the library on a device with software under this license to their own version of it. This effectively means that the device can't be a complete black box.
This leads us to another topic. ECL is licensed under LGPL-2.1+ license and it
is linked with GMP. As we have noted in the paragraph above, the newest version
of GMP is licensed under LGPL-3.0. In practice this means that if you use ECL
and GMP in your application and any of them is LGPL-3.0 you can't put
such a
bundle on a camera device which doesn't allow changing its software. To prevent
such situation ECL has bundled its own version of GMP, which is a slightly modified
version of GMP version 4, which was licensed under the LGPL-2.1+ terms. By default,
when building it tries to link against libgmp.so
on your system, but given
appropriate configure flags it may use the bundled GMP version and link it
statically into libecl.so
(ECL doesn't export symbols from libeclgmp.a
to
avoid symbol name conflicts with the original libgmp.so).
I think that summarises it. Now I will provide some made up FAQ to illustrate licensing implications in shorter form:
Q: Is ECL GPL-2.0?
A: No, ECL is LGPL-2.1+.
Q: Can you provide a commercial license for us?
A: No, I don't own all the copyrights.
Q: Can we use ECL in our commercial product with proprietary components?
A: Yes, but you have to keep ECL linked dynamically with them (as a shared object).
Q: Can you incorporate proprietary components in ECL?
A: God no (and I wouldn't do that even if I could).
Q: Can we use ECL in our LGPL/GPL/AGPL product?
A: Yes, you can even link ECL statically for that purpose. Your license will be
intact.
Q: Can you incorporate LGPL/GPL/AGPL components in ECL?
A: If you incorporate LGPL-2.1+, then ECL remains in LGPL-2.1+ and it can be
integrated in the upstream; but if you incorporate LGPL-3.0, GPL or AGPL, then
your fork of ECL will become LGPL-3.0, GPL or AGPL and it won't be integrated
upstream.
Q: Can we use ECL in our BSD/MIT/Apache-2.0 product?
A: Yes. If it is dynamically linked there are no further implications. If you
link it statically, the overall license is LGPL-2.1+.
Q: Can you incorporate BSD/MIT/Apache-2.0 components in ECL?
A: Yes, sometimes I do that.
Q: If I compile my software with ECL is it LGPL-2.1+?
A: No, products of compilation are not influcenced by compiler license. You may
compile any kind of free and proprietary software with ECL without any
implications on the compilation artifacts or the code it compiles. I would
appreciate not using it for something unethical though.
Q: Can I put ECL in an embedded device to which the consumer doesn't have access to?
A: Yes. You may need to build ECL with bundled GMP library to avoid LGPL-3.0
implications.
Q: If I use two libraries in my application - one being LGPL and the other MIT – what is my program license?
A: That depends. If you link them statically (monolithic programs), then
resulting work will be covered at least with LGPL (you may add more restrictions
if you want). If you link them dynamically (default), then you may use any
license you want.
Q: If I use GPL libraries in my application – what is my program license?
A: Its license is at least GPL.
Q: Are you a lawyer?
A: Nope. You may want to consult one. But hey, you should also consult a lawyer
regarding the terms of services you probably agree on surfing the web and EULAs
bundled with your favourite software and hardware (i.e phone).
Q: Did you cover all LGPL-2.1+ implications?
A: No, I recommend reading the license. I have talked about things which I find
relevant to this post.
Q: Can I buy something from you?
A: Yes, you may buy developer time to work on ECL or to help integrate ECL with
your application. I'll probably do it anyway if you drop by on the IRC channel.
If you have more questions you may ask on the mailing list and IRC (channel #ecl on libera.chat).
Thank you for reading,
Daniel Kochmański
--
I want to thank Elias Mårtenson, Pascal Bourguignon and Tomek Kurcz for proofreading this text and for providing valuable remarks before publishing it on the blog.
In this post I've used SPDX-License-Identifier format where appropriate.