-
-
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
base/sparse/csparse.jl is LGPL2.1, but is included even if USE_GPL_LIBS=false #13001
Comments
|
It would probably be a good idea to get a legal opinion at some point about whether ccall usage qualifies under the linking exceptions in LGPL, and the libgit2 exception. |
@tkelman |
If it was derived from the LGPL source, I'm pretty sure that it is "tainted" by copy-left, and can not be used in Julia (unless you are willing to make open source all of your code) |
@ScottPJones We're talking about code that is written in Julia and is part of the Julia sources. Is there a sense in which that is not open source? To review the bidding: Tim Davis's book, "Direct Methods for Sparse Linear Systems", describes many of the algorithms at the heart of sparse matrix construction and manipulation. The book can be considered as documentation for the CSparse and CXSparse libraries, which are covered by LGPL. Essentially every line of code in those packages is described and explained in the book. Viral and I created Julia versions of several of these algorithms in the Neither of us can do a "clean room" implementation because we both have obviously read the book and the code. If a person who knows the algorithms but has not read the book (which is probably a rather small group) wants to re-implement from scratch, that would be great. Otherwise we are left with a file that is LGPL or we are left without most of the functionality of the SparseMatrixCSC type. |
Licensing the file as LGPL seems like the right thing to do. However since it is _L_GPL, copy-left only affects changes made to csparse.jl, not the rest of julia. Perhaps some organizations are over-sensitive though, and would want a |
My reading of LGPL 2.1 section 6 is that you must be able to modify the library and relink the work to the modified copy. At the moment, if you were to distribute a copy of Julia with modifications, I think the only way to replace csparse.jl with a modified version would be to recompile Base, so you have to distribute everything needed to recompile Base with the work (although not necessarily under LGPL). But if you bundle other packages with your modified Julia, there are no requirements for those packages, and if you embed Julia, you just need to dynamically link it and provide the source for Julia. So I think this single LGPL file does affect the licensing of all of Julia, but maybe not in a way that matters so much (all of our binary distributions include all of the Base source anyway, and we don't have facilities for obfuscating things), and the situation should be a little more relaxed if we have bundled packages (since then this can just be a separate bundled package that the user can freely swap out). |
@dmbates The problem comes in that if you have commercial code, not open source, which you need to embed in Julia, it might become tainted by the copy-left of any GPL code that is part of Julia. @JeffBezanson I don't think that's the way LGPL works. That would hold if csparse.jl were a wrapper that dynamically linked to a csparse library, however, csparse.jl is in itself a derivative work, hence the library exemption to the GPL license doesn't come into play. A @simonster Yes, If this were in a package, that people would be free to load or not, I don't think there would be a problem with it being GPL if you simply don't load it (since you don't dynamically link to Julia code, it is dynamically compiled from source, I don't think it really can be LGPL, but IANAL). |
Yes, I agree with @simonster 's reading. The purpose of the GPL/LGPL is not to encourage dynamic linking, or any particular linking technology. The FSF understands hacking, and they don't intend for it to be possible to "work around" their licenses by using a different kind of linking. So whether something is in a .so is not necessarily a valid litmus test for license compliance. In the case of the LGPL, you need to be able to modify the LGPL code and use the modified library with the (possibly proprietary) package. In julia you can load a modified csparse using |
You can always load it in a module though. |
@JeffBezanson I wasn't trying to say that GPL == LGPL in julia code, nor that LGPL was just about dynamic linking (I've just heard that's the safest way to make sure you don't get entangled in the copy-left, Stallman pretty much wants everything to be pulled into the copy-left). I much prefer the MIT license that Julia tends to use, because of it, we feel it is safe to use julia in our commercial product, and put as much as possible of things we are doing on GitHub under that same MIT license). |
Out of curiosity, where are the things you have put on Github under MIT? |
@KristofferC All of the stuff I've done (some 110 commits merged so far to JuliaLang/julia) has of course been under MIT license. I've also started doing PRs on @nolta's nice https://github.com/nolta/ICU.jl, and have done minor fixes for other packages. |
Under the topic of |
One solution would be for If loading this file from source takes too long, perhaps Julia needs some sort of fast-loading format. |
Given that LGPL only applies to the particular file, it is fine to include LGPL libraries as part of Julia, and this is compatible with the |
It's possible to make modifications to the source of |
Usually playing games with how or when something is linked has no effect on legality. |
@dmbates I might be able to help with a clean-room implementation: TL;DR My mind should be a sufficiently green field. With a little guidance, I would be happy to reimplement --- working from unencumbered literature and code --- whatever functionality exists in base/sparse/csparse.jl. Let me know. In full, in case there are subtleties I'm not aware of: Earlier this year I obtained Davis' book intending to work through it alongside the associated lectures. On hitting the second chapter I realized the potential license issues and proceeded trying to read the text without reference to the code. Given the text's nature, that effort rapidly proved hopeless and I stopped reading another few pages in. I then tried listening to the lectures also without reference to the code, but shortly arrived at the same conclusion and desisted. Instead I carried on with Stewart's pedagogical report (`Building an old-fashioned sparse solver') and the associated references which, to the best of my knowledge, are clean. |
The most widely used functions in By the way, thanks for informing us of Stewart's report. He's a good writer and a great numerical analyst. |
…se/sparse/csparse.jl ([c|f]transpose[!]) with MIT-licensed versions. See JuliaLang#13001.
…se/sparse/csparse.jl ([c|f]transpose[!]) with MIT-licensed versions. See JuliaLang#13001.
…tril!, triu!, droptol!, and dropzeros[!] with MIT-licensed versions. See JuliaLang#13001 and JuliaLang#14631.
…tril!, triu!, droptol!, and dropzeros[!] with MIT-licensed versions. See JuliaLang#13001 and JuliaLang#14631. Also add a test for dropzeros!.
…tril!, triu!, droptol!, and dropzeros[!] with MIT-licensed versions. See JuliaLang#13001 and JuliaLang#14631. Also add a test for dropzeros!.
…tril!, triu!, droptol!, and dropzeros[!] with MIT-licensed versions. See JuliaLang#13001 and JuliaLang#14631. Also add a test for dropzeros!.
…tril!, triu!, droptol!, and dropzeros[!] with MIT-licensed versions. See JuliaLang#13001 and JuliaLang#14631. Also add a test for dropzeros!.
…tril!, triu!, droptol!, and dropzeros[!] with MIT-licensed versions. See JuliaLang#13001 and JuliaLang#14631. Also add a test for dropzeros!.
…tril!, triu!, droptol!, and dropzeros[!] with MIT-licensed versions. See JuliaLang#13001 and JuliaLang#14631. Also add a test for dropzeros!.
…tril!, triu!, droptol!, and dropzeros[!] with MIT-licensed versions. See JuliaLang#13001 and JuliaLang#14631. Also add a test for dropzeros!.
…tril!, triu!, droptol!, and dropzeros[!] with MIT-licensed versions. See JuliaLang#13001 and JuliaLang#14631. Also add a test for dropzeros!.
What this means for the resulting combination, I'm not sure.
The text was updated successfully, but these errors were encountered: