[NTLK] Newton Programming and the GPL

From: Eckhart Koeppen (eck1000_at_gmx.net)
Date: Sat Nov 10 2001 - 21:03:15 EST


Hello all -

now for something really interesting ;) -

Paul Guyot has reminded me politely that he thinks that using the
GPL is illegal with the use of the NTK (Newton Toolkit) and NCT
(Newton C Tools). Since this is a topic for very heated discussions
and I have recently released a port of a software library to the
Newton where the original software (MAD) and the port itself are
licensed under the GPL, it might be useful to discuss that
statement and bring some light to the current situation.

The GPL serves as a means to regulate the distribution of software,
both in binary and source form. It also regulates the possibilites
for modification of software which is licensed under the GPL. If
the GPL holds in court has to my knowledge not been established
yet, so it is a bit early to make statements about the legality and
illegality of actions. To argue about the applicability of the GPL
and potential conflicts, one has to differentiate between an
original release where the author or authors have full rights of
authorship and ownership and an adoption or modification of
software licensed under the GPL (i.e. derived work).

In the first case, the authors are pretty much allowed to state
anything that does not conflict with existing law (e.g. copyright
law, consumer protection law or trade law). Regarding the GPL, it
is clearly possible to license a software package under the GPL
even if the GPL or parts of it are not enforcable. To be more
specific: An author can create a program that uses a non-GPL third
party library and license his or her program under the GPL. The
result is a non-enforcable distribution clause of the GPL since
nobody would be able to redistribute his or her software under the
GPL without the source code of said third-party libraries. The
author however is free to distribute whatever he or she pleases. In
addition, there are no consequences license-wise for any
third-party software that are used in the original software.

The second case is the case that is of more importance here. The
GPL states clearly that any derived work and any modifications of
an original, GPL-licensed release falls under the GPL as well (the
so-called viral aspect of the GPL). There have been numerous
arguments as what to derived work is, but the most agreed upon
cases are static linking of original work and source code
modifications of original work. Once it has been established that a
certain software package indeed is derived from GPL-licensed
software, the obligations for distribution put forth by the GPL
have to be met. These are defined in section 3 of the GPL.

Section 3 of the GPL states that software licensed under the GPL
can only be distributed if not only binary versions of the original
or modified software but the source code is made available as well.
Section 3 also defines what constitutes the source code, a point
which has caused many frictions in the past when software with
different licenses had been used together with GPL-licensed
software. Source code is defined as: "... the preferred form of the
work for making modifications to it." This is a very important
prerequisite to ensure that others are enabled to make
modifications to the software, one of the goals of the GPL listed
in the preamble.

It is further defined that "For an executable work, complete source
code means all the source code for all modules it contains, plus
any associated interface definition files, plus the scripts used to
control compilation and installation of the executable." This is a
list of the parts needed to recreate a binary executable of a
software package. Although it is potentially non-exhaustive and
under certain circumstances not fitting, it contains those parts
that are commonly need for software development for conventional
operating systems. The goal is clear: provide others with the
complete set of components needed to modify and use a GPL-licensed
program.

Under most circumstances however, a program is not self-contained.
It needs interface with the system it runs on. It also most likely
uses existing facilities of the system, like precompiled libraries,
script repositories or installed services. A strict enforcement of
the definition of the complete source code of a program according
to section 3 would thus require to distribute not only the source
for the program itself but any library it uses. This is of course
not possible because even if the source code for a third-party
library were available, permitted redistribution under the GPL is
very unlikely.

For this reason, section 3 contains a clause that lists the
components of a program that are excluded from the obligation to
provide source code. The exception covers ".. anything that is
normally distributed (in either source or binary form) with the
major components (compiler, kernel, and so on) of the operating
system on which the executable runs." Note that interestingly
enough, the GPL considers the or a compiler a major component of
the operating system.

The above provides the basis on which an evaluation of the
applicability of the GPL for development for the Newton can be
made. I want to discuss this on two levels: the technical and the
philosophical. I also want to restrict the discussion to the
distribution of modifications or derived work under the GPL.

On the technical level, the problems when developing for the Newton
lie in the definition of what needs to be provided in source code
form in order to comply with the GPL. Starting with the general
statement to provide the "the preferred form of the work for making
modifications to it," it would occur that this would be all the
protos, layouts, project files, text files, resources, C/C++ source
files, include files, module export files and module definition
files that are needed to create a Newton package which then can be
transferred and executed on the Newton. The problem however are
those parts a package needs to interface with the Newton OS. For a
NewtonScript package, this is usually the platform file, for C/C++
packages, this would be the NewtonInterfaceLib.o (I don't want to
cover driver development at this point, mostly due to lack of
knowledge on my part). Note that this does not cover the compiler
itself since it is not part of the program. It is merely used to
create a binary executable.

I argue at the point that these files are not subject to the GPL
obligation to be distributed in source code form alongside the
original program or derived work. The reason for this is that they
are distributed with their respective compilers and not part of a
third-party application. One possible objection to this is that the
compiler is not distributed with the operating system. To counter
that point: the GPL merely states that the files subject to the
distribution exception have to be distributed with the major
components of the operating system, not with the operating system
itself. Now a second objection can be made: The compiler has
traditionally only under Unix-like operating systems been a major
component of the operating system and it is not a major component
of the Newton OS. The counterpoint: First, it is not a given that a
compiler for an operating system has to run under the operating
system, an the GPL does make any assumption in that respect.
Second, a compiler is indeed a major part of an operating system.
If there would be no NTK, nobody would be able to develop
applications for the Newton OS. If nobody would be able to create
applications, then the whole point of having an operating system is
moot, except for those systems that are not meant to run
applications developed by third parties. And the NTK is the
starting point for any development in NewtonScript, as are the NCT
for development in C/C++.

This reasoning has been upheld in the past by Richard Stallman
himself, one instance is the port of GNU AWK to the Macintosh and
other platforms using non-GPL tools like Microsoft C or PowerPlant
(search on Google Groups for MacGawk and GPL). Other instances are
the numerous ports of GNU software to platforms where a development
system is not part of the core operating system distribution. As
with MacGawk, this includes ports to MS-DOS, where the argument
that a compiler is not a major component of the operating system
could be made as well.

On the philosophical level, one has to examine the goals of the
GPL. Specifically, the preamble says that: "Our General Public
Licenses are designed to make sure that you have the freedom to
distribute copies of free software (and charge for this service if
you wish), that you receive source code or can get it if you want
it, that you can change the software or use pieces of it in new
free programs; and that you know you can do these things." The GPL
does not say that anything beyond the actual software has to be
provided in a free manner, instead the goal is to enable others to
examine and modify existing free software. The GPL has to walk a
fine line then as to specify what exactly makes up a program. In
that, it cannot be as restrictive as to prohibit GPL-licensed for a
certain platform because the development environment or parts of it
are not available under the GPL. Such a stance would counter the
goal to spread free software, and that seems to be a very important
goal for the FSF, which I am sure everybody has noticed already.

Coming back to the current situation: The only conflict I see is
that MAD Newton is linked against or uses two files that are not
licensed under the GPL: NewtonInterfacesLib.o and the platform
file. The discussion would then have to be between me and Robert
Leslie as the author of the original software. Although I have
argued out that this not a conflict, I am sure that Robert would
have absolutely no problems granting a license that "permits
redistribution of MAD and MAD Newton without providing the source
code for the object file 'NewtonInterfaceLib.o' and the file
'Newton 2.0 Defs' as contained in the latest version of the Newton
C Tools and the Newton Toolkit." But I don't see this as necessary
and won't bother Robert with this unless he objects. I fully
respect other developer's choices of the licenses they choose, as I
expect that same respect from others. Besides that, I myself am
pretty pragmatic regarding software licensing and like to use the
best tool for the job.

Note that the above is not an evaluation of the value of the GPL in
general, the idea of free or open software, the ramifications of
the GPL and innovating, Microsoft, Communism or anything else, so
when replying, please abstain from discussing those matters. Or if
you absolutlety have to discuss it, start a different thread. You
know, the [OT] thing ;)

Eckhart

--
                      -- eck_at_40hz.org -- www.40hz.org --

-- This is the Newtontalk mailinglist - http://www.newtontalk.net To unsubscribe or manage: visit the above link or mailto:newtontalk-request_at_newtontalk.net?Subject=unsubscribe



This archive was generated by hypermail 2.1.2 : Sat Dec 01 2001 - 20:02:34 EST