CAVEconnectome / MeshParty

Apache License 2.0
35 stars 16 forks source link

Dynamic links with GPLv3 software #23

Closed banesullivan closed 5 years ago

banesullivan commented 5 years ago

Hi there! I recently saw that this repository was a dependent of PyMeshFix (https://github.com/pyvista/pymeshfix) and that this is licensed under Apache v2.0. I recently realized that the MeshFix (https://github.com/MarcoAttene/MeshFix-V2.1) software that PyMeshFix wraps is under a GPL license and that license requires any software that "dynamically links" to the original MeshFix software also be under a GPL license.

I'm not very experienced with software licensing but I'm not sure if the Apache license is compliant with the GPL license for MeshFix.

I've reached out to the creator of MeshFix (@MarcoAttene) to see if it would be possible to relicense PyMeshFix or find a solution that will help mitigate these kinds of downstream issues - I will try to keep you in the loop as well as this affects your software.

fcollman commented 5 years ago

So I think this FAQ suggests that actually no... because all these libraries are dynamically linked with the original and are interpreted languages, then the GPL does not apply.

https://www.gnu.org/licenses/gpl-faq.html#IfInterpreterIsGPL

fcollman commented 5 years ago

actually the more i read i'm not sure that applies... it seems to come down to whether the included code is "identifiably separate". Both of these packages are trying to implement high level algorithms, and simply want to provide users an easy way to call the GPL work as part of a larger workflow. We aren't modifying the source code in any way, or distributing that source code.

banesullivan commented 5 years ago

Both of these packages are trying to implement high-level algorithms, and simply want to provide users an easy way to call the GPL work as part of a larger workflow.

To my knowledge, this falls under a dynamic link and something that would require the linking, high-level software also to be licensed under the GPL. If that weren't the case, then anyone could make a commercial software suite that has a button labeled "Fix Mesh" which executes MeshFix and call that a high-level implementation... which is exactly what the creators of MeshFix are trying to avoid by using a GPL license (my assumption).

If there is any sort of linking from software "B" to GPL-licensed software "A" (and I mean any sort of communication where software "B" has any knowledge of "A") then the "B" software must be licensed under GPL as well or it cannot link to software "A" without violating the terms of the license of "A".

For example, over in PyVista, we cannot even assume that objects passed to PyVista might have an attribute called mesh on the object passed that would be a PyVista mesh type because over in PyMeshFix, those classes have an attribute called mesh which is a PyVista mesh type. If we did that, then that would be considered dynamic linking, and we'd have to relicense PyVista - which simply isn't a possibility considering we have commercial downstream dependents.

Discalaimer: I have absolutley no legal training and my knowledge of these issues comes from extensive googling and discussions with other people who have experience in software licensing but minimal legel training.

fcollman commented 5 years ago

yeah i think this an area of confusion and disagreement, especially when law doesn't generally like to draw clean lines and boundaries. The idea that a software A is doing thing A, and software B was written to accomplish thing B, and might use thing A to do it, does not mean I think that software B automatically get the license from thing A. In your example, where someone makes a simple wrapper which simply presses wraps and calls "Fix Mesh", then the purpose of that software is EXACTLY the purpose of MeshFix. The difficult question I think is when is a piece of code a true separate piece of work. If you take the all dynamic linking argument too strongly, then all parts of the linux kernel are part of all python code and GPL applies just because it was written in python.

banesullivan commented 5 years ago

Fair point... Unfortunately (for me and the PyVista project) I'm taking the dynamic linking argument strongly as a safety measure to make sure we don't get an email from a lawyer. I figured it was best to be as safe as possible as the makers of MeshFix rely on selling licenses for projects that leverage MeshFix in commercial uses.

I was nervous about building any links between PyVista and MeshFix in case someone made a commercial software suite that called on PyVista to run routines to repair a mesh which might leverage the PyMeshFix wrapper, thus circumnavigating the GPL license. Especially since there are a handful of commercial packages leveraging PyVista.

Either way, I wanted to simply bring this to your attention and save you some of the headaches we had to deal with in making PyMeshFix and TetGen work with PyVista.

By no means do I want you to be forced to relicense your hard work to something that doesn't reflect your values or why you made this software so definitely carry on if you think I'm overly cautious or full of 💩

fcollman commented 5 years ago

I 100% see your perspective and think frankly for commercial reasons you are doing the safe and prudent thing. This doesn't make you full of ____ but rather makes you quite thoughtful. So thank you for bringing it to our attention!

banesullivan commented 5 years ago

Moving forward, please feel free to close this issue (or leave it open) if you think this is is resolved