Rmath.jl icon indicating copy to clipboard operation
Rmath.jl copied to clipboard

Check `Base.USE_GPL_LIBS` before loading GPL code

Open simsurace opened this issue 1 year ago • 5 comments

Could we check for the value of Base.USE_GPL_LIBS and only load the GPL code in this package (which seems to be all of it) when it evaluates to true? This would allow one to easily check whether a given application/package works when Julia is built without GPL libraries.

simsurace avatar May 29 '24 13:05 simsurace

Agreed. The license for this package should probably be changed to be the same as librmath (GPLv2) unless a special exception is requested/amended onto the license of librmath.

peteristhegreat avatar Sep 20 '24 15:09 peteristhegreat

Licensing clarified in b4a1bec779efe3311fac5d3d4ac9ff078983dae2

ViralBShah avatar May 27 '25 20:05 ViralBShah

@simsurace Base.USE_GPL_LIBS typically is only for the Julia distribution itself using GPL libs, since people want to build Julia without GPL libraries altogether sometimes. There are many GPL packages that you can use even if Julia itself was built without GPL dependencies, and those dependencies (mainly SuiteSparse) may be moved out of Julia in a future release.

I don't think it would be a good idea to make this package loading conditional on Base.USE_GPL_LIBS. If we want license wise restrictions (like never use GPL packages in this environment), that mechanism probably needs to be in Pkg.jl or something.

ViralBShah avatar May 27 '25 20:05 ViralBShah

Other packages such as LinearSolve actually use Base.USE_GPL_LIBS to disable functionality that requires GPL code: https://github.com/search?q=repo%3ASciML%2FLinearSolve.jl%20USE_GPL_LIBS&type=code

devmotion avatar Oct 20 '25 12:10 devmotion

Yes this is becoming more widely used and we don’t yet have a more general mechanism.

ViralBShah avatar Oct 20 '25 12:10 ViralBShah