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

Precompile fails on julia 1.12 #217

Closed
NAThompson opened this issue Sep 11, 2024 · 6 comments
Closed

Precompile fails on julia 1.12 #217

NAThompson opened this issue Sep 11, 2024 · 6 comments

Comments

@NAThompson
Copy link

~ ❯❯❯ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.12.0-DEV.1158 (2024-09-04)
 _/ |\__'_|_|_|\__'_|  |  Commit bada969c14 (6 days old master)
|__/                   |

(@v1.12) pkg> add Copulas
   Resolving package versions...
  No Changes to `~/.julia/environments/v1.12/Project.toml`
  No Changes to `~/.julia/environments/v1.12/Manifest.toml`
  ✗ Copulas
  ✗ GlobalSensitivity
Precompiling packages finished.
  0 dependencies successfully precompiled in 9 seconds. 421 already precompiled.
  2 dependencies errored.
  For a report of the errors see `julia> err`. To retry use `pkg> precompile`

julia> err
PkgPrecompileError: The following 2 direct dependencies failed to precompile:

GlobalSensitivity

Failed to precompile GlobalSensitivity [af5da776-676b-467e-8baf-acd8249e4f0f] to "/Users/nathompson7/.julia/compiled/v1.12/GlobalSensitivity/jl_K6SWh2".
ERROR: LoadError: MethodError: no method matching isless(::TaylorSeries.Taylor1{Float64}, ::TaylorSeries.Taylor1{Float64})
The function `isless` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  isless(::Missing, ::Any)
   @ Base missing.jl:87
  isless(::Any, ::Missing)
   @ Base missing.jl:88
  isless(::Missing, ::Missing)
   @ Base missing.jl:86
  ...

Stacktrace:
  [1] max(x::TaylorSeries.Taylor1{Float64}, y::TaylorSeries.Taylor1{Float64})
    @ Base ./operators.jl:527
  [2] ϕ(G::Copulas.ClaytonGenerator{Float64}, t::TaylorSeries.Taylor1{Float64})
    @ Copulas ~/.julia/packages/Copulas/e7UMO/src/Generator/UnivariateGenerator/ClaytonGenerator.jl:43
  [3] ϕ⁽ᵏ⁾(G::Copulas.ClaytonGenerator{Float64}, k::Int64, t::Float64)
    @ Copulas ~/.julia/packages/Copulas/e7UMO/src/Generator.jl:40
  [4] ϕ⁽ᵏ⁾(C::Copulas.ClaytonCopula{2, Float64}, k::Int64, t::Float64)
    @ Copulas ~/.julia/packages/Copulas/e7UMO/src/ArchimedeanCopula.jl:54
  [5] _logpdf(C::Copulas.ClaytonCopula{2, Float64}, u::Vector{Float64})
    @ Copulas ~/.julia/packages/Copulas/e7UMO/src/ArchimedeanCopula.jl:76
  [6] logpdf
    @ ~/.julia/packages/Distributions/nmUhn/src/common.jl:263 [inlined]
  [7] _pdf
    @ ~/.julia/packages/Distributions/nmUhn/src/common.jl:237 [inlined]
  [8] pdf(d::Copulas.ClaytonCopula{2, Float64}, x::Vector{Float64})
    @ Distributions ~/.julia/packages/Distributions/nmUhn/src/common.jl:222
  [9] macro expansion
    @ ~/.julia/packages/Copulas/e7UMO/src/Copulas.jl:150 [inlined]
 [10] macro expansion
    @ ~/.julia/packages/PrecompileTools/L8A3n/src/workloads.jl:78 [inlined]
 [11] macro expansion
    @ ~/.julia/packages/Copulas/e7UMO/src/Copulas.jl:119 [inlined]
 [12] macro expansion
    @ ~/.julia/packages/PrecompileTools/L8A3n/src/workloads.jl:140 [inlined]
 [13] top-level scope
    @ ~/.julia/packages/Copulas/e7UMO/src/Copulas.jl:116
 [14] include
    @ ./Base.jl:582 [inlined]
 [15] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
    @ Base ./loading.jl:2796
 [16] top-level scope
    @ stdin:4
 [17] eval
    @ ./boot.jl:439 [inlined]
 [18] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2618
 [19] include_string
    @ ./loading.jl:2628 [inlined]
 [20] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:322
 [21] _start()
    @ Base ./client.jl:553
in expression starting at /Users/nathompson7/.julia/packages/Copulas/e7UMO/src/Copulas.jl:1
in expression starting at stdin:4
ERROR: LoadError: Failed to precompile Copulas [ae264745-0b69-425e-9d9d-cf662c5eec93] to "/Users/nathompson7/.julia/compiled/v1.12/Copulas/jl_Sb0wgQ".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:44
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{String, Int64})
    @ Base ./loading.jl:3065
  [3] (::Base.var"#1107#1108"{Base.PkgId})()
    @ Base ./loading.jl:2467
  [4] mkpidlock(f::Base.var"#1107#1108"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile ~/julia/usr/share/julia/stdlib/v1.12/FileWatching/src/pidfile.jl:93
  [5] #mkpidlock#6
    @ ~/julia/usr/share/julia/stdlib/v1.12/FileWatching/src/pidfile.jl:88 [inlined]
  [6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/julia/usr/share/julia/stdlib/v1.12/FileWatching/src/pidfile.jl:114
  [7] #invokelatest#2
    @ ./essentials.jl:1050 [inlined]
  [8] invokelatest
    @ ./essentials.jl:1045 [inlined]
  [9] maybe_cachefile_lock(f::Base.var"#1107#1108"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:3630
 [10] maybe_cachefile_lock
    @ ./loading.jl:3627 [inlined]
 [11] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2463
 [12] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2291
 [13] #invoke_in_world#3
    @ ./essentials.jl:1082 [inlined]
 [14] invoke_in_world
    @ ./essentials.jl:1079 [inlined]
 [15] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2278
 [16] macro expansion
    @ ./loading.jl:2217 [inlined]
 [17] macro expansion
    @ ./lock.jl:287 [inlined]
 [18] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2174
 [19] #invoke_in_world#3
    @ ./essentials.jl:1082 [inlined]
 [20] invoke_in_world
    @ ./essentials.jl:1079 [inlined]
 [21] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2167
 [22] include
    @ ./Base.jl:582 [inlined]
 [23] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base ./loading.jl:2796
 [24] top-level scope
    @ stdin:4
 [25] eval
    @ ./boot.jl:439 [inlined]
 [26] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2618
 [27] include_string
    @ ./loading.jl:2628 [inlined]
 [28] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:322
 [29] _start()
    @ Base ./client.jl:553
in expression starting at /Users/nathompson7/.julia/packages/GlobalSensitivity/fxoe7/src/GlobalSensitivity.jl:1
in expression starting at stdin:4
Copulas

Failed to precompile Copulas [ae264745-0b69-425e-9d9d-cf662c5eec93] to "/Users/nathompson7/.julia/compiled/v1.12/Copulas/jl_ZvDqOr".
ERROR: LoadError: MethodError: no method matching isless(::TaylorSeries.Taylor1{Float64}, ::TaylorSeries.Taylor1{Float64})
The function `isless` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  isless(::Missing, ::Any)
   @ Base missing.jl:87
  isless(::Any, ::Missing)
   @ Base missing.jl:88
  isless(::Missing, ::Missing)
   @ Base missing.jl:86
  ...

Stacktrace:
  [1] max(x::TaylorSeries.Taylor1{Float64}, y::TaylorSeries.Taylor1{Float64})
    @ Base ./operators.jl:527
  [2] ϕ(G::Copulas.ClaytonGenerator{Float64}, t::TaylorSeries.Taylor1{Float64})
    @ Copulas ~/.julia/packages/Copulas/e7UMO/src/Generator/UnivariateGenerator/ClaytonGenerator.jl:43
  [3] ϕ⁽ᵏ⁾(G::Copulas.ClaytonGenerator{Float64}, k::Int64, t::Float64)
    @ Copulas ~/.julia/packages/Copulas/e7UMO/src/Generator.jl:40
  [4] ϕ⁽ᵏ⁾(C::Copulas.ClaytonCopula{2, Float64}, k::Int64, t::Float64)
    @ Copulas ~/.julia/packages/Copulas/e7UMO/src/ArchimedeanCopula.jl:54
  [5] _logpdf(C::Copulas.ClaytonCopula{2, Float64}, u::Vector{Float64})
    @ Copulas ~/.julia/packages/Copulas/e7UMO/src/ArchimedeanCopula.jl:76
  [6] logpdf
    @ ~/.julia/packages/Distributions/nmUhn/src/common.jl:263 [inlined]
  [7] _pdf
    @ ~/.julia/packages/Distributions/nmUhn/src/common.jl:237 [inlined]
  [8] pdf(d::Copulas.ClaytonCopula{2, Float64}, x::Vector{Float64})
    @ Distributions ~/.julia/packages/Distributions/nmUhn/src/common.jl:222
  [9] macro expansion
    @ ~/.julia/packages/Copulas/e7UMO/src/Copulas.jl:150 [inlined]
 [10] macro expansion
    @ ~/.julia/packages/PrecompileTools/L8A3n/src/workloads.jl:78 [inlined]
 [11] macro expansion
    @ ~/.julia/packages/Copulas/e7UMO/src/Copulas.jl:119 [inlined]
 [12] macro expansion
    @ ~/.julia/packages/PrecompileTools/L8A3n/src/workloads.jl:140 [inlined]
 [13] top-level scope
    @ ~/.julia/packages/Copulas/e7UMO/src/Copulas.jl:116
 [14] include
    @ ./Base.jl:582 [inlined]
 [15] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base ./loading.jl:2796
 [16] top-level scope
    @ stdin:4
 [17] eval
    @ ./boot.jl:439 [inlined]
 [18] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2618
 [19] include_string
    @ ./loading.jl:2628 [inlined]
 [20] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:322
 [21] _start()
    @ Base ./client.jl:553
in expression starting at /Users/nathompson7/.julia/packages/Copulas/e7UMO/src/Copulas.jl:1
in expression starting at stdin:4
@lrnv
Copy link
Owner

lrnv commented Sep 11, 2024

Thansk for reporting :)

I am starting to think that the compat bound on TaylorSeries should be cranked up, because older versions of the package are causing issues... Might be the same reason as #207 ?

Can you show out which versions of the three packages (Copulas, GlobalSensivity and TaylorSeries) you have ? I could not parse that from the logs.

@NAThompson
Copy link
Author

NAThompson commented Sep 11, 2024

Error happens on TaylorSeries v0.13.2

(@v1.12) pkg> add Copulas
   Resolving package versions...
    Updating `~/.julia/environments/v1.12/Project.toml`
  [ae264745] + Copulas v0.1.24
    Updating `~/.julia/environments/v1.12/Manifest.toml`
  [7d9f7c33] + Accessors v0.1.37
  [861a8166] + Combinatorics v1.0.2
  [38540f10] + CommonSolve v0.2.4
  [bbf7d656] + CommonSubexpressions v0.3.1
  [a33af91c] + CompositionsBase v0.1.2
  [ae264745] + Copulas v0.1.24
  [667455a9] + Cubature v1.5.1
  [163ba53b] + DiffResults v1.1.0
  [b552c78f] + DiffRules v1.15.1
  [f6369f11] + ForwardDiff v0.10.36
  [3587e190] + InverseFunctions v0.1.16
  [37188c8d] + MvNormalCDF v0.3.2
  [f2b01f46] + Roots v2.1.8
⌅ [6aa5eb33] + TaylorSeries v0.13.2

Running up in Pkg gives me the following:

⌅ [6aa5eb33] ↑ TaylorSeries v0.13.2 ⇒ v0.17.8

Once this is done, add Copulas succeeds.

@lrnv
Copy link
Owner

lrnv commented Sep 16, 2024

Thanks for checking, you bring usefull info.

Okay, so I should probably restrict the compat bound for TaylorSeries in the next patch.

I am still not sure about what to do to older patches...


One more info: the isless feature that we need was introduced in TaylorsSeries@0.15.0, so anything before that is not working.

See #206

@lrnv
Copy link
Owner

lrnv commented Sep 20, 2024

@NAThompson I attempted a fix in the last registered version, while waiting for an hypothetical modification of the compat bounds in the registry. Would you agree to try again to see if the Copulas version is held back by the TaylorSeries one (and thus the bug remains) or if it is the other way around (and thus we are good) ?

@NAThompson
Copy link
Author

@IrNV: I've given up on 1.12 (many many other problems) but on the Julia 1.11rc3 I was able to successfully install:

(@v1.11) pkg> add Copulas
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
   Installed Roots ─── v2.2.1
   Installed Copulas ─ v0.1.25
    Updating `~/.julia/environments/v1.11/Project.toml`
  [ae264745] + Copulas v0.1.25
    Updating `~/.julia/environments/v1.11/Manifest.toml`
  [7d9f7c33] + Accessors v0.1.38
  [66dad0bd] + AliasTables v1.1.3
  [861a8166] + Combinatorics v1.0.2
  [38540f10] + CommonSolve v0.2.4
  [bbf7d656] + CommonSubexpressions v0.3.1
  [34da2185] + Compat v4.16.0
  [a33af91c] + CompositionsBase v0.1.2
  [187b0558] + ConstructionBase v1.5.8
  [ae264745] + Copulas v0.1.25
  [667455a9] + Cubature v1.5.1
  [9a962f9c] + DataAPI v1.16.0
  [864edb3b] + DataStructures v0.18.20
  [163ba53b] + DiffResults v1.1.0
  [b552c78f] + DiffRules v1.15.1
  [31c24e10] + Distributions v0.25.111
  [ffbed154] + DocStringExtensions v0.9.3
  [1a297f60] + FillArrays v1.13.0
  [f6369f11] + ForwardDiff v0.10.36
  [34004b35] + HypergeometricFunctions v0.3.24
  [18e54dd8] + IntegerMathUtils v0.1.2
  [3587e190] + InverseFunctions v0.1.16
  [92d709cd] + IrrationalConstants v0.2.2
  [2ab3a3ac] + LogExpFunctions v0.3.28
  [1914dd2f] + MacroTools v0.5.13
  [e1d29d7a] + Missings v1.2.0
  [37188c8d] + MvNormalCDF v0.3.2
  [77ba4419] + NaNMath v1.0.2
  [bac558e1] + OrderedCollections v1.6.3
  [90014a1f] + PDMats v0.11.31
  [aea7be01] + PrecompileTools v1.2.1
  [27ebfcd6] + Primes v0.5.6
  [43287f4e] + PtrArrays v1.2.1
  [1fd47b50] + QuadGK v2.11.1
  [189a3867] + Reexport v1.2.2
  [ae029012] + Requires v1.3.0
  [79098fc4] + Rmath v0.8.0
  [f2b01f46] + Roots v2.2.1
  [a2af1166] + SortingAlgorithms v1.2.1
  [276daf66] + SpecialFunctions v2.4.0
  [1e83bf80] + StaticArraysCore v1.4.3
  [10745b16] + Statistics v1.11.1
  [82ae8749] + StatsAPI v1.7.0
  [2913bbd2] + StatsBase v0.34.3
  [4c63d2b9] + StatsFuns v1.3.2
⌅ [6aa5eb33] + TaylorSeries v0.17.8
  [48feb556] + WilliamsonTransforms v0.1.5
  [7bc98958] + Cubature_jll v1.0.5+0
  [efe28fd5] + OpenSpecFun_jll v0.5.5+0
  [f50d1b31] + Rmath_jll v0.5.1+0
  [37e2e46d] + LinearAlgebra v1.11.0
  [9e88b42a] + Serialization v1.11.0
  [2f01184e] + SparseArrays v1.11.0
  [4607b0f0] + SuiteSparse
  [e66e0078] + CompilerSupportLibraries_jll v1.1.1+0
  [4536629a] + OpenBLAS_jll v0.3.27+1
  [05823500] + OpenLibm_jll v0.8.1+2
  [bea87d4a] + SuiteSparse_jll v7.7.0+0
  [8e850b90] + libblastrampoline_jll v5.11.0+0
        Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`
Precompiling project...
  26 dependencies successfully precompiled in 19 seconds. 76 already precompiled.

(@v1.11) pkg> status --outdated mm
No Matches in `~/.julia/environments/v1.11/Project.toml`

(@v1.11) pkg> status --outdated -m
Status `~/.julia/environments/v1.11/Manifest.toml`
⌅ [6aa5eb33] TaylorSeries v0.17.8 (<v0.18.1): WilliamsonTransforms

@lrnv
Copy link
Owner

lrnv commented Sep 20, 2024

@NAThompson Your last report shows that i forgot to publish a version of WilliamsonTransforms.jl with the last compat PR of TaylorSeries... I just did it RN. But it also shows that the bandage worked.

Thus, while waiting for someone to asses my registry modification i think this can still be closed. Thanks for reporting !

@lrnv lrnv closed this as completed Sep 20, 2024
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

2 participants