6

The Eclipse Public License and the GPL (2 or 3) are not compatible.

[ ... ] you may not combine EPL and GPL code in any scenario where source code under those licenses are both the same source code module.

Based upon the position of the Free Software Foundation, you may not combine EPL and GPL code in any scenario where linking exists between code made available under those licenses. The above applies to both GPL version 2 and GPL version 3.

Emphasis mine, obviously.

The Clojure programming language is licensed under the EPL (unfortunately), and it also links with Apache 2.0 libraries. I use GPL3 for all my other hobby software, and I'd like to license a project in Clojure under the closest thing I can find to GPL3.

That closest thing seems to be the LGPL. However, after a lot of googling, it also seems that everyone is ambivalent about compatibility between LGPL and EPL. For example, this SO question has two very different answers, neither seeming more reputable to the layperson.

If the LGPL is not compatible with the EPL, what's the GPL-est I can get? Apache, or Modified BSD? Are there other options that are closer to GPL3 than BSD, while staying within EPL?


This question asks about EPL/LGPL compatibilites for binaries only. That's not what I'm asking here.

4
  • Are you talking about licensing a software project that happens to be written in Clojure, or about a modification to the Clojure compiler or standard libraries?
    – Todd Knarr
    Commented Apr 30, 2016 at 7:03
  • @Todd I thought project in Clojure was pretty clear it's code that happens to be written in Clojure. But if it gets run by EPL code its license has to be EPL compatible.
    – cat
    Commented Apr 30, 2016 at 9:35
  • That's what I thought, but your question was phrased as if the compiler's license mattered. It doesn't. If you're writing your code in Clojure but not including any of Clojure's code in your software, Clojure's license doesn't apply because you haven't done anything you'd need a license to do. If that weren't the case, the Ruby compiler for instance couldn't legally exist because of the incompatibility between GCC's license (GPLv3) and the Ruby compiler's license (2-clause BSD).
    – Todd Knarr
    Commented Apr 30, 2016 at 17:19
  • @ToddKnarr What? The text of the EPL specifically says "you can't link EPL code with GPL code". I want my project to be GPL; it can't be GPL if it's going to link and run with EPL libraries, ergo, I want the closest thing to GPL while being EPL-compliant.
    – cat
    Commented Apr 30, 2016 at 17:36

2 Answers 2

5

Since your project's just written in Clojure, it doesn't modify the Clojure compiler or runtime system, you can simply license your project under the GPLv3. You would only need to worry about Clojure's license if you were distributing the Clojure compiler/runtime itself or code which modified or integrated into it to a greater extent than merely running on it.

5
  • you may not combine EPL and GPL code where linking exists between code made available under those licenses. Does that not mean anything?
    – cat
    Commented Apr 30, 2016 at 17:37
  • You write a lib in Clojure, and probably license it with EPL because everyone does. Clojure is written mostly in Clojure, and all of its standard library is too. If I want to link my GPL code with your EPL code, I cannot, that is against the terms of the EPL.
    – cat
    Commented Apr 30, 2016 at 17:47
  • Yes, that phrase means something. It means the linking step where you combine multiple object modules into a final executable. Clojure doesn't compile down to machine code and you don't use the linker to create an ELF executable. It "compiles" down to bytecode if it compiles at all, and there isn't a linking step because the JVM uses a completely different mechanism for handling imports from external .class files. That's assuming you're even distributing the byte-compiled files as opposed to the source code, given the variety of Clojure engines out there.
    – Todd Knarr
    Commented Apr 30, 2016 at 21:36
  • okay, and what about may not combine EPL and GPL code where source code under those licenses are both the same source code module? Again, would seem to imply GPL code can't use EPL libs and vice versa.
    – cat
    Commented Apr 30, 2016 at 21:39
  • 1
    Did you copy any of the library code into your own source files? Did you add your code to the library? Then how do you conclude your code and the library's code are in the same source code module?
    – Todd Knarr
    Commented May 1, 2016 at 18:34
4

I think the safest choice is to just follow the GNU guidelines[1], and license the Clojure code under GPL 3+ with an additional Clojure permission.

At least, that's what I do for my projects (albeit with the AGPL3+)...

I even helped writing a Leiningen template[2] that does just that for the GPL3+ :-)

In case you prefer using the AGPL3+, the procedure is the same: just modify the title of the permission so it mentions that license instead.

Whatever license you choose, just remember that the GNU and the FSF both advise to always allow "either version X of the License, or (at your option) any later version as published by the Free Software Foundation".

BTW: the ASLv2 is GPLv3-compatible[3].

Sources

[1] GNU's Rationale and HOWTO: https://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs

[2] GPL3+ template for Leiningen: https://github.com/ujihisa/gpl3p-lein-template/blob/master/src/leiningen/new/gpl3p/README.md

[3] https://www.gnu.org/licenses/license-list.html#apache2

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.