Slashdot Mirror


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?

8 of 263 comments (clear)

  1. Solution: See the 'bison' info pages by drdink · · Score: 3
    The GNU Bison program:

    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?
  2. Re:This "viral" stuff is all backwards, anyway by Bruce+Perens · · Score: 3
    If I want to include [someone else's] GPLed code in my program, the GPL forces me to release my program under the GPL.

    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

  3. Re:Bison vs. Yacc by Bruce+Perens · · Score: 4
    Actually, this was solved long ago. Bison includes a parser in its output. That parser contains this comment:

    /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */

    You may do something similar for any GPL-ed program for which you are the copyright holder.

    Thanks

    Bruce

  4. This "viral" stuff is all backwards, anyway by Bruce+Perens · · Score: 4
    This viral stuff is backwards. I think the BSD license is actually more viral than the GPL. Here's why:

    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

    1. Re:This "viral" stuff is all backwards, anyway by vulcan · · Score: 4

      Perhaps you need to make an effort to understand the reasons people refer to the GPL as viral.

      If I spend years writing a program using no code other than my own, I can release it under any license I want. If I incorporate BSD licensed code into my program, I can still use any license I want, so long as I preserve copyright notices. If, however, I want to include GPLed code in my program, the GPL forces me to release my program under the GPL. It has *infected* my program. This is where the term `viral' originates with regard to the GPL.

      The BSD license does not affect code and cannot affect code since it can always be placed under another license. If someone makes proprietary enhancements to my BSD licensed code on his own time with his own money, the only code that has been infected with a non-free virus is his. My code is still perfectly free. I can give it to whoever I want and it is still as free as ever. The only thing I can't do is give away the other person's proprietary enhancements made with his own time and his own money and which could possibly completely overshadow the features provided by my small amount of code.

      Although the BSD license encourages the reuse of code for *any* reason, including in projects released under non-free licenses like the GPL or one of the dozens of proprietary software licenses, doing it to piss people off will not get you very far, and it will make you look foolhardy, especially in the eyes of the people who wrote the free software (free for *any* purpose) that you would be making non-free. I guess you think no one understands the BSD license.

      All in all, a fine spirit to take in the name of free software....


      sc

  5. Easy to solve by Bruce+Perens · · Score: 5
    Just preface the GPL with this explicit exception: "The output of this program is not a derivative work of this program. You may use this program to process your own programs and data without it effecting your copyright rights on those programs and data."

    Thanks

    Bruce

  6. Re:Use of appropriate licenses by Swampfox · · Score: 3

    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.

    As a slogan, this is catchy, but the problem is, the GPL does not enslave anyone. No one has to use it. The FSF/GPL project (personifying for a moment) is a merchant. It offers its goods (really cool software, source included) for a price: philosophical agreement on projects you derive from it.

    That's not enslaving, because you have a *choice* whether to derive works from it. It may be seductive, enticing, tempting, annoying, exasperating, etc., but it's not enslaving.

    -- Ryan Waldron

    --
    Swampfox
    Real Hacker (tm) Wanna-be
    Deals
  7. It's up to the author by scrytch · · Score: 3

    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.