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

LoadError: invalid subtyping in definition of JuMPArray - julia-v0.6.2 #1154

Closed
mandarup opened this issue Dec 29, 2017 · 8 comments
Closed

Comments

@mandarup
Copy link

JuMP fails to load on julia-v0.6.2

  • OS: linux(ubuntu)
julia> using JuMP


WARNING: deprecated syntax "abstract AbstractModel" at ~/.julia/v0.6/JuMP/src/JuMP.jl:70.
Use "abstract type AbstractModel end" instead.

WARNING: deprecated syntax "abstract AbstractConstraint" at ~/.julia/v0.6/JuMP/src/JuMP.jl:321.
Use "abstract type AbstractConstraint end" instead.

WARNING: deprecated syntax "abstract AbstractJuMPScalar" at ~/.julia/v0.6/JuMP/src/JuMP.jl:324.
Use "abstract type AbstractJuMPScalar end" instead.

WARNING: deprecated syntax "typealias LinConstrRef ConstraintRef{Model,LinearConstraint}" at ~/.julia/v0.6/JuMP/src/JuMP.jl:539.
Use "const LinConstrRef = ConstraintRef{Model,LinearConstraint}" instead.

WARNING: deprecated syntax "typealias JuMPTypes Union{AbstractJuMPScalar,NonlinearExpression,Norm,GenericAffExpr,QuadExpr,SOCExpr}" at ~/.julia/v0.6/JuMP/src/JuMP.jl:752.
Use "const JuMPTypes = Union{AbstractJuMPScalar,NonlinearExpression,Norm,GenericAffExpr,QuadExpr,SOCExpr}" instead.

WARNING: deprecated syntax "typealias JuMPScalars Union{Number,JuMPTypes}" at ~/.julia/v0.6/JuMP/src/JuMP.jl:753.
Use "const JuMPScalars = Union{Number,JuMPTypes}" instead.
INFO: Precompiling module JuMP.

WARNING: deprecated syntax "abstract AbstractModel" at ~/.julia/v0.6/JuMP/src/JuMP.jl:70.
Use "abstract type AbstractModel end" instead.

WARNING: deprecated syntax "abstract AbstractConstraint" at ~/.julia/v0.6/JuMP/src/JuMP.jl:321.
Use "abstract type AbstractConstraint end" instead.

WARNING: deprecated syntax "abstract AbstractJuMPScalar" at ~/.julia/v0.6/JuMP/src/JuMP.jl:324.
Use "abstract type AbstractJuMPScalar end" instead.

WARNING: deprecated syntax "typealias LinConstrRef ConstraintRef{Model,LinearConstraint}" at ~/.julia/v0.6/JuMP/src/JuMP.jl:539.
Use "const LinConstrRef = ConstraintRef{Model,LinearConstraint}" instead.

WARNING: deprecated syntax "typealias JuMPTypes Union{AbstractJuMPScalar,NonlinearExpression,Norm,GenericAffExpr,QuadExpr,SOCExpr}" at ~/.julia/v0.6/JuMP/src/JuMP.jl:752.
Use "const JuMPTypes = Union{AbstractJuMPScalar,NonlinearExpression,Norm,GenericAffExpr,QuadExpr,SOCExpr}" instead.

WARNING: deprecated syntax "typealias JuMPScalars Union{Number,JuMPTypes}" at ~/.julia/v0.6/JuMP/src/JuMP.jl:753.
Use "const JuMPScalars = Union{Number,JuMPTypes}" instead.
WARNING: Method definition sqrt(ForwardDiff.Dual{N, T} where T<:Real) in module ForwardDiff at ~/.julia/v0.6/ForwardDiff/src/dual.jl:281 overwritten at ~/.julia/v0.6/ForwardDiff/src/dual.jl:311.
WARNING: Method definition exp(ForwardDiff.Dual{N, T} where T<:Real) in module ForwardDiff at ~/.julia/v0.6/ForwardDiff/src/dual.jl:281 overwritten at ~/.julia/v0.6/ForwardDiff/src/dual.jl:306.

WARNING: deprecated syntax "abstract JuMPContainer{T,N}" at ~/.julia/v0.6/JuMP/src/JuMPContainer.jl:10.
Use "abstract type JuMPContainer{T,N} end" instead.
ERROR: LoadError: LoadError: LoadError: invalid subtyping in definition of JuMPArray
Stacktrace:
 [1] include_from_node1(::String) at ./loading.jl:576
 [2] include(::String) at ./sysimg.jl:14
 [3] include_from_node1(::String) at ./loading.jl:576
 [4] include(::String) at ./sysimg.jl:14
 [5] include_from_node1(::String) at ./loading.jl:576
 [6] include(::String) at ./sysimg.jl:14
 [7] anonymous at ./<missing>:2
while loading ~/.julia/v0.6/JuMP/src/JuMPArray.jl, in expression starting on line 6
while loading ~/.julia/v0.6/JuMP/src/JuMPContainer.jl, in expression starting on line 11
while loading ~/.julia/v0.6/JuMP/src/JuMP.jl, in expression starting on line 63
ERROR: Failed to precompile JuMP to ~/.julia/lib/v0.6/JuMP.ji.
Stacktrace:
 [1] compilecache(::String) at ./loading.jl:710
 [2] _require(::Symbol) at ./loading.jl:497
 [3] require(::Symbol) at ./loading.jl:405
@joehuchette
Copy link
Contributor

Which version of JuMP? (Pkg.status())

@mandarup
Copy link
Author

mandarup commented Dec 30, 2017

JuMP-v0.14.2
I see that release version is at 0.18 , but Pkg.update() does not do anything

@joehuchette
Copy link
Contributor

v0.14.2 is very old, intended to work with julia v0.4. Is your version "dirty" (i.e. you've made local changes; it would show in the output of Pkg.status). You can try Pkg.free("JuMP") as well.

@mandarup
Copy link
Author

mandarup commented Dec 30, 2017

Well, I downloaded julia binary from julia website, and JuMP came with it, so I don't know how it could be dirty.

I tried to clone latest package version as per https://groups.google.com/d/msg/julia-users/weuldy7w7Ew/MnYR6nQM_ngJ, but that gives:

julia>Pkg.rm("JuMP")
INFO: Removing JuMP (unregistered)

julia> Pkg.clone("https://github.com/JuliaOpt/JuMP.jl.git")
INFO: Cloning JuMP from https://github.com/JuliaOpt/JuMP.jl.git
INFO: Computing changes...
ERROR: JuMPeR can't be installed because it has no versions that support 0.6.2 of julia. You may need to update METADATA by running `Pkg.update()`
Stacktrace:
 [1] resolve(::Dict{String,Base.Pkg.Types.VersionSet}, ::Dict{String,Dict{VersionNumber,Base.Pkg.Types.Available}}, ::Dict{String,Tuple{VersionNumber,Bool}}, ::Dict{String,Base.Pkg.Types.Fixed}, ::Dict{String,VersionNumber}, ::Set{String}) at ./pkg/entry.jl:486
 [2] resolve(::Dict{String,Base.Pkg.Types.VersionSet}, ::Dict{String,Dict{VersionNumber,Base.Pkg.Types.Available}}, ::Dict{String,Tuple{VersionNumber,Bool}}, ::Dict{String,Base.Pkg.Types.Fixed}) at ./pkg/entry.jl:479
 [3] edit(::Function, ::SubString{String}) at ./pkg/entry.jl:30
 [4] clone(::String, ::SubString{String}) at ./pkg/entry.jl:203
 [5] (::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{String}})() at ./pkg/dir.jl:36
 [6] cd(::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{String}}, ::String) at ./file.jl:70
 [7] #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{String,N} where N) at ./pkg/dir.jl:36
 [8] clone(::String) at ./pkg/pkg.jl:169

@mandarup
Copy link
Author

also, Pkg.free("JuMP") leads to:


julia> Pkg.free("JuMP")
INFO: Freeing JuMP
INFO: Downgrading JuMP: v0.18.0 => v0.14.2

@joehuchette
Copy link
Contributor

? I don't know why JuMP would come preinstalled. Can you post the entire output from Pkg.status()

@mandarup
Copy link
Author

julia> Pkg.status()
9 required packages:
 - Atom                          0.6.6
 - CSV                           0.1.5
 - Cbc                           0.3.2
 - Clp                           0.3.1
 - IJulia                        1.6.2
 - Ipopt                         0.2.6
 - JuMPeR                        0.5.0
 - MLDataUtils                   0.2.0
 - TensorFlow                    0.7.5
71 additional packages:
 - ASTInterpreter2               0.1.1
 - AutoHashEquals                0.2.0
 - BinDeps                       0.8.2
 - Blink                         0.5.4
 - Blosc                         0.3.0
 - Calculus                      0.2.2
 - CategoricalArrays             0.1.6
 - CodeTools                     0.4.7
 - Codecs                        0.4.0
 - Compat                        0.41.0
 - Conda                         0.7.1
 - DataArrays                    0.6.2
 - DataFrames                    0.10.1
 - DataStreams                   0.1.3
 - DataStructures                0.7.3
 - DebuggerFramework             0.1.2
 - DiffBase                      0.2.0
 - Distances                     0.5.0
 - Distributions                 0.15.0
 - DocSeeker                     0.1.0
 - FileIO                        0.6.1
 - ForwardDiff                   0.2.5
 - GZip                          0.3.0
 - HDF5                          0.8.8
 - Hiccup                        0.1.1
 - HttpCommon                    0.3.0
 - HttpParser                    0.3.0
 - HttpServer                    0.2.0
 - IterTools                     0.2.0
 - JLD                           0.8.3
 - JSON                          0.16.3
 - JuMP                          0.14.2
 - Juno                          0.3.2
 - LNR                           0.0.2
 - Lazy                          0.12.0
 - LearnBase                     0.1.6
 - LegacyStrings                 0.3.0
 - MLDataPattern                 0.3.0
 - MLLabelUtils                  0.2.0
 - MNIST                         0.0.2
 - MacroTools                    0.4.0
 - MappedArrays                  0.0.7
 - MathProgBase                  0.5.10
 - MbedTLS                       0.5.2
 - Media                         0.3.0
 - Mustache                      0.3.0
 - Mux                           0.2.3
 - NaNMath                       0.3.0
 - NullableArrays                0.1.2
 - Nullables                     0.0.2
 - PDMats                        0.8.0
 - ProtoBuf                      0.4.0
 - PyCall                        1.15.0
 - QuadGK                        0.2.0
 - Reexport                      0.0.3
 - Requires                      0.4.3
 - ReverseDiffSparse             0.5.8
 - Rmath                         0.3.1
 - SHA                           0.5.2
 - ShowItLikeYouBuildIt          0.2.0
 - SortingAlgorithms             0.2.0
 - SpecialFunctions              0.3.6
 - StatsBase                     0.19.4
 - StatsFuns                     0.5.0
 - StringDistances               0.2.0
 - TakingBroadcastSeriously      0.1.1
 - Tokenize                      0.4.2
 - URIParser                     0.3.0
 - WeakRefStrings                0.2.0
 - WebSockets                    0.4.0
 - ZMQ                           0.5.1

@joehuchette
Copy link
Contributor

I believe the problem is with JuMPeR (ref IainNZ/JuMPeR.jl#78), which doesn't support newer version of JuMP. You can try Pkg.checkout("JuMPeR") and Pkg.update(), but I can't guarantee that will work.

Closing since this ins't a JuMP issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants