Licensing Issues

Hi

I am evaluating the use of various S/W development tools, in order to develop Business Application Software (such as Finance, Inventory, Purchase, Marketing, etc. Software). I am interested in cross-platform (aka multi-platform) S/W development. I am considering using C++ as a programming language and this aspect has been mostly finalized. My Company uses a Commercial model.

From a licensing perspective, I have to take a decision on which of the following S/W development tools to use:
1) Compiler: GCC or Borland C++ or some other C++ compiler that supports cross-compilation.
2) Build automation S/W:
a) GNU make or some other make
b) GNU Autotools or some other equivalent product

From a distribution perspective, I have the following firm CONSTRAINTS:
1) A central group of Libraries for which only the Executables will be sold/licensed to the client. Source for the Libraries won't be distributed.
2) Application S/W (which will use the above Library code) for which both the source and executables will be sold to the client.

In this commercial model, clients won't have rights to distribute either the Source or Executables to any other client.

My Company would be developing all the S/W being sold/licensed as NEW programs from scratch. They won't be based on any existing S/W at all.

I would like to know, if I am permitted to develop and sell or license such S/W using GNU products such as GCC, GNU make and GNU Autotools.

If not, I would need to source these S/W Development tools from some other commercial Company. Then, which Company should I consider (eg: Borland)? Are there any equivalents to GNU Autotools sold by other Companies?

Thanks
Steven
The short answer is yes.

I have worked for a number of companies that used GCC and Make to create commercial software that we then sold. We never paid a penny or asked anyone's permission to use GCC or make.

https://www.gnu.org/licenses/gcc-exception

You have permission to propagate a work of Target Code ... under terms of your choice...

There are a couple of words missing there, but if you're not doing anything very unusual with it, whatever binaries you create using GCC are yours to distribute and licence as you want.


If I may make a suggestion, pick GCC and the LLVM compiler; right from the start, have your make tools compile using both, fully. This will force you to write better code (you won't use compiler specific extensions and anything that one of the two throws up on should then be double-checked) and give you sofething businesses love; protection against a key tool (i.e. one of your compilers) becoming unsuitable or being found to have some particular problem. If you do this right from the start, and bake it into your makefiles, it'll be easy.
Last edited on
Thanks for the reply.

I am documenting the exception granted by the GPLv3 below:

1. Grant of Additional Permission.

You have permission to propagate a work of Target Code formed by combining the Runtime Library with Independent Modules, even if such propagation would otherwise violate the terms of GPLv3, provided that all Target Code was generated by Eligible Compilation Processes. You may then convey such a combination under terms of your choice, consistent with the licensing of the Independent Modules.


However, there is no dilution in copyleft requirements:

2. No Weakening of GCC Copyleft.

The availability of this Exception does not imply any general presumption that third-party software is unaffected by the copyleft requirements of the license of GCC.


Therefore, the implications and problems for a commercial company creating proprietary S/W are as follows:
a. The executables (target code) can be sold under “terms of your choice”.
b. However, the sources are still copylefted. Therefore, the sources must be distributed to the client who has the right to use, modify and redistribute the sources at will. This may be unacceptable for commercial, proprietary S/W.
c. If one obtains a patent on the S/W (eg: if one is doing something innovative), placing the source under copyleft, may nullify the usefulness of the patent.

Steven
a. The executables (target code) can be sold under “terms of your choice”.
b. However, the sources are still copylefted.
This is nonsense.
The GPL revolves around the concept of derivative work, "derivative work" being defined as the situation where if program A must interface with program B in order to work, then A is a derivative work of program B.
The output of a compiler could be considered a derivative work of the compiler, since it could not exist without that compiler. Either it is derivative work and you must distribute the sources, or it's not and you mustn't. There's no middle ground.
The special exception for GCC implies that GCC's output is not considered a derivative work of GCC. This exception was added precisely to allow non-GPL software to be compiled with GCC and have the output be non-GPL. Other GNU code transformation/generation tools have similar exceptions.

The availability of this Exception does not imply any general presumption that third-party software is unaffected by the copyleft requirements of the license of GCC.
I find this statement rather ambiguous, but by my interpretation the FSF would be the first party and the user of GCC would be the second party. I'm unclear where a third party comes in. Perhaps it's referring to third-party GCC extensions or front-ends. If that's the case, then this sentence would be interpreted as "if building your program needs third-party extensions for GCC, the licensing terms of those extensions may cause the compiled output to be considered a derivative work".
To understand the licence you need to re-read the critical parts, because licence is referring to previous clauses every now and then, meaning in order to understand reading several times is required.

I will mark important text with bold.
Let's begin with exception -> clause 2, since that's your concern

2. No Weakening of GCC Copyleft.

The availability of this Exception does not imply any general
presumption that third-party software is unaffected by the copyleft
requirements of the license of GCC.


To understand the above read few lines before (beginning of the exception),
because the above clause 2 is part of this exception let's read the beginning again:

This GCC Runtime Library Exception ("Exception") is an additional
permission under section 7 of the GNU General Public License, version
3 ("GPLv3"). It applies to a given file (the "Runtime Library") that
bears a notice placed by the copyright holder of the file stating that
the file is governed by GPLv3 along with this Exception.

When you use GCC to compile a program, GCC may combine portions of
certain GCC header files and runtime libraries with the compiled
program. The purpose of this Exception is to allow compilation of
non-GPL (including proprietary) programs to use, in this way, the
header files and runtime libraries covered by this Exception.


This exception applies to runtime library only!
Now read clause 2 again:

2. No Weakening of GCC Copyleft.

The availability of this Exception does not imply any general
presumption that third-party software is unaffected by the copyleft
requirements of the license of GCC.


As you can see this exception allows you to compile any 3rd party code but copyleft requirements are covered in GCC general licence which says following about this exception:

7. Additional Terms.

“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.


As you can see this exception does not apply to your code, it applies to GCC runtime library, but entry program is governed by general GCC licence.

Now let's grasp clause 1 of this exception because that's the confusing part:

1. Grant of Additional Permission.

You have permission to propagate a work of Target Code formed by
combining the Runtime Library with Independent Modules, even if such
propagation would otherwise violate the terms of GPLv3, provided that
all Target Code was generated by Eligible Compilation Processes. You
may then convey such a combination under terms of your choice,
consistent with the licensing of the Independent Modules.


as simple as it says, your license must not violate independent module code license.
but what is independent module? -> read beginning of the exception:

A file is an "Independent Module" if it either requires the Runtime
Library for execution after a Compilation Process, or makes use of an
interface provided by the Runtime Library, but is not otherwise based
on the Runtime Library.


Independent module is 3rd party code if it does not require runtime library if compilation is not done with GCC, but once you compile it with GCC it does require runtime library, so it is not part of runtime library otherwise so yes, this clause 1, is referring to 3rd party code modules.


Let's take a break an make temporary conclusion:

1. This exception applies to GCC runtime library (as told in exception -> Definitions)
2. Your license must not violate 3rd party licenses. (as told in exception -> clause 1)
3. the entire program remains governed by GCC License without regard to this exception (as told in clause 7. of general license.)

You might be confused by conclusion 3 above, because Clause 1 of this exception says:

1. Grant of Additional Permission.

You have permission to propagate a work of Target Code formed by
combining the Runtime Library with Independent Modules, even if such
propagation would otherwise violate the terms of GPLv3, provided that
all Target Code was generated by Eligible Compilation Processes.


Yes you have the right to violate general license to propagate a work of target code, but only if all Target Code was generated by Eligible Compilation Processes.

But what is "Eligible Compilation Processes." ?

Let's read again what the exception says about "Eligible Compilation Processes" under -> Definitions:

A Compilation Process is "Eligible" if it is done using GCC, alone or
with other GPL-compatible software
, or if it is done without using any
work based on GCC. For example, using non-GPL-compatible Software to
optimize any GCC intermediate representations would not qualify as an
Eligible Compilation Process.


Eligible Compilation Processes means all the code needs to be compiled with GCC, Now let's repeat:

you have the right to violate general license to propagate a work of target code, but only if all Target Code was generated by Eligible Compilation Processes.

But what does mean "propagate" here?

General license defines what "propagate" means in this license.

To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.


As you can see Clause 1 in the exception says you have the right to copy, modify and redistribute copies.

but it does not give you any other rights explicitly such as violating copy left rules, or violating freedom of users and their right to modify your program.

EDIT: the above striked line is wrong, see edit 2 posts below

I hope this helps understand your rights.

NOTE: The above is my interpretation of the license with the aim to help understand parts of it, please do not govern your business according to my interpretation.
because there is one more thing in exception at the end:
Hopefully that text is self-explanatory. If it isn't, you need to speak to your lawyer, or the Free Software Foundation.


I used following links from gcc.gnu.org site:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/appendix_gpl.html
https://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html
Last edited on
SSteven, everything written here about the GPL3 licence is very instructive; from your original post, you're not doing any that gives you any problems.

If you're using GCC to make binaries just out of code you wrote yourself, you can do what you like with those binaries.

If you're using some other library in your software as well, you'd have to check the licence on that other library, but from your original post you're not doing that (
My Company would be developing all the S/W being sold/licensed as NEW programs from scratch.
)

If you're writing some code, and then using GCC and Make to turn it into a binary, you can do what you want with that binary. It is not, as you previously thought, copylefted.

Ten of thousands of companies around the world churn out proprietary, closed binaries every day using GCC and Make. They don't share the code. They licence it however they feel like. From my own personal experience, companies such as Bosch, Thales, L3, BAE.

If they happened to use some third-party software in their code (for example, the popular zlib library), then they have to abide by whatever restrictions that third-party software might have, but that's a choice they make when they decide to use that third-party software. My current employer makes uses of the zlib library, and the licence of that requires us to do absolutely nothing at all, which was easy.
Last edited on
I can't edit my post above because of "content too long error"
so here is an edit from my above post, it continues at following line:

but it does not give you any other rights explicitly such as violating copy left rules, or violating freedom of users and their right to modify your program.


EDIT:
However there is one more line below in clause 1 of the exception that says:

You may then convey such a combination under terms of your choice,
consistent with the licensing of the Independent Modules.


It is important here to understand the difference between "propagating" a program vs "conveying" a program!

We already covered what "propagating" means Let's take a look back to general license about "conveying" a program:

To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.


Now when we understand what means "conveying" let's repeat Clause 1 of the exception:

1. Grant of Additional Permission.

You have permission to propagate a work of Target Code formed by
combining the Runtime Library with Independent Modules, even if such
propagation would otherwise violate the terms of GPLv3, provided that
all Target Code was generated by Eligible Compilation Processes. You
may then convey such a combination under terms of your choice
,
consistent with the licensing of the Independent Modules.


Since Clause 1 of the exception explicitly allows you to grant or deny "conveying" permissions trough your license, all you need to do is explicitly state that in your own license, while in same time ensuring you do not violate 3rd party code licenses, since this license does not have control over 3rd party licenses.

that is, to deny conveying (copying) your own program you explicitly state this in your license, because Clause 1 of the exception license explicitly allows you to do so.

The confusing part in Clause 1 is that it refers to 2 different terms, "propagating" and "conveying" a program.
"propagating part" of the clause refers to you while "conveying part" of the clause refers to granting permission to 3rd parties in this context.

There are still more confusing parts from the license such as copyleft, and copyright of "Target Code", and this part might require additional analysis of the license in order to be 100% sure about your rights.

END OF EDIT
From a licensing perspective, the sane option would be:

1) Compiler and tool-chain: LLVM clang++, libc++, lld, lldb etc ('LLVM BSD' license)
(with the Microsoft library on Windows)

2) Build automation S/W: SCons (MIT license) and/or CMake (BSD 3-clause license)

I have had it with lawyers trying to interpret freedom. ...

I think the GNU license is a joke, it fights the capitalism it so much is against with their own tools, and no company is ever going to risk any kind of proximity to so many so vague statements assembled in a license.
PHK 'Beerware, am I really serious?' http://people.freebsd.org/~phk/


> "no company is ever going to risk any kind of proximity to so many so vague statements assembled in a license."

True; based on personal experience.
True; based on personal experience.


I did already mention that I've worked for many companies who have spent decades making proprietary software using GCC. The rules are clear.
@JLBorges
I actually clicked on your link and the most interesting part is the license this guy uses:

1
2
3
4
5
6
7
8
/*
 * ----------------------------------------------------------------------------
 * "THE BEER-WARE LICENSE" (Revision 42):
 * <phk@FreeBSD.ORG> wrote this file. As long as you retain this notice you
 * can do whatever you want with this stuff. If we meet some day, and you think
 * this stuff is worth it, you can buy me a beer in return Poul-Henning Kamp
 * ----------------------------------------------------------------------------
 */

Thanks for all the replies. I have found them very instructive.

1) The GPL Runtime Exception license (the lesser GPL) is applicable to only certain GNU runtime libraries. If you are linking to those libraries alone, you can distribute your binaries under proprietary terms.

If you link to any GNU library NOT covered by the lesser GPL, but covered instead by the GPLv3, your binaries need to be covered by the GPLv3 also.

There is a document known as "Learning the GNU Development tools" published by GNU (http://autotoolset.sourceforge.net/tutorial.html). According to it, the libg++ library is covered by the GPL itself (and not the lesser GPL) and therefore permits you to build only free executables covered under GPL. The libG++ library is the GNU C++ library; not the standard C++ library. By default, libg++ is NOT linked to an object file originating from C++.)

Thus, for a C++ source file, if you are linking to libg++ or any other library covered by GPLv3, you need to cover the generated binaries under GPLv3, since these binaries include parts of the library's object code and therefore are "based on" that library. The sources themselves are NOT "based on" the library and therefore, my interpretation is that they needn't be covered by GPLv3. (In other words, the sources are FOSS; the binaries are copylefted since they are covered by GPLv3 and can therefore be freely used, distributed and modified.) At least, this is how I understand the situation.

2) Now considering that GNU publishes (amongst other S/W packages) a compiler, libraries and Build Automation tools, it is instructive that, in the above situation, the binaries can be seen as being "based on" only the libraries (and not "based on" the compiler or build tools). Therefore, my understanding is that if the GNU Build tools (such as GNU make and Autotools) are used to build such sources, and assuming libraries such as libg++ are NOT needed, the binaries needn't be covered under GPLv3, and neither need the sources be.

Thanks

Steven
The libG++ library is the GNU C++ library; not the standard C++ library.
It's both. It's the GNU implementation of the standard C++ library. More precisely, it's the not not-header-only parts of the library. See http://g.oswego.edu/dl/libg++paper/libg++/node1.html
According to https://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.whereis_old libstdc++ supersedes libg++.

According to it, the libg++ library is covered by the GPL itself (and not the lesser GPL) and therefore permits you to build only free executables covered under GPL.
libstdc++ is covered by GPL3 and uses the linking exception (https://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html ). Therefore, just linking to libstdc++ is not sufficient to cause the project to become GPL3.

Thus, for a C++ source file, if you are linking to libg++ or any other library covered by GPLv3, you need to cover the generated binaries under GPLv3, since these binaries include parts of the library's object code and therefore are "based on" that library. The sources themselves are NOT "based on" the library and therefore, my interpretation is that they needn't be covered by GPLv3.
Yes, but this distinction is only relevant if the sources are licensed under a GPL-compatible license. If they're not, then the question of what license they're in after you've linked the executable and distributed is meaningless, because you were not licensed to do that in the first place.

the binaries are copylefted since they are covered by GPLv3 and can therefore be freely used, distributed and modified.)
Study and modification of binaries is protected in most places in the law as reverse engineering and is a right regardless of the GPL. The GPL protects the right of the user to modify the program using the sources.

2) Yes, but there's no need to engage in such mental contortions. I'm willing to bet that the standard libraries for all GNU language implementations use the linking exception.
Topic archived. No new replies allowed.