GPL'd code and commercial products

Hi, I’m usually writing MIT licensed libraries and tooling, so I’m a bit out of my depth in a commercial project where we want to use some GPL’d code.

I’ve forked a project which uses GPL 2.0 and modified it to be a c++ library. I’m then linking that c++ library with a c++ shim, compiling and distributing it in a node.js package. I’m then using that package in an electron app that I wish to allow users of my service to download to use my service. So there’s 4 bits of software;

  1. The GPL’d project
  2. The Library fork
  3. The node.js package
  4. The Electron App

As I understand it;

  1. I need to release the Library fork under the GPL 2.0 (with an open git repo and/or when asked for the source)
  2. I need to distribute GPL’d project’s license and the Library fork’s license with all my releases.

What I’m less clear on is if the nodejs library needs to be released, or the electron app. I also don’t know how close I am to the actual requirements.

Thanks!

IANAL, but my understanding of the GPL is that if the original code is GPL, then all derived works have to be GPL too. That includes anything linked to the GPL’d code, which means that all four parts, the GPL’d project, your fork, the nodejs package, and the electron app would need to be GPL’d.

LGPL would allow you to link LGPL code into proprietary software, but the GPL does not.

1 Like

You need to distribute the “combined work” under the GPL. So if you have one executable which pulls in Electron, your C++ library, node.js, etc, you have to provide it all under the GPL (sub-licensing Electron et al in so doing). Your Electron application’s source code (i.e. your product) also needs to be distributed with the GPL.

1 Like

Now I get why the LGPL and it’s precursors exist. It makes sense. Thanks!

Ok I do have one more question. If I want to also use non gpl’d libraries in my gpl’d app, how does that work?

It depends on the license of the libraries you want to use. If they use a permissive license then you’re able to combine them all into a single combined work which is distributed with the GPL; you will have to comply with the terms of the library’s permissive licenses of course, such as by providing attribution, but nonetheless it’s quite easy to do this.

If the libraries you want to use have a copyleft license, then it’s a different matter: you need to determine if the licenses are compatible with the GPL. GNU maintains an FAQ which tells you which licenses are thought to be GPL-compatible:

https://www.gnu.org/licenses/license-list.html

2 Likes