-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Introduce USE_GPL_LIBS Makefile flag to build Julia without GPL libraries #10870
Conversation
This is now ready and passes tests, even with USE_GPL_LIBS=0. I'll merge this in a couple of days. |
I recall a conversation where it was suggested to use |
"linalg/pinv", "linalg/givens", "linalg/cholesky", "linalg/lu", | ||
"linalg/symmetric"]) | ||
if Base.USE_GPL_LIBS | ||
tests = [tests, "linalg/arnoldi.jl"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
little weird to prepend all the linalg tests except this one...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now ready and passes tests
No it doesn't.
This fails on CI due to the .jl
suffix. And there's an old-style concatenation warning here.
And we bundle GPL command-line Git in both the Windows and Mac binaries, and Busybox on Windows. Plus GCC runtime libraries on all platforms. |
i'm pretty sure that gcc has a linking exception that explicitly permits redistributing the runtime libraries (busybox and git are certainly another matter altogether however) |
Yeah I think you're right about the linking exception on the gcc runtime libs. Should be able to disable busybox and git in |
So, until we move to libgit2, does this effectively mean that we can't have a GPL free distribution? I am sure libgcc would have the exception, but we need to verify that. What should we do about git and busybox for now? Should we just disable them for now in the GPL version - and you just have to live with that functionality missing? |
Not one that has a working package manager, without relying on the user manually installing git somewhere else on the path. We don't use busybox for much right now, mostly just to pass a few spawn tests, but it will be handy after we do get rid of git to still allow shelling out to coreutils functions on Windows. |
I guess this PR is good as it is, because you can at least now build from source and get a Julia distribution that does not include any GPL components. Only if you build the mac and windows installers, git and busybox get bundled. |
I don't understand the comment about arnoldi. I am trying to disable it, because it has a depedency on suitesparse being present. |
@garrison I think the NO_GPL line comments went away with my forced push. |
Whether julia is a "derived work" of git when git is called by julia as a command is probably independent of whether git is distributed alongside julia (or whether the user installed it manually). I could probably find this in the GPL FAQ, but IANAL. |
getting rid of busybox is pretty painful since window's doesn't actually provide anything nearly as functional by default, it's hard to fallback to anything else. see the discussion on the original PR. there's perhaps toybox (https://github.com/landley/toybox), but it would take a lot of work to make that reasonably feature complete with unix and then also port it to windows. |
We have had such discussions before too - but I just find it easier to keep it clean in such cases. For people who want to build Julia without GPL dependencies, I am sure they can figure out how to install git, at least for now. |
IANAL .. etc.. There is an argument to be had that shelling out to a program does not make a derivative work. And if Julia is not a derivative work of Git, then Git's distribution restrictions do not apply to Juila. We just distribute Git according to its own license. |
It's fine to disable it, but note the order in which the test list gets assembled:
See how linalg/arnoldi ends up at the end? That's all I'm nitpicking about. Can fix it via something like
|
Actually it does. It's called powershell. It just happens to not be syntax-compatible with coreutils. |
…ries USE_GPL_LIBS=1 by default Disable Rmath, FFTW, and SuiteSparse builds if USE_GPL_LIBS=0 Remove inclusion of julia bindings in sysimg if USE_GPL_LIBS=0 Add USE_GPL_LIBS to NEWS. Note that this commit does not remove GPL utilities such as git and busybox that are included in the Julia binary installers on Mac and Windows. It lets you build from source without any GPL library dependencies.
I am merging this, because it does not change the default behaviour. Should we add a note about this flag to the README and the LICENSE files? |
Introduce USE_GPL_LIBS Makefile flag to build Julia without GPL libraries
readme sure, I think not in license though since this is a non-default option for now |
I feel like it is worth discussing the cases under which julia builds end up being GPL vs. non-GPL. I thought the LICENSE file is the right place to clarify this, since the README is just too long, and perhaps could use some splitting. |
The readme could stand splitting into a few pieces, build troubleshooting vs other stuff. You could maybe move FFTW and SuiteSparse from the "Julia's standard library uses the following external libraries, which have their own licenses:" section into a separate section with the same title plus "unless the make variable USE_GPL_LIBS=0 is set", and add the same caveat to the Rmath section. |
@ViralBShah: I don't understand this PR. In order to make Julia GPL free one just would have to remove the dll/so/dynlib. Why does the Julia wrapper has to be removed its MIT! One example: There is a the Intel MKL providing an ABI compatible interface of the fftw. Using the existing julia wrapper of the fftw it should be possible to use it in a GPL-free manner. |
I will enable that with future commits. Note that Intel fftw wrapper is not complete, and does not support the full functionality we need. I don't like the idea of shipping a bunch of code with missing libraries. Perhaps if we can figure our a way whereby we ship a stub for those missing libraries, which print out a warning, that would be useful. |
This is the hacky simple way of disabling chunks of code. It's not a great substitute for real modularity in being able to selectively enable/disable different components without completely breaking things, but it's better than nothing. |
I would argue that we do not need those hacks unless someone of the Julia team wants to use it. Someone who really wants to use Julia in a commercial product will need to think about deployment and making Julia GPL free is absolutely trivial in that case (thanks to the readline removal). |
There was a mailing list post where someone asked about this. |
@tknopp We can't link MKL for example. I personally want to be able to do such things and at least have the ability to distribute Julia with MKL. |
Why should we link against MKL? ccall is not linking. You can distribute a Julia version that automatically detects if MKL is available and calls it and otherwise calls a fallback. The only problem is distributing with MKL/GPL libs. |
The following files in Julia's repository are still GPL:
plus a few LGPL. |
Also, |
LGPL is fine. |
Our Windows installer? NSIS is zlib, as is the MUI2 script. (anyway, the NSIS license is irrelevant to the generated installer license) |
It is not relevant if there are parts in the repository that are GPL. The only thing that counts is what is statically and dynamically linked into the |
Those are dependencies, not files checked into the repo. I think you're right about not distributing the perf test files but would have to double-check. The mac app script is really short, if we ever want to distribute non-GPL OSX binaries we probably need to spec it out and have someone clean-room recreate it. |
Disable Rmath, FFTW, and SuiteSparse builds if USE_GPL_LIBS=0
Remove inclusion of julia bindings in sysimg if USE_GPL_LIBS=0