Ask Slashdot: GPLed code with non-GPLed output
redhog asks this question dealing with the
viral nature of the GPL:
"I have a program that interprets a set of
documents, and outputs text according to the
commands and text in this document. The output
consists partly of code hardcoded into the program.
If the program is GPLed, then that part of the
output would be, too. Here is where the problem
arises: The program must be able to generate
proprietary output from proprietary input,
and it is technically impossible to separate
the program and the code being output. Is it
possible to GPL parts of a program? The
best would be if the program (including the
code that is output) was GPLed as a program,
but its output not; i.e. as long as the code
to be output is in the program, it is GPLed,
but as soon as it is isolated, it is not
(And may use a BSD-style license). Is there
any way to acomplish this?" I think I
can clarify this a bit. If your interested,
hit the link for more.
What I think redhog is describing is similar to a situation like this: A GPL'd program is designed to take input from a macro or markup language and convert it into another macro/markup language. To facilitate this conversion, the program defines its own macros, which are included in the output to simplify matters (this is the hardcoded portion that can't be removed from the GPL'd program). Can proprietary output be built on the included GPL'd macros? Or will the viral nature of the GPL extend to the whole output violating the IP of the corporation using it?
Autoconf explicitly states that the program is covered by the GPL, but that its output is not. That simple. Its output consists of quite a bit of stuff from Autoconf itself, so it's a perfect example.
Someone correct me if I am wrong, but couldn't you just comment that some portions of the code are LGPLed and the rest is GPLed. Like this
//BEGIN LGPL Code
//END LGPL Code
//foo.c
//Some Free Software
//This code copyright 1999, someone here or there
//Code in this file is released under the GNU
//General Public License version 2.0,
//with the exception of WELL COMMENTED code
//fragments clearly marked between "//BEGIN LGPL Code" and "//END LGPL Code"
int main
{
SomeFunc();
SomeLGPLFunc();
return 0;
}
Sean Upton
sean@sltrib.com
Why Not? Any thoughts?
I would recommend that SOMEBODY consult with a lawyer, someday. The grandstanding around these topics gets ridiculous sometimes.
As of Bison version 1.24, we have changed the distribution terms for `yyparse' to permit using Bison's output in non-free programs. Formerly, Bison parsers could be used only in programs that were free software. The other GNU programming tools, such as the GNU C compiler, have never had such a requirement. They could always be used for non-free software. The reason Bison was different was not due to a special policy decision; it resulted from applying the usual General Public License to all of the Bison source code.
Beware, Nugget is watching... See?
This is what I call the 'libertine software' argument. "It's bad, because I can't do whatever I like with other people's software!"
It's one thing when one says "here's my program, under BSD license; let the everyone do whatever they may with it it." This position, although criticised by GPL advocates (it allows derivative works to be made unfree), at least has some elements of altruism (or at least, sacrifice in exepectation of a greater reward).
But then it's another thing to say "I should be able to do anything I want with free software".
People should really give the Preamble of the GPL a good, slow read. I think it's more than self-explanatory. Freedom for _everyone_ to use, change and share the fruit of the community's work.
I guess you think no one understands the BSD license.
I think I can understand the licensor's point of view: "Here, I wrote this, you can have it. Do what you like with it, I want you to benefit from my work".
However, the point of view of some licensees is what's problematic, IMHO. I mean the same thing I said above, libertine software: "A program is free if I can do whatever I like with it."
Contrast this with the FSF ideal, which I will paraphrase (in my terms): "The ideal for a piece of software is freedom for _everyone_ to examine, change and share it."
---
And then there is:
And finally a little explanation of "derivative":
--
The world is neither black nor white nor good nor evil, only many shades of CowboyNeal.
Stephan
I am a lawyer, but this is not legal advice. See a lawyer in your own jurisdiction if you need some.
This is *ancient* contract law in the english speaking world. The particular overrides the general; the addendum overrides the boilerplate.
Put in a preface, suffix, or extra file, and anything in it that contradicts the GPL overrides those terms, and the rest of the GPL remains intact.
Or, claim to release it under the GPL, but take actions inconsistant with the GPL, such as having dependencies upon GPL-non-assimilable code, and encourage people to distribute binaries. Your actions then override the GPL and modify it, for a quasi-GPL (QGPL?) license. THere are tons of those out there, many calling themselves GPL when they're not, and they don't even know it . . .
hawk, esq.
The first rule of licenses is that whoever makes the code makes the rules. So you're safe if you're allowed to make the license -- just use the GPL and attach a clause to it pointing out that the output is considered a derivative work of the input, NOT of the Program (or something similar).
The Artistic Licence is written with this in mind for even very complex transforms. You might take a look at it.
And finally, I dislike the GPL. It has a VERY good goal; but its means to that end are repressive. I don't want my software free if it enslaves people.
My ideal license is BSD-style (minus the attribution clause), but I would make the special note (not in the license) that I did not want my program to be used in a proprietary system.
Moral people are free to use my program in moral ways; I'm not concerned about the behavior of immoral people.
-Billy
--
I don't actually have a real solution, but this is exactly the situation bison is in. Since bison includes part of itself in its output, the programs it outputs have to be GPLed as well. This is why most distributions include both yacc and bison, which have very close to the same functionality. Yacc has a BSD license and can thus be used for projects where bison cannot.
Bruce
Bruce Perens.
I used to write "affect", as in "to have an effect upon", but too many people objected to that usage because of its secondary meaning, which has to do with emotion. "effect" when used in its verb form has the same meaning, anyway, look it up.
Whatever form I use, "effect" or "affect", someone always comes along and tells me it's wrong and I should use the other form.
Bruce
Bruce Perens.
This beats arguments about the GPL any day.
Bruce Perens.
I hope that answers the question.
Thanks
Bruce
Bruce Perens.
Your metaphor is invalid. People who sell add-on parts don't make copies of my car and sell them.
Bruce Perens.
I'd say it matters to the end user whether I write the code or not. I'd not write it if the BSD license was my only protection.
Bruce Perens.
I can't help but see that as a fair trade. If somebody wants to use my GPL-ed code, they have to GPL what they are using it with. I wrote it to add to the existing pool of free software, not to help anyone with free consulting services for their proprietary stuff.
Bruce
Bruce Perens.
If I decide to write a program and contribute it to free software, the GPL assures me that it will stay free software forever. I'd be bothered if somebody made it non-free, effectively stealing my work for their own remuneration. The GPL is effectively a vaccine against that.
The BSD license lets people apply almost any license to my software, including most non-free licenses. If I wrote work under the BSD license, someone could modify it and sell the result with no source code, and I'd have no recourse at all. Anyone who wants can infect my BSD software with the non-free license virus.
So, which license is more viral? It sounds to me as if the GPL is getting a bum rap here.
By the way, the BSD license allows you to apply the GPL to a modified BSD work. I've thought about organizing a GPL-ed thread derived from the body of existing BSD-licensed work, just to illustrate a lesson about the BSD license. That would really piss people off, but it would be legal.
Thanks
Bruce
Bruce Perens.
Thanks
Bruce
Bruce Perens.
-- Faré @ TUNES.org
-- Faré @ TUNES.org
Reflection & Cybernet
(Disclaimer: I'm not a lawyer, but I think I have a decent understanding of the GPL).
What about gcc? I haven't taken a look at the sources, but I'm sure that somewhere in there (maybe in the data files, which are also placed under the GPL), there's pre-defined stuff that ends up in your executables. But you can legally create closed-source binaries with gcc. My understanding is that this is because your programs aren't a "derivative work" of gcc (search the text of the GPL for the full legal mumbo jumbo), even though gcc is a vital step in making closed-source binaries. The same should apply to your program. But this could all be thrown out the window if your program has some complex macros that're statically shoved into the final works (e.g. you CAN'T legally produce closed-source binaries with ANY compiler if you statically link with a GPLed library).
Also, I just realized there's a flame war waiting to burst out about my semantics: in this case, I'm using "closed-source" as a synonym of "non GPLed".
ORBit basically says "The idl compilier is GPL. The code generated by it has no restrictions"
I would think a similar disclaimer is all that is needed.
The GPL does not apply to the output of a program unless the output "constitutes a work based on the program" [sec. 0], where this clause is clarified further up as being defined as the Program or any derivative work under copyright law. Although it's unlikely the author could get away with claiming copyright on your output because it contains a portion of his work, it's really up to the author how to interpret this. If you're really worried, ask the author to insert a clause like the exemption bison's license gives for the bison skeleton, and have him re-license it to you. If it's your own program, you can do whatever the hell you want :)
I've finally had it: until slashdot gets article moderation, I am not coming back.
Why does some of the code need to be hardcoded? Why not just put the hardcoded part that is to be outputted in a file and read it in from the program? That way the file wouldn't have to be GPL'd. Seems like a simple solution. My guess is that your trying to avoid this.
My sig has a broken link in it.
From the GPL 2.0:
/usr/src/linux/COPYING file (thats the one that comes with the Linux kernel) states:
"The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does."
I think what Bruce Perens says about putting a disclaimer makes sense. In fact, my
"NOTE! This copyright does *not* cover user programs that use kernel services by normal system calls - this is merely considered normal use of the kernel, and does *not* fall under the heading of 'derived work'."
I hope this answers your question...but remember:
DISCLAIMER: I am not a lawyer. I would recommend consulting one if you are really serious.
My journal has hot
What's the fine line between code and data?
Didn't RMS indicate that code documentation would come under GPL? What about paper documentation? Where should the distinction be drawn between free software and stuff that is worth paying for?
LL
As I understand things, it's the main copyright holder who can throw in an exception to the GPL (or some other license). If a group of people hold the copyright, they probably flame themselves on their private mailing list for a few days, and then make a public decision. :)
The history of Bison, as I understand it, makes this fairly interesting. IIRC, Bison was derived (by Richard Stallman, et al) from a Yacc which had a Berkeley style license. After he made his changes, he put Bison under the GNU GPL. People had concerns about Bison's output being automatically under the GPL, so the exception that Bruce mentioned above was introduced.
But what I'm curious about is what happens in a circumstance like this: J. R. Hacker writes a useful program that outputs some code. His useful program is under a BSD style copyright. I like his program, make some changes for myself, and put the new bit under the GPL. With my new souped up version, the outputted code is also under the GPL, because I want it that way. Now... can the program's original author, J. R. Hacker, preempt my licensing decision and say that output from the program, even my version, needn't be covered by the GPL?
There's a lot of potential for confusion here. My proposed solution? Make all software free, everywhere. All of this licensing crapola would go out the door. Everyone would be happy once the dust settled. It wouldn't send anyone into the poor house, either. But we all knew that.
You're a suburbanite.
So it's whoever writes the most code get's to set the license, is that it? So if I steal your proprietary code and add twice the amount of my own, it's all mine then?
I don't think I'll ever understand the convoluted logic of these rabid anti-GPL people. First they claim that the GPL somehow coerces them into making their software free, then they claim that people who make GPL software don't really believe in free software anyway.
Let's break this down: anti-GPL person believes in property rights, but anti-GPL person chastises someone else for using them, as if he is somehow entitled to that code.
And it always seems to be the ultra-capitalist, Ayn Rand worshipping types (i.e. strong property rights, unconditionally) who push this view. I may be going out on a limb here, but I think this
has nothing to do with freedom and everything to do with a hatred of Stallman and his success.
So get over it already! Sure Stallman's a fanatic, but so are the people trumpeting the so-called BSD Linux. In Stallman's ideology, GPL is in fact free, because his ideology regects proprietary software altogether. In other words, it's free because it's free for the GPL community. Maybe you want to squabble over the definition of "free", but that still rhetorical hand-waving every bit is pointless as Stallman's.
You don't like the GPL not because it isn't "free", but because it doesn't jive with your interests. You see this huge body of available source code, but can't have it because of licensing restrictions. So you whine and compain about how "not free" the GPL really is.
Anti-GPL people, let me put this in terms you understand: Stallman's rhetoric aside, GPL software does have owners. It is the free software community. The "viral" restrictions exist because we do not wish to be exploited. We work for ourselves by working for the community; when the community creates wealth by making new software, we all get a bit richer.
Now, just because we share does not mean our time is valueless, so if want to use the products of our labor, you damn well better pay for them. The way you do so is to join the community by sharing your enhancements. If you don't like those terms, then you can take your business elsewhere. It's that simple. It you somehow feel "entitled" to the software, then you either a.) reject the notion of intellectual property on philosophical grounds, so the GPL doesn't really affect you, or b.) you are an opportunist who is every bit exploitive as some "collectivist" straw-man from a Rand novel.
So go ahead, write your own code, slap whatever license you want on it. Don't expect us to do it for you.
The GPL is about ethics.. What you are saying when you use the GPL is that you will not restrict the rights of others with your licensing agreement. You are saying, if you want to use my program to create another program, do not restrict the rights of others because I consider that BAD.. do not use my program to treat people bad, to restrict others' rights. So if your asking how you can write a program that is GPL'd and helps people do bad things then you're asking the wrong question.. you should be asking: why do I want to use the GPL?
It's time for an analogy (and it's a tired old one): I'm Sony.. I make video recorders.. Video recorders allow people to copy programs off broadcast mediums like television and watch them at some other time than the time they were broadcast.. so called "time shifting".. I think this is a fair and just thing to do.. I add a chip into my video recorder that will turn off the tape when an advertisement comes on because my users don't like advertisements on their recorded programs.. they just fast-forward them anyway.. this too is ok because when the person recorded the program they weren't watching the television (otherwise why would they record it) so they wouldn't have seen the advertisements anyway.. also very good.. someone asks me if I can make a video recorder that records two channels at the same time and blanks out the advertisements on both channels and then plays them back one after the other.. this way you get to see twice the number of programs and no advertisement.. although this is LEGAL, I don't do it.. why? because the intent is that people will be watching the time delayed playbacks at the same time as recording and never see the advertisements regardless of the fact that they are watching television at the time of the advertisements.. this undermines the system used to pay for the programs.. there will be victims (assuming the constant bombardment of advertising on television actually does sell products) to my unit and I will be responsible..
When you write a program you have to make a decision as to whether or not you are going to take responsibility for what people do with it. Do you want people to be able to do bad things to each other with your program or would you prefer that they did nice thing to each other with it. These issues are a little deap for most of us programmers to want to think about.. But one issue appears to be important to us.. How hard it is to write programs. If I am free to go out and find a program that does almost what I want and modify it to do what I want then my programming experience is greater. All I am saying when I put the GPL on my program is that I dont want you to stop me from having these freedoms and maybe I'm saying that I don't want you to stop anyone else either.
In answer to your question, slap a big label on the top of your program that says "anything that has a little tiny bit of my GPL'd code in it is GPL'd baby.. and don't even think of locking it up"..
How we know is more important than what we know.
Or you could take the separation-of-processes approach the way BSD's bc program does. That's the same kind of approach taken by my freed version of getline().
Then again, was there some reason you had to use the GPL?
One thing every body must keep in mind with the copyright law, is that the intent of the law is to protect a work as a whole, not as snippet of the work.
That mean that even if every line of code is copyrighted in a work, you cannot sue someone if he copied a small part of your code.
Note that the small part is not considered small in regards of the amount of line of codes but as it's weigth in the whole work. For example, in an data compression application, the code related to the compression engine has more weigth that the code related to the UI (because the main purpose of the application is to compress data and not to present a nice UI).
So to respond to the question, if the generated code (wich is hardcoded in the original GPL'd application) will be protected by the license only if it represent a part that weight a lot (functionnaly) in the original code (wich is probably not the case because it is the conversion engine that is the purpose of the application). In the case that the generated code represent a big part of the work, then it would be advisable to use another license (or an exception to the license) for that part.
I find this post curious. Who is permitted to make "special exceptions"? The author of any derived code?
My understanding is this: The copyright holder has absolute control over the code. Period. The GPL does not apply to the copyright owner since GPL is only one of many ways for the owner to distribute the code. In addition to distributing by GPL the owner *could* distribute the same code under a BSD-style licence, or (horror) sell propietary licences.
That having been said, under GPL what are the dynamics of copyright ownership in derived works? This issue is totally ignored in the text of the GPL.
Are derived works copyright to the original author?
-OR-
Is the copyright for the derived work entirely transferred to the author of the derived code?
-OR-
Is there joint ownership of the code?
Under joint ownership does it suffice to obtain use permission from one of the owners or must permission from all of the owners be obtained?