octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Octave FAQ update about GPL


From: fgnievinski
Subject: Octave FAQ update about GPL
Date: Thu, 6 Feb 2014 12:19:04 -0800 (PST)

I think the Octave FAQ needs a caveat, where it says:

<http://wiki.octave.org/FAQ#If_I_write_code_using_Octave_do_I_have_to_release_it_under_the_GPL.3F>
+ If I write code using Octave do I have to release it under the GPL?
- The answer depends on precisely how the code is written and how it works.
Code written entirely in the scripting language of Octave (interpreted code
in .m files) may be released under the terms of whatever license you choose.

This is in agreement with the the GPL FAQ, which states:
<http://www.gnu.org/licenses/gpl-faq.html#IfInterpreterIsGPL>
+ If a programming language interpreter is released under the GPL, does that
mean programs written to be interpreted by it must be under GPL-compatible
licenses?
- When the interpreter just interprets a language, the answer is no. The
interpreted program, to the interpreter, is just data; a free software
license like the GPL, based on copyright law, cannot limit what data you use
the interpreter on. You can run it on any data (interpreted program), any
way you like, and there are no requirements about licensing that data to
anyone.

But the GPL FAQ answer goes on to say something that contradicts the Octave
FAQ answer:
- Another similar and very common case is to provide libraries with the
interpreter which are themselves interpreted. For instance, Perl comes with
many Perl modules, and a Java implementation comes with many Java classes.
These libraries and the programs that call them are always dynamically
linked together. A consequence is that if you choose to use GPL'd Perl
modules or Java classes in your program, you must release the program in a
GPL-compatible way, regardless of the license used in the Perl or Java
interpreter that the combined Perl or Java program will run on.

* I'm interpreting this as saying that if my m code calls functions from a
GPL'ed Octave Forge package, then my code has to be released under the GPL. 
Furthermore, it could be argued that all the builtin m files shipped with
Octave are interpreted libraries rather than part of the interpreter itself. 
In other words, the Octave interpreter constitutes only the Octave C/C++
files, roughly speaking.  Considering that it's very difficult to use only
the interpreter (essentially only keywords) and no libraries, then it
follows that it's also very difficult to escape the copyleft requirement
when releasing code that uses Octave.

Now comes a twist.  I wrote code that runs on Matlab.  I released under a
GPL-incompatible license (free or not).  Someone told me it runs fine in
Octave.  What gives to the Octave GPL licensing requirements?

Maybe it's the GNU GPL FAQ that needs a caveat?  It has other similar
conflicting statements, which could be me misinterpreted as applying to e.g.
Octave Forge and classdef, respectively:
<http://www.gnu.org/licenses/gpl-faq.html#IfLibraryIsGPL>
+ If a library is released under the GPL (not the LGPL), does that mean that
any software which uses it has to be under the GPL or a GPL-compatible
license?
- Yes, because the software as it is actually run includes the library.
<http://www.gnu.org/licenses/gpl-faq.html#OOPLang>
+ In an object-oriented language such as Java, if I use a class that is
GPL'ed without modifying, and subclass it, in what way does the GPL affect
the larger program?
- Subclassing is creating a derivative work. Therefore, the terms of the GPL
affect the whole program where you create a subclass of a GPL'ed class.

It seems a way out is possible via the so-called System Libraries exception:
<http://www.gnu.org/licenses/gpl.txt>
        The "System Libraries" of an executable work include anything, other 
than
the work as a whole, that (a) is included in the normal form of packaging a
Major Component, but which is not part of that Major Component, and (b)
serves only to enable use of the work with that Major Component, or to
implement a Standard Interface for which an implementation is available to
the public in source code form.  
        A "Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system (if any)
on which the executable work runs, or a compiler used to produce the work,
or an object code interpreter used to run it.
        A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that is
widely used among developers working in that language.
        The "Corresponding Source" ... does not include the work's System
Libraries...


So in Octave's case, the interpreter (written in C/C++) is the Major
Component and the builtin libraries (written in m language) would be System
Libraries.  Beyond that it's less certain, but I'd contend that the Standard
Interface is that offered by Matlab, so Octave Forge functions that mimic
Matlab's input/output syntax would be considered System Libraries, too --
the remaining functions are original contributions.

Bottom line is: if your code runs in both Matlab and Octave, you can license
it however you wish.  Now if it runs only in Octave, and it is not trivial
(i.e., invokes not only keywords), then it must be GPL'ed (or compatible to
GPL).

Unless we want to offer a special exception as done by the GNU Classpath:
<http://www.gnu.org/software/classpath/license.html>
        When GNU Classpath is used unmodified ... for a program written in the 
java
programming language it does not affect the licensing for distributing those
programs directly.

Comments?

Thanks,
-F.

PS: there's a related though read-only thread at
<http://octave.1599824.n4.nabble.com/Interpreted-octave-code-and-GPL-td4642922.html>.




--
View this message in context: 
http://octave.1599824.n4.nabble.com/Octave-FAQ-update-about-GPL-tp4661733.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]