28

Assume there is a library that is licensed under GPL. I want to use it is closed source project. I do following:

  1. Create small wrapper application around that GPL library that listens to socket, parse messages and call GPL library. Then returns results back.
  2. Release it's sources (to comply with GPL)
  3. Create client for this wrapper in my main application and don't release sources.

I know that this adds huge overhead compared to static/dynamic linking, but I am interested in theoretical way.

Andrey
  • 1,209

7 Answers7

36

Legally, I'd say it would be OK (but I am not a lawyer - consult a lawyer for legal advice).

Morally, it's pretty reprehensible. If you don't like the GPL, then the "proper" solution is not to use a GPL library.

Edit: To clarify, whatever the legal standing of the GPL with respect to whether dynamic linking is allowed or not, the LGPL was specifically created with the intent of allowing dynamic linking in the case of libraries. So it seems clear to me that by choosing the GPL over the LGPL, the author of the library was doing so explicitly to disallow dynamic linking. Using a technical means to work around a legal restriction that expresses the author's explicit intent for his code is what is reprehensible, in my opinion.

For the record, I'm not personally a fan of the GPL (I prefer a more permissive license such as MIT or BSD). However, I am a huge fan of respecting the work of other developers, and if they don't want you link their library with closed-source software, then that's prerogative.

Dean Harding
  • 19,911
8

See the I'd like to incorporate GPL-covered software in my proprietary system. Can I do this?

The question is, is your wrapper application any use on it's own? If you made a command line version of your program that was GPL you could release the GUI under a different license. For example you could make an IDE for gcc that was closed source or a visual diff tool based on diff.

However, if you wrapped up library has no use other than being used by your program, and you'd program has no use without this library, than it's a derived work and would need to be released under the GPL.

FigBug
  • 2,379
7

IMO, legally it's OK. (IANAL) To improve on the moral side of the issue, don't call it a "FooBar wrapper that makes FooBar legaly available to MyClosedApp", call it a server. Make it a nice little open source program that "allows to do FooBar over the net". Put it on SourceForge or dedicate a website to it, with project page and instructions and stuff. Then let "MyClosedApp" just use the "FooBar server".

user281377
  • 28,434
6

IANAL but I believe you are ok, the relevant section of GPL3 is at the end of section 5:

A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.

This is probably going to depend on exactly what your 'client' does, mouviciel's answer is probably good guidance on how to do it safely

If you think your app is an extension of the library rather than something aggregated with it then you are probably right (you should be in a good place to know this) in which case your best bet is to contact the author and try to get a different license

this would seem to back my position that this is explicitly allowed by the GPL, assuming done properly.

jk.
  • 10,306
2

As far as I understand, you can leave your software closed-source as long as it is able to do its work without GPL library. See the GPL library as a plugin whose absence does not make your software useless.

mouviciel
  • 15,491
1
  1. try to find Open Source alternative, if there is none, go for the GPL one;
  2. check if it's GPLv3 with Affero clause if it is, there is nothing to be done;
  3. if it's GPLv2, you can do exactly as you suggest;

There is also somewhat controversial option. Under most legislatures dynamic linking should be boundary to "derived work". The logic behind this is, that while dynamically linking you're just including header files in your program. In many legislations header files are considered API definition and explicitly excluded from being copyrighted. On the other hand, with dynamic linking, actual linking with GPL library is done on end-user's system. But as I've said, there is lot of controversy with it, Stallman is strongly FUD-ing against this.

vartec
  • 20,846
0

Would it be legal for Adam Brown to write a program which used a GPL library and acted as a "server", if he released all the source code to everything associated with it, but the only client code he released was pretty feeble because that's all he'd written client-side? I see no basis whatsoever for thinking it wouldn't.

If Charles Dover found Adam Brown's "server" and decided to write a closed-source program to communicate with it, would the GPL constrain his actions in any way? Not that I can see, since his only usage of GPL'ed software would be as the binaries he received from Adam Brown. If he distributed Adam's binaries he'd have to include a link to the source as well, but nothing else in the GPL would affect any of Charles' code.

With regard to one person writing a GPL-licensed server, and then using the server for his own closed-source purposes, I wouldn't think there should be any legal problem if in writing the server he made a bona fide effort to make it useful to others who might wish to use the supplied GPL code in the same way. In particular, the publicly-released documentation of the interface should be sufficient to allow a competent programmer to either write code for a server which would be accepted by the client program just as the original would be, and to write client programs that would use the server in the same fashion as the author's application.

supercat
  • 8,629