Tims
Tims

Reputation: 651

KNITRO.jl fails to load on Julia 1.0

Adding and building KNITRO.jl on 1.0 seems to work, but when running using I get an error.

(v1.0) pkg> add KNITRO

 Resolving package versions...
  Updating `~/.julia/environments/v1.0/Project.toml`
 [no changes]
  Updating `~/.julia/environments/v1.0/Manifest.toml`
 [no changes]

(v1.0) pkg> build KNITRO

julia> using KNITRO

[ Info: Precompiling KNITRO [67920dd8-b58e-52a8-8622-53c4cffbe346]
ERROR: LoadError: syntax: extra token "KnitroProblem" after end of expression
Stacktrace:
 [1] include at ./boot.jl:317 [inlined]
 [2] include_relative(::Module, ::String) at ./loading.jl:1038
 [3] include(::Module, ::String) at ./sysimg.jl:29
 [4] top-level scope at none:2
 [5] eval at ./boot.jl:319 [inlined]
 [6] eval(::Expr) at ./client.jl:389
 [7] top-level scope at ./none:3

 in expression starting at 

/home/svcarpacomp/.julia/packages/KNITRO/Zou9S/src/KNITRO.jl:37
ERROR: Failed to precompile KNITRO [67920dd8-b58e-52a8-8622-53c4cffbe346] to /home/svcarpacomp/.julia/compiled/v1.0/KNITRO/9GHjY.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] macro expansion at ./logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1184
 [4] _require(::Base.PkgId) at ./logging.jl:311
 [5] require(::Base.PkgId) at ./loading.jl:852
 [6] macro expansion at ./logging.jl:311 [inlined]
 [7] require(::Module, ::Symbol) at ./loading.jl:834

Upvotes: 1

Views: 232

Answers (1)

stillearningsomething
stillearningsomething

Reputation: 572

Assuming you're grabbing the copy on github and reading your error message, it fails at line 37 of KNITRO.jl:

type KnitroProblem

type is deprecated. It is [mutable] struct. The current version is for v0.6 apparently. If you try with v0.7 it should toss several deprecation warnings.

Upvotes: 1

Related Questions