How much poison does the GPL contain?
November 10, 2005 3:55 PM   Subscribe

The GPL: If I were to include a piece of GPL'd code in a commercial application that I'm selling a license to, what do I need to do to be in compliance with the GPL?
posted by SpecialK to Computers & Internet (11 answers total)
 
You need to provide the source code to your application (all of it, unless you're linking to an LGPL'ed library), either for download or upon written request for three years (I think). If you use a piece of BSD-licensed code, you don't have this responsibility, you just have to give credit.
posted by evariste at 4:15 PM on November 10, 2005


Are you linking to a library or directly including GPL'd code in your application?
posted by evariste at 4:16 PM on November 10, 2005


For what it's worth, the Free Software Foundation's compliance lab exists for exactly this kind of question. Drop them a line and you'll get a timely and accurate expert opinion on how to comply with the GPL.
posted by mendel at 4:29 PM on November 10, 2005


From what I understand, you can ship GPL'd software with your own software as long as you're not linking to it, so if you're using it via a pipe, that's OK.

It seems really arbitrary to me, but that's how it's written.
posted by delmoi at 5:06 PM on November 10, 2005


You'll need to license the entire application under the GPL and you'll have to offer anybody who asks the complete source code.

I'll link to the actual GPL and the FAQ. Both are written to be understandable by programmers (though you still need to read carefully), so if you haven't read them yet, you should do so now.

Alternatively, you're free to ask the copyright holders of the GPL code to sell you a copy with a different license, one that's friendlier to what you're trying to do. With most people you'll be able to work something out.
posted by reynaert at 5:29 PM on November 10, 2005


The GPL FAQ covers your question in the section titled "Combining work with code released under the GPL".

Basically you have three options when it comes to incorporating functionality from GPL code into a commercial application.

1) License all of the application's code under the GPL. You can still sell your application, but you must provide access to the complete source code for the entire application to anyone to whom you distribute the application. You must also be prepared to provide the source code by mail-order on a physical medium, but people rarely exercise that option if you distribute the code with the app or allow the code to be downloaded.

2) Implement some sort of external application or scripting interface in your commercial application. Build a separate independent tool that makes use of the GPL code to perform the GPL'd functionality - this tool is licensed under the GPL and you must provide access to its complete source code. Arrange for the commercial application to invoke the GPL'd tool via its external application interface. Note that the external application interface likely has to make use of an IPC mechanism (pipes, network API, etc.), a plug-in interface that uses dynamic linking would probably not meet the "mere aggregation" requirement. To do this validly, you must make sure that the GPL tool and commercial application communicate at arms length, that they are not combined in a way that would make them effectively a single program.

3) Contact the author or authors of the GPL'd code and negotiate an alternative license for the the code you wish to use. Nothing in the GPL prevents the same code being licensed under multiple licenses. If the author(s) are willing, you can obtain (probably pay for) a commercial license to use their code, they can continue to distribute the code under the GPL, and you can link the code into your commercial application without having to comply with the restrictions imposed by the GPL.
posted by RichardP at 5:55 PM on November 10, 2005


Response by poster: F'in hippies. ;)

The piece of code is an ECMAscript library that parses XML on the client side. We're actually going to take a different tack, but I was curious what the ramifications would be. I've never uesd GPL'd code in the application, except for MySQL, and we purchased the commercial license for that.
posted by SpecialK at 5:56 PM on November 10, 2005


Special, that's the price for using and distributing the code... there's a HUGE amount of very, very good code out there. You're welcome to integrate it into your app, and save all the time of developing and debugging it yourself. The price is that you have to GPL the whole thing if you distribute it.

This isn't automatically death to commercial interests... it just means that you must give the source code, with full rights, only to people you give the binaries to. (your customers). Of course, this makes your customers potential competitors, but as long as they choose not to distribute the code further, you're fine.

You do NOT have to give your code to any Joe Blow who demands it. Unless you already gave him a copy of the binary, you owe him nothing. If he got the binary from someone else, it's their responsibility to provide the code, not yours.

That means you can use GPL code internally without a problem, because you're not giving it out to anyone. It's only when you transfer a program to another person or entity that the GPL clause takes effect.

In no case can you lose ownership of your code. You can be liable to an injunction to stop distributing your app, and you can be liable for (draconian) copyright-infringement penalties, thanks to the RIAA, but you cannot ever lose ownership of code that you wrote, unless you explicitly transfer it to someone. The GPL doesn't do that.

Note also that using a GPL program to create something doesn't mean you have to GPL the product. Documents you create with a GPL word processor are wholly yours. If you send your document to someone, you're not incorporating the word processor's code in any way. Likewise, you can freely use an GPLed OS to develop commercial code.
posted by Malor at 8:27 PM on November 10, 2005


Like others have said, even relying on a shared GPL library would require you to release your client application's source code. You wouldn't have that issue if you were linking to an LGPL shared object.

But my employer makes a great deal of money thanks to the GPL, and they make enough to pay a very large group of programmers (myself included) to work on GPL software.

So it's not a kiss of death at all.

Oh, and a less savoury approach is to just ignore the GPL and ship the software anyway. Plenty of companies do it all the time.
posted by cmonkey at 8:40 PM on November 10, 2005


The piece of code is an ECMAscript library that parses XML on the client side.


Any ECMAscript that directly interacts with the GPL'd ECMAscript would become GPL'd. Everything else would be fine.

A few thoughts:

1. Re-write the GPL'd software. Considering that most of the javascript libraries out there are full of cruft and non-unique ideas, this shouldn't be a problem.

2. ECMAscript is script, no matter how you obfuscate it, someone will be able to reverse engineer it and read it.

3. The GPL is unlikely to be "tested" on a peice of Javascript.

4. You can still obfuscate the living hell out of your code, if that's the only way you distribute it. Leave the GPL code as is. Who is to argue that you have an unobfuscated version of your ECMAscript? Maybe that's the way you code.


Of course, I just realized you were probably talking about embedding the ECMAscript in a binary application. If that is the case, then you are basically screwed into GPL'ing your client and distributing the source code on demand.
posted by o0o0o at 11:19 PM on November 10, 2005


Distributing obfuscated code to comply with the GPL is unethical. If all the library is doing is parsing XML, there's a zillion other ways to do that in Javascript. If you want to use the GPL library, the cost is you GPL your code too.
posted by Nelson at 3:04 AM on November 11, 2005


« Older Where can I get a RSS feed for photos that's NOT...   |   spookymovie filter Newer »
This thread is closed to new comments.