RoboticExplorationLab/Algames.jl

Algames failed to precompile

Closed this issue · 1 comments

I am trying to add Algames pkg to Julia and there is precompilation error. I have observed that when I run "add Algames", the existing Altro pkg is changing from v0.4.0 to v0.3.0, RobotZoo is changing from v0.2.3 to v0.1.3, and TrajectoryOptimization is changing from v0.5.0 to 0.4.2. And then Altro, TrajOptPlots and Algames are failing to precompile. The error flag is as follows:

ERROR: The following 2 direct dependencies failed to precompile:

Algames [4a64a370-b39e-4988-9b44-fc3fb6d78c25]

Failed to precompile Algames [4a64a370-b39e-4988-9b44-fc3fb6d78c25] to /home/iconlab/.julia/compiled/v1.6/Algames/jl_CSXCSO.
ERROR: LoadError: UndefVarError: QuadraticObjective not defined
Stacktrace:
[1] include
@ ./Base.jl:386 [inlined]
[2] 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, UInt64}}, source::String)
@ Base ./loading.jl:1235
[3] top-level scope
@ none:1
[4] eval
@ ./boot.jl:360 [inlined]
[5] eval(x::Expr)
@ Base.MainInclude ./client.jl:446
[6] top-level scope
@ none:1
in expression starting at /home/iconlab/.julia/packages/Altro/ZbP1c/src/Altro.jl:1
ERROR: LoadError: Failed to precompile Altro [5dcf52e5-e2fb-48e0-b826-96f46d2e3e73] to /home/iconlab/.julia/compiled/v1.6/Altro/jl_S5kxQ0.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IOContext{Base.PipeEndpoint}, internal_stdout::IOContext{IOStream}, ignore_loaded_modules::Bool)
@ Base ./loading.jl:1385
[3] compilecache(pkg::Base.PkgId, path::String)
@ Base ./loading.jl:1329
[4] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1043
[5] require(uuidkey::Base.PkgId)
@ Base ./loading.jl:936
[6] require(into::Module, mod::Symbol)
@ Base ./loading.jl:923
[7] include
@ ./Base.jl:386 [inlined]
[8] 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, UInt64}}, source::Nothing)
@ Base ./loading.jl:1235
[9] top-level scope
@ none:1
[10] eval
@ ./boot.jl:360 [inlined]
[11] eval(x::Expr)
@ Base.MainInclude ./client.jl:446
[12] top-level scope
@ none:1
in expression starting at /home/iconlab/.julia/packages/Algames/HKoX6/src/Algames.jl:1

Altro [5dcf52e5-e2fb-48e0-b826-96f46d2e3e73]

Failed to precompile Altro [5dcf52e5-e2fb-48e0-b826-96f46d2e3e73] to /home/iconlab/.julia/compiled/v1.6/Altro/jl_jE0Flc.
ERROR: LoadError: UndefVarError: QuadraticObjective not defined
Stacktrace:
[1] include
@ ./Base.jl:386 [inlined]
[2] 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, UInt64}}, source::Nothing)
@ Base ./loading.jl:1235
[3] top-level scope
@ none:1
[4] eval
@ ./boot.jl:360 [inlined]
[5] eval(x::Expr)
@ Base.MainInclude ./client.jl:446
[6] top-level scope
@ none:1
in expression starting at /home/iconlab/.julia/packages/Altro/ZbP1c/src/Altro.jl:1

Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Types.jl:55
[2] precompile(ctx::Pkg.Types.Context; internal_call::Bool, strict::Bool, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:1265
[3] precompile
@ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:921 [inlined]
[4] #precompile#196
@ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:919 [inlined]
[5] precompile()
@ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:919
[6] top-level scope
@ REPL[3]:1

Hi Maulik
Thanks for reaching out! If I understand correctly you are trying to add Algames to a julia project that was already using Altro and and TrajOptPlots. I think that because of the dependencies of Algames, this forced the Altro and other packaes to be downgraded to older versions.
In any case this should be a big issue, if you just want to work with Algames I'd try to create a clean project. In your Julia REPL:
]generate AlgamesProject
]activate AlgamesProject
'] add Algames'
Where ']' means that you work in the package manager. I've just tried this, it should work for you too

If you want to work with Algames and Altro, I'd remove all packages that are breaking, delete the Manifest.toml file, then add the packages back and use
] instantiate and ]resolve

Please tell me if you need more help on this! I am happy to help,
Best