oscar-system / Oscar.jl

A comprehensive open source computer algebra system for computations in algebra, geometry, and number theory.
https://www.oscar-system.org
Other
345 stars 126 forks source link

Precompilation Error: Method definition number_of_generator in module AbstractAlgebra overwritten by Oscar #3576

Closed jo-ap closed 7 months ago

jo-ap commented 7 months ago

Description Updating Oscar gave me the following error upon attempting to precompile:

[ Info: Precompiling Oscar [f1435218-dba5-11e9-1e4d-f1a5fab5fc13]
WARNING: Method definition number_of_generators(AbstractAlgebra.PolyRing{T} where T) in module AbstractAlgebra at /home/johannes/.julia/packages/AbstractAlgebra/wyb3a/src/Poly.jl:201 overwritten in module Oscar at /home/johannes/.julia/packages/Oscar/59YCS/src/Rings/mpoly-affine-algebras.jl:241.
ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.

I can still load Oscar, but it now it has to be compiled every time a new session is started (as expected). My guess is that this is related to type piracy, see e.g. https://github.com/JuliaLang/julia/issues/52213 and https://discourse.julialang.org/t/what-is-incremental-compilation-and-what-does-it-mean-for-it-to-be-broken/100956/9

Reproduction On another machine (same version of julia and Oscar) precompilation worked, but AbstractAlgebra was still at version 0.40.1 instead of 0.40.7. I confirmed that updating caused the error to occur there as well, so I guess this is due to changes in AbstractAlgebra along the way.

System information

julia> Oscar.versioninfo(full=true)
OSCAR version 1.0.0
  combining:
    AbstractAlgebra.jl   v0.40.7
    GAP.jl               v0.10.3
    Hecke.jl             v0.30.7
    Nemo.jl              v0.43.2
    Polymake.jl          v0.11.15
    Singular.jl          v0.22.6
  building on:
    Antic_jll               v0.201.500+0
    Arb_jll                 v200.2300.0+0
    Calcium_jll             v0.401.100+0
    FLINT_jll               v200.900.9+0
    GAP_jll                 v400.1200.200+9
    Singular_jll            v403.216.1602+0
    libpolymake_julia_jll   v0.11.4+0
    libsingular_julia_jll   v0.44.2+0
    polymake_jll            v400.1100.1+0
See `]st -m` for a full list of dependencies.

Julia Version 1.10.2
Commit bd47eca2c8a (2024-03-01 10:14 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 4 × Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)
Official https://julialang.org/ release
thofma commented 7 months ago

Will be fixed by #3574

lgoettgens commented 7 months ago

Should be resolved by the new 1.0.1 release