Unable to write GPL software with clojure?

840 views
Skip to first unread message

Kyle Sexton

unread,
Aug 18, 2015, 5:24:49 PM8/18/15
to clo...@googlegroups.com
All,

Can anyone weigh in on whether it is possible to write GPL code with clojure? Seen some recent[1] tweets saying that the EPL on clojure core prevents writing GPL code with clojure.

[1] - https://twitter.com/bodil/status/633566680879366144

--
Kyle Sexton

Phillip Lord

unread,
Aug 18, 2015, 6:05:06 PM8/18/15
to Kyle Sexton, clo...@googlegroups.com

Bodil is wrong, I belive. You can write GPL software with clojure, in
the same way that you can write GPL software with Java. Or GPL software
for Windows.

The relevant provision in the GPL is the bit about "standard interface"
and "system libraries". You can link GPL code to a system library
without release of the source of the system libraries at all.

For languages, we have this:

"in the case of interfaces specified for a particular programming
language, one that is widely used among developers working in that
language."

This is a bit difficult to interpret, but for Clojure any library in
clojure.core which is released in the main Clojure jar would be covered.

There *is*, however, an issue with use of many parts of the Clojure
ecosystem. For example, I believe that releasing a leiningen plugin
under GPL would be impossible, since lein is EPL and is not part of the
standard interface (I pick lein as an example here, not for any other
reason). So, Clojure is not an ideal environment for GPL code, since
there will be many libraries you cannot use.

I do not believe that the EPL on Clojure has any implications at all for
code implemented in Clojure, but I do not know EPL that well. IIUC, I
cannot release modified versions of Clojure under anything other than
EPL, but that is the main limitation.

It's an unfortunate situation in some ways, but one that has been
entered into consciously. Doubly unfortunate in that it is largely for
technical reasons, as far as I can tell, rather than a deliberate desire
to EPL and GPL to be incompatible. Such is life. Licences are more
complex than code.

Sean Corfield

unread,
Aug 18, 2015, 6:05:20 PM8/18/15
to clo...@googlegroups.com
On 8/18/15, 2:24 PM, "Kyle Sexton" <clo...@googlegroups.com on behalf of k...@mocker.org> wrote:


>Can anyone weigh in on whether it is possible to write GPL code with clojure? Seen some recent[1] tweets saying that the EPL on clojure core prevents writing GPL code with clojure.

You cannot write an application that is GPL and released as a standalone program with EPL libraries embedded:

https://eclipse.org/legal/eplfaq.php#GPLCOMPATIBLE

"Based upon the position <http://www.fsf.org/licensing/licenses/> 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."

https://www.fsf.org/blogs/licensing/using-the-gpl-for-eclipse-plug-ins

"However, developers who want to release GPL-covered plug-ins for Eclipse can address this issue by providing an additional permission with their license <http://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs> that grants users permission to combine their work with Eclipse in this way."

In other words, while you can’t write standalone GPL software using EPL libraries, you could provide just your (Clojure) software under a modified GPL that would allow end users to then combine it with the (EPL) libraries it needs to make a complete piece of software — but that wouldn’t be very convenient for your users.

This is part of why some people consider GPL to be a "viral" license and why many companies will not use GPL software: it "taints" everything it touches and requires "the whole thing" to be GPL. Proponents of GPL will argue a different position (so, be careful, this is almost a religious issue on both sides).

Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood




Sean Corfield

unread,
Aug 18, 2015, 6:39:15 PM8/18/15
to clo...@googlegroups.com
On 8/18/15, 3:04 PM, "Phillip Lord" <clo...@googlegroups.com on behalf of philli...@russet.org.uk> wrote:


>There *is*, however, an issue with use of many parts of the Clojure
>Ecosystem.

Even if the "Clojure/core" definition extended to Contrib libraries, under this consideration, you couldn’t write a non-trivial Clojure program with just the core/contrib namespaces without duplicating a LOT of code that is already out there. So I believe Bodil is correct _in practice_ even if she may be _technically_ incorrect in theory.

>For example, I believe that releasing a leiningen plugin
>under GPL would be impossible, since lein is EPL and is not part of the
>standard interface (I pick lein as an example here, not for any other
>reason).

Actually, based on what both the Eclipse Foundation and the Free Software Foundation say about writing GPL plugins for Eclipse, I think this is a case where you _could_ write GPL Clojure code, albeit under a slightly modified GPL (see my response to Kyle, with links to both Eclipse and FSF websites discussing this exact situation).

Again tho’, you’d need to avoid the greater ecosystem of EPL-covered Clojure libraries and stick to just core (and maybe contrib).

>It's an unfortunate situation in some ways, but one that has been
>entered into consciously. Doubly unfortunate in that it is largely for
>technical reasons, as far as I can tell, rather than a deliberate desire
>to EPL and GPL to be incompatible. Such is life. Licences are more
>complex than code.

EPL is more "business-friendly" than GPL insofar as companies can combine EPL code into their (commercial) products much more easily than GPL code, so I’d view this as much less of a technical decision than a solid business decision, made for the benefit of Clojure at large, so it can spread into more companies.

(caveat: IANAL but I’ve been through OSS license audits at companies that are large enough to care deeply about this sort of stuff — unfortunately)

Phillip Lord

unread,
Aug 19, 2015, 9:33:13 AM8/19/15
to Sean Corfield, clo...@googlegroups.com
Sean Corfield <se...@corfield.org> writes:

> On 8/18/15, 3:04 PM, "Phillip Lord" <clo...@googlegroups.com on behalf of philli...@russet.org.uk> wrote:
>
>
>>There *is*, however, an issue with use of many parts of the Clojure
>>Ecosystem.
>
> Even if the "Clojure/core" definition extended to Contrib libraries, under
> this consideration, you couldn’t write a non-trivial Clojure program with just
> the core/contrib namespaces without duplicating a LOT of code that is already
> out there. So I believe Bodil is correct _in practice_ even if she may be
> _technically_ incorrect in theory.


I think that you are correct that the use of EPL has consequences, and I
would have assumed that what you said was correct, but then I checked
up. For instance, Magnar was worried about this use of GPL for his site.

http://www.parens-of-the-dead.com/

So, I went and looked it up and actually neither of the two libraries he
is using are EPL. So, already non-EPL licenced Clojure libraries are
more widespread than I thought.

It would be interesting to do a survey of license use. I am sure EPL is
common, partly because Clojure uses it, and partly because leiningen
puts it in as the default (bad leiningen!).


>>For example, I believe that releasing a leiningen plugin
>>under GPL would be impossible, since lein is EPL and is not part of the
>>standard interface (I pick lein as an example here, not for any other
>>reason).
>
> Actually, based on what both the Eclipse Foundation and the Free Software
> Foundation say about writing GPL plugins for Eclipse, I think this is a case
> where you _could_ write GPL Clojure code, albeit under a slightly modified GPL
> (see my response to Kyle, with links to both Eclipse and FSF websites
> discussing this exact situation).

Yeah, it's a variant on the "classpath" exception.


> Again tho’, you’d need to avoid the greater ecosystem of EPL-covered Clojure
> libraries and stick to just core (and maybe contrib).
>
>>It's an unfortunate situation in some ways, but one that has been
>>entered into consciously. Doubly unfortunate in that it is largely for
>>technical reasons, as far as I can tell, rather than a deliberate desire
>>to EPL and GPL to be incompatible. Such is life. Licences are more
>>complex than code.
>
> EPL is more "business-friendly" than GPL insofar as companies can combine EPL
> code into their (commercial) products much more easily than GPL code, so I’d
> view this as much less of a technical decision than a solid business decision,
> made for the benefit of Clojure at large, so it can spread into more
> companies.


I understand that. I'd rather not discuss motivations, lest we end up in
yet another long license thread. I am only interested in consequences.


> (caveat: IANAL but I’ve been through OSS license audits at companies that are
> large enough to care deeply about this sort of stuff — unfortunately)

Agreed. My concern with the EPL is (partly) that it is GPL incompatible,
but more the *reason* that it is incompatible. It has a "choice of law"
clause. Maybe that's fine for the US. But in the UK? I have no idea at
all whether it means anything at all (probably it does not), but
possibly it does.

It's not likely to change now as I said, so there is probably nothing
that can be done about it.

Phil

John Gabriele

unread,
Aug 19, 2015, 1:53:03 PM8/19/15
to Clojure
On Wednesday, August 19, 2015 at 9:33:13 AM UTC-4, Phillip Lord wrote:

It would be interesting to do a survey of license use. I am sure EPL is
common, partly because Clojure uses it, and partly because leiningen
puts it in as the default (bad leiningen!).


Interesting aside, I see that [Pixie](https://github.com/pixie-lang/pixie) (a Clojure-inspired lisp, currently "pre-alpha") and it's project management tool [dust](https://github.com/pixie-lang/dust) are both LGPL 3.

Atamert Ölçgen

unread,
Aug 20, 2015, 11:51:51 AM8/20/15
to clo...@googlegroups.com
On Wed, Aug 19, 2015 at 1:05 AM, Sean Corfield <se...@corfield.org> wrote:
On 8/18/15, 2:24 PM, "Kyle Sexton" <clo...@googlegroups.com on behalf of k...@mocker.org> wrote:


>Can anyone weigh in on whether it is possible to write GPL code with clojure?  Seen some recent[1] tweets saying that the EPL on clojure core prevents writing GPL code with clojure.

You cannot write an application that is GPL and released as a standalone program with EPL libraries embedded:

https://eclipse.org/legal/eplfaq.php#GPLCOMPATIBLE

"Based upon the position <http://www.fsf.org/licensing/licenses/> 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."

https://www.fsf.org/blogs/licensing/using-the-gpl-for-eclipse-plug-ins

"However, developers who want to release GPL-covered plug-ins for Eclipse can address this issue by providing an additional permission with their license <http://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs> that grants users permission to combine their work with Eclipse in this way."

In other words, while you can’t write standalone GPL software using EPL libraries, you could provide just your (Clojure) software under a modified GPL that would allow end users to then combine it with the (EPL) libraries it needs to make a complete piece of software — but that wouldn’t be very convenient for your users.

I have added this extra clause to clecs' LICENSE:

If you modify this Program, or any covered work, by linking or
combining it with clojure (or a modified version of that
library), containing parts covered by the terms of EPL, the licensors
of this Program grant you additional permission to convey the resulting
work. Corresponding source for a non-source form of such a combination
shall include the source code for the parts of clojure used as well as
that of the covered work.

To my understanding a game can be written with clecs & Clojure provided that it's distributed with GPL. Any other non-GPL clojure library cannot be included in the distribution though, as far as I can understand. It would be cool it would automatically work.

 

This is part of why some people consider GPL to be a "viral" license and why many companies will not use GPL software: it "taints" everything it touches and requires "the whole thing" to be GPL. Proponents of GPL will argue a different position (so, be careful, this is almost a religious issue on both sides).

Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood




--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Kind Regards,
Atamert Ölçgen

◻◼◻
◻◻◼
◼◼◼

www.muhuk.com

Sean Corfield

unread,
Aug 20, 2015, 1:20:55 PM8/20/15
to clo...@googlegroups.com
Atamert Ölçgen said on August 20, 2015 at 8:51 AM:
If you modify this Program, or any covered work, by linking or
combining it with clojure (or a modified version of that
library), containing parts covered by the terms of EPL, the licensors
of this Program grant you additional permission to convey the resulting
work.

Would you expect that to be read as just the Clojure JAR (which contains the Clojure compiler itself as well as a number of "standard" namespaces), or would you expect that to include the Contrib JAR libraries as well? Or, further, any other Clojure libraries released under the EPL?

I think the is the core issue of the confusion: what is "Clojure" for the purpose of any such license exclusions?

Corresponding source for a non-source form of such a combination
shall include the source code for the parts of clojure used as well as
that of the covered work.

Are you saying that the whole of the EPL-licensed Clojure source, for a specific version of Clojure used in the combined work, should be physically included into the source overall for the combined work? I.e., that any game built with clecs and distributed in source form would have to include the GitHub repos of any/all Clojure libraries used? [I believe it’s reasonable to say this — I just wanted to check this was your intent]

Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

Atamert Ölçgen

unread,
Aug 20, 2015, 1:40:54 PM8/20/15
to clo...@googlegroups.com
Hi Sean,

On Thu, Aug 20, 2015 at 8:20 PM, Sean Corfield <se...@corfield.org> wrote:
Atamert Ölçgen said on August 20, 2015 at 8:51 AM:
If you modify this Program, or any covered work, by linking or
combining it with clojure (or a modified version of that
library), containing parts covered by the terms of EPL, the licensors
of this Program grant you additional permission to convey the resulting
work.

Would you expect that to be read as just the Clojure JAR (which contains the Clojure compiler itself as well as a number of "standard" namespaces), or would you expect that to include the Contrib JAR libraries as well? Or, further, any other Clojure libraries released under the EPL?

If you are saying what "clojure" there means is unclear, I agree with that. And I would like to work towards fixing it. I think, at the time I created this, my intent was just Clojure distribution (sans contrib) since clecs only depends on that. But now I realize a game made with clecs can depend on other libraries as well and this clause perhaps also need to cover them.
 

I think the is the core issue of the confusion: what is "Clojure" for the purpose of any such license exclusions?

Corresponding source for a non-source form of such a combination
shall include the source code for the parts of clojure used as well as
that of the covered work.

Are you saying that the whole of the EPL-licensed Clojure source, for a specific version of Clojure used in the combined work, should be physically included into the source overall for the combined work? I.e., that any game built with clecs and distributed in source form would have to include the GitHub repos of any/all Clojure libraries used? [I believe it’s reasonable to say this — I just wanted to check this was your intent]

If it included clecs' source and the game's source it would be enough for me. I wouldn't want to dictate terms for other people's code. If another library the game depends on is also GPL, it's source should be included as well. But that's because of the other author's licensing. If that library has a license that doesn't require source distribution, who am I to ask for that.

Not directly related to licensing but my main intent is to get people to write games and share them. Not necessarily as a commercial activity but game development for game development's sake. Commercial side is IMO already covered well.

 

Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fluid Dynamics

unread,
Aug 21, 2015, 2:26:16 AM8/21/15
to Clojure
On Thursday, August 20, 2015 at 1:40:54 PM UTC-4, Atamert Ölçgen wrote:

If it included clecs' source and the game's source it would be enough for me. I wouldn't want to dictate terms for other people's code. If another library the game depends on is also GPL, it's source should be included as well. But that's because of the other author's licensing. If that library has a license that doesn't require source distribution, who am I to ask for that.

Not directly related to licensing but my main intent is to get people to write games and share them. Not necessarily as a commercial activity but game development for game development's sake. Commercial side is IMO already covered well.

LGPL might be a better choice than GPL in that case, as LGPL doesn't dictate terms for everything that ever gets linked to your code, while still providing GPL-like terms for your own code.
Reply all
Reply to author
Forward
0 new messages