Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

License warning #9

Open
mvrhov opened this issue Jun 22, 2018 · 9 comments
Open

License warning #9

mvrhov opened this issue Jun 22, 2018 · 9 comments

Comments

@mvrhov
Copy link

mvrhov commented Jun 22, 2018

IMO you should put the warning into the readme.

The GMP license is GPL/LGPL however you are statically linking the library into the final executable,
As the GPL is viral license all your code is also GPL and if you distribute the executable you must also distribute all the source code of you application!

@cznic
Copy link

cznic commented Jun 22, 2018

LGPL is just fine to link to any program regardless of its license. Wolframs's Mathematica uses GMP as well, IIRC.

@ncw
Copy link
Owner

ncw commented Jun 22, 2018

@mvrhov by default the go toolchain will link dynamically so the LGPL terms should apply.

My reading about LGPL leads me to think that @cznic is correct - using a dynamically loaded LGPL module is fine even in proprietary software.

@mvrhov
Copy link
Author

mvrhov commented Jun 22, 2018

That is fine if it will be dynamically linked. I explicitly stated that this applies to static linking.
And by default go links statically, but I might be wrong. ldd on the final executable should tell.

@cznic
Copy link

cznic commented Jun 22, 2018

Alternatively, a statically linked library is allowed if either source code or linkable object files are provided.2

src: Differences from the GPL

@mvrhov
Copy link
Author

mvrhov commented Jun 22, 2018

I don't think that's easy to convince (or even possible) go to just link .a files together, to produce the final executable.
So For all practical purposes statically linking (L)GPL code in proprietary executable that you distribute you need to also distribute your sources.

@ncw
Copy link
Owner

ncw commented Jun 22, 2018

Here is the test binary on my machine showing the dynamic linking

$ ldd gmp.test 
	linux-vdso.so.1 =>  (0x00007ffe8d5ab000)
	libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f8f0fc50000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8f0fa31000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8f0f651000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f8f0fed0000)

@mvrhov
Copy link
Author

mvrhov commented Jun 22, 2018

Excellent. Then Just add to readme, that the gmp lib must be dynamically linked due to LGPL license if one wants to use it in commercial projects. Many are not aware of this. That's the reason I'm advocating this whenever I have a chance.

@ncw
Copy link
Owner

ncw commented Jun 22, 2018

@mvrhov that sounds like a good plan. Fancy sending a pull request?

@cznic
Copy link

cznic commented Jun 22, 2018

Except it's not correct. LGLP does not forbid static linking. It just states particular conditions for that. Warning otherwise amounts to only spreading FUD.

OSS vs commercial SW is a false dichotomy. SW can be non-free and open source at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants