Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am really confused.

The GPL states that if you start with GPL code, and modify that code, that you must release your code with modifications free of charge also under a GPL.

But what if you simply use the existing GPL code without modifications as a library? Can you then write software to interface with that code, unchanged, that is closed source?

share|improve this question
2  
No. You can do that with LGPL code, but not with GPL code (usual disclaimer: I'm not a lawyer). –  us2012 Feb 16 '13 at 18:10
2  
(The wikipedia article on LGPL explains this quite well: en.wikipedia.org/wiki/GNU_Lesser_General_Public_License . Fur further info, consult the FSF and GNU websites.) –  us2012 Feb 16 '13 at 18:12
add comment

2 Answers

The GPL dictates that derivative works must be released under a GPL compatible license (if released). That said, there's some ambiguity as to what exactly constitutes a derivative work and technically there are ways to use GPL'ed code in proprietary projects without the project becoming "infected" (emphasis mine):

Can I release a non-free program that's designed to load a GPL-covered plug-in?

It depends on how the program invokes its plug-ins. For instance, if the program uses only simple fork and exec to invoke and communicate with plug-ins, then the plug-ins are separate programs, so the license of the plug-in makes no requirements about the main program.

If the program dynamically links plug-ins, and they make function calls to each other and share data structures, we believe they form a single program, which must be treated as an extension of both the main program and the plug-ins. In order to use the GPL-covered plug-ins, the main program must be released under the GPL or a GPL-compatible free software license, and that the terms of the GPL must be followed when the main program is distributed for use with these plug-ins.

If the program dynamically links plug-ins, but the communication between them is limited to invoking the ‘main’ function of the plug-in with some options and waiting for it to return, that is a borderline case.

Using shared memory to communicate with complex data structures is pretty much equivalent to dynamic linking.

See also the question I am writing free software that uses a non-free library.

Personally, I'd contact the FSF with details of the project and ask for clarifications before using the GPL'ed code. If the FSF attests that you can't use the GPL'ed code, I'd then contact the original author of the code and ask them (really nicely) for a LGPL version of it. The chances are extremely slim, but you never know.

share|improve this answer
add comment

You cannot use GPL code in proprietary software without making your proprietary code become "infected" by the GPL license. Your code would then become GPL code as well. It doesn't matter if you've modified the GPL code or not. If your code uses it, it too becomes GPL code.

Thus, if you're building any kind of software where it's important that your code remain proprietary, then do not use GPL code.

However, this isn't to say that corporate entities cannot make a profit using GPL code. If you focus on building solutions that help you provide better services to customers or that fill a need that requires your continual involvement in support of the software, then you can charge service fees. For instance, the Android operating system is open source, yet Google, Amazon, Verizon, AT&T, and other entities make money from it everyday because they bill for services rendered, not for selling the software.

Also, this helps hardware companies like Motorola and Samsung sell their devices, as they use Android as well.

Also, building on the "service" case and what Martin Beckett mentions in the comments, if the code you're using is something that will be used internally only and not distributed to the outside world, you can use GPL code without having to release it to the world.

It's always your choice whether or not to release the product, but if you do release the product, you must release both binaries and code as per the terms of the GPL.

share|improve this answer
1  
TO be clear it only becomes GPL if you distribute it. If you use it internally you can do what you want with it –  Martin Beckett Feb 17 '13 at 5:18
    
@MartinBeckett - Thanks for bringing up that very valid point. I updated my answer. –  jmort253 Feb 17 '13 at 5:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.