FAQ: Difference between revisions

141 bytes added ,  27 July 2017
→‎Licensing issues: Overhaul section for clarity.
(→‎Licensing issues: Overhaul section for clarity.)
Line 159: Line 159:
==If I write code using Octave do I have to release it under the GPL?==
==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.
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.
* 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.


Code written using Octave's native plug-in interface (also known as a .oct file) necessarily links with Octave internals and is considered a derivative work of Octave and therefore must be released under terms that are compatible with the GPL.
* Code written using [https://www.gnu.org/software/octave/doc/interpreter/Oct_002dFiles.html Octave's native code interface] (also known as a .oct file) necessarily links with Octave internals and is considered a derivative work of Octave.  Therefore it must be released under terms that are compatible with the [https://www.gnu.org/licenses/gpl.html GPL].


Code written using Octave's implementation of the Matlab MEX interface may be released under the terms of whatever license you choose, provided that the following conditions are met:
* Code written using [https://www.gnu.org/software/octave/doc/interpreter/Mex_002dFiles.html Octave's implementation of the Matlab MEX interface] may be released under the terms of whatever license you choose, provided that the following conditions are met:


# The plugin should not use any bindings that are specific to Octave. In other words, the MEX file must use the MEX interface only, and not also call on other Octave internals. It should be possible in principle to use the MEX file with other programs that implement the MEX interface (e.g., Matlab).
:# The MEX file may not use any bindings that are specific to Octave, '''it has to use the MEX interface only'''.  In other words, it should be possible in principle to use the MEX file with other programs that implement the MEX interface (e.g., Matlab).  For example including an Octave header file or calling an Octave function within the MEX file, that is not related with Octave's implementation of the MEX interface make the MEX file a derivative work of Octave and has therefore to be released under terms that are compatible with the [https://www.gnu.org/licenses/gpl.html GPL].
# The MEX file should not be distributed together with Octave in such a way that they effectively create a single work. For example, you should not distribute the MEX file and Octave together in a single package such that Octave automatically loads and runs the MEX file when it starts up. There are other possible ways that you might effectively create a single work; this is just one example.
:# The MEX file may not be distributed together with Octave in such a way that they effectively create a single work. For example, you should not distribute the MEX file and Octave together in a single package such that Octave automatically loads and runs the MEX file when it starts up. There are other possible ways to effectively create a single work; this is just one example.


A program that embeds the Octave interpreter (e.g., by calling the "octave_main" function), or that calls functions from Octave's libraries (e.g., liboctinterp, liboctave, or libcruft) is considered a derivative work of Octave and therefore must be released under terms that are compatible with the GPL.
* Code that '''embeds the Octave interpreter''' (e.g., by calling the <code>octave_main</code> function), or that calls functions from Octave's libraries (e.g., liboctinterp, liboctave, or libcruft) is considered a derivative work of Octave and therefore must be released under terms that are compatible with the GPL.


==Since the MEX interface allows plugins to be distributed under terms that are incompatible with the GPL, does this mean that you are encouraging people to write non-free software for Octave?==
==Will you change the license of the Octave libraries for me?==


No. The original reason for implementing the MEX interface for Octave was to allow Octave to run free software that uses MEX files (the particular goal was to run SundialsTB in Octave). The intent was to liberate that software from Matlab and increase the amount of free software available to Octave users, not to enable people to write proprietary code for Octave. For the good of the community, we strongly encourage users of Octave to release the code they write for Octave under terms that are compatible with the GPL.
'''No.''' Instead of asking us to change the licensing terms for Octave, we recommend that you release your program under terms that are compatible with the GPL.  This way the free software community can benefit from your work the same as you have benefited from the work of all the people who have contributed to Octave.


==I wrote a program that links with Octave libraries and I don't want to release it under the terms of the GPL. Will you change the license of the Octave libraries for me?==
==Should I favor the MEX interface to avoid the GPL?==


No. Instead of asking us to change the licensing terms for Octave, we recommend that you release your program under terms that are compatible with the GPL so that the free software community can benefit from your work the same as you have benefited from the work of all the people who have contributed to Octave.
'''No.''' The original reason for implementing the [https://www.gnu.org/software/octave/doc/interpreter/Mex_002dFiles.html MEX interface] for Octave was to allow Octave to run free software that uses MEX files (the particular goal was to run [https://computation.llnl.gov/projects/sundials/release-history#sundialsTB sundialsTB] in Octave). The intent was to liberate that software from Matlab and increase the amount of free software available to Octave users, not to enable people to write proprietary code for Octave. For the good of the community, we strongly encourage users of Octave to release the code they write for Octave under terms that are compatible with the [https://www.gnu.org/licenses/gpl.html GPL].


==Why can't I use code from File Exchange in Octave? It's released under a BSD license!==
==Why can't I use code from File Exchange in Octave?==


When one downloads code from File Exchange and use it on non Mathworks software (such as Octave), they are violating the Matlab central [http://www.mathworks.co.uk/matlabcentral/termsofuse.html Terms of Use]. While the [http://en.wikipedia.org/wiki/BSD_licenses BSD licenses] does allow one to use such code in Octave, it also allows others to further impose restrictions which Mathworks does through the MATLAB Central Terms of Use of their site:
According to the Matlab Central [https://www.mathworks.com/matlabcentral/termsofuse.html Terms of Use] (Last updated: 10-Aug-2016), all submitted code is licensed under the [https://en.wikipedia.org/wiki/BSD_licenses BSD license] by default (cf. § 5 [https://www.mathworks.com/matlabcentral/termsofuse.html Terms of Use]), but it is clearly stated that:


{{quote|text=Content submitted to File Exchange may only be used with MathWorks products.|sign=Matlab central|source=[http://www.mathworks.co.uk/matlabcentral/termsofuse.html#content Terms of Use 2iii]}}
{{Quote|text=Content submitted to File Exchange may only be used with MathWorks products. | |§ 2(a)(iii) [https://www.mathworks.com/matlabcentral/termsofuse.html Terms of Use]}}


It should suffice -- although interpretations of this vary -- to contact the author directly and have them send you the code personally, or download the code from the author's own website, if available.
That does not apply to GNU Octave, therefore the usage is in general prohibited.  It should suffice although interpretations of this vary to contact the author directly to send you the code personally (maybe released under a free license), or download the code from the author's own website, if available. [[Asking_for_package_to_be_released_under_GPL:_examples|Some examples of letters/email sent to authors for that purpose]].
 
If you need that code or think that the code is useful, please write the authors asking them to release under a free license. Some examples of letters/email sent to authors can be found in the page [[Asking_for_package_to_be_released_under_GPL:_examples|Asking for package to be released under GPL: examples]].
 
Feel free to remix and reuse, just make sure you use your name!


=What's new in Octave=
=What's new in Octave=