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?

4 of 263 comments (clear)

  1. 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

  2. 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

  3. 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