jump-dev / GLPK.jl

A Julia interface to the GNU Linear Programming Kit
https://www.gnu.org/software/glpk
Other
102 stars 37 forks source link

Failed to precompile GLPK #141

Closed jakewilliami closed 4 years ago

jakewilliami commented 4 years ago

My GLPK installation is not precompiling. Version:

(@v1.4) pkg> status GLPK
Status `~/.julia/environments/v1.4/Project.toml`
  [60bf3e95] GLPK v0.13.0

on macOS.

julia> using GLPK
[ Info: Precompiling GLPK [60bf3e95-4087-53dc-ae20-288a0d20c6a6]
ERROR: LoadError: LoadError: InitError: could not load library "/Users/jakeireland/.julia/artifacts/3677b4b693751024a0923d9e7c6d56da89f15b8e/lib/libgmpxx.4.dylib"
dlopen(/Users/jakeireland/.julia/artifacts/3677b4b693751024a0923d9e7c6d56da89f15b8e/lib/libgmpxx.4.dylib, 1): Library not loaded: @rpath/libgmp.10.dylib
  Referenced from: /Users/jakeireland/.julia/artifacts/3677b4b693751024a0923d9e7c6d56da89f15b8e/lib/libgmpxx.4.dylib
  Reason: Incompatible library version: libgmpxx.4.dylib requires version 15.0.0 or later, but libgmp.dylib provides version 14.0.0
Stacktrace:
 [1] dlopen(::String, ::UInt32; throw_error::Bool) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.4/Libdl/src/Libdl.jl:109
 [2] dlopen at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.4/Libdl/src/Libdl.jl:109 [inlined] (repeats 2 times)
 [3] __init__() at /Users/jakeireland/.julia/packages/GMP_jll/RM3EG/src/wrappers/x86_64-apple-darwin14-cxx11.jl:59
 [4] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:697
 [5] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:781
 [6] _require(::Base.PkgId) at ./loading.jl:1006
 [7] require(::Base.PkgId) at ./loading.jl:927
 [8] require(::Module, ::Symbol) at ./loading.jl:922
 [9] include(::Module, ::String) at ./Base.jl:377
 [10] include(::String) at /Users/jakeireland/.julia/packages/GLPK_jll/HyHuj/src/GLPK_jll.jl:1
 [11] top-level scope at /Users/jakeireland/.julia/packages/GLPK_jll/HyHuj/src/GLPK_jll.jl:50
 [12] include(::Module, ::String) at ./Base.jl:377
 [13] top-level scope at none:2
 [14] eval at ./boot.jl:331 [inlined]
 [15] eval(::Expr) at ./client.jl:449
 [16] top-level scope at ./none:3
during initialization of module GMP_jll
in expression starting at /Users/jakeireland/.julia/packages/GLPK_jll/HyHuj/src/wrappers/x86_64-apple-darwin14.jl:4
in expression starting at /Users/jakeireland/.julia/packages/GLPK_jll/HyHuj/src/GLPK_jll.jl:43
ERROR: LoadError: Failed to precompile GLPK_jll [e8aa6df9-e6ca-548a-97ff-1f85fc5b8b98] to /Users/jakeireland/.julia/compiled/v1.4/GLPK_jll/Twipq_aKFMV.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
 [3] _require(::Base.PkgId) at ./loading.jl:1029
 [4] require(::Base.PkgId) at ./loading.jl:927
 [5] require(::Module, ::Symbol) at ./loading.jl:922
 [6] top-level scope at /Users/jakeireland/.julia/packages/GLPK/oTTtu/src/GLPK.jl:200
 [7] include(::Module, ::String) at ./Base.jl:377
 [8] top-level scope at none:2
 [9] eval at ./boot.jl:331 [inlined]
 [10] eval(::Expr) at ./client.jl:449
 [11] top-level scope at ./none:3
in expression starting at /Users/jakeireland/.julia/packages/GLPK/oTTtu/src/GLPK.jl:193
ERROR: Failed to precompile GLPK [60bf3e95-4087-53dc-ae20-288a0d20c6a6] to /Users/jakeireland/.julia/compiled/v1.4/GLPK/r6CoY_aKFMV.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
 [3] _require(::Base.PkgId) at ./loading.jl:1029
 [4] require(::Base.PkgId) at ./loading.jl:927
 [5] require(::Module, ::Symbol) at ./loading.jl:922
odow commented 4 years ago

Please run ] up first. If that doesn't work, can you show the result of ] st.

This problem was fixed, and it works on my machine (also Mac), so looks like something is out-of-sync on your end.

jakewilliami commented 4 years ago

After ] up it still didn't work, so here is the output of ] st:

(@v1.4) pkg> st
Status `~/.julia/environments/v1.4/Project.toml`
  [c7932e45] AstroLib v0.4.0
  [c52e3926] Atom v0.12.15
  [6e4b80f9] BenchmarkTools v0.5.0
  [a134a8b2] BlackBoxOptim v0.5.0
  [49dc2e85] Calculus v0.5.1
  [a2e0e22d] CalculusWithJulia v0.0.1
  [73d28a3a] CombOpt v0.2.1 #master (https://github.com/dileep-kishore/CombOpt.jl)
  [861a8166] Combinatorics v1.0.2
  [a81c6b42] Compose v0.8.2
  [0c46a032] DifferentialEquations v6.14.0
  [f6369f11] ForwardDiff v0.10.10
  [60bf3e95] GLPK v0.13.0
  [c91e804a] Gadfly v1.3.0
  [4d00f742] GeometryTypes v0.8.3
  [c27321d9] Glob v1.3.0
  [2e9cd046] Gurobi v0.8.1
  [95701278] ImplicitEquations v0.6.0
  [4858937d] InfiniteArrays v0.7.2
  [d1acc4aa] IntervalArithmetic v0.16.7
  [138f1668] IntervalConstraintProgramming v0.12.1
  [d2bf35a9] IntervalRootFinding v0.5.3
  [e24f45a5] InverseLaplace v0.3.2 #master (https://github.com//jlapeyre/InverseLaplace.jl)
  [b6b21f68] Ipopt v0.6.2
  [42fd0dbc] IterativeSolvers v0.8.4
  [4076af6c] JuMP v0.21.2
  [23fbe1c1] Latexify v0.13.5
  [2f5eb75a] LightGraphsFlows v0.4.1
  [d4b2101a] Lint v0.0.0 #master (https://github.com/tonyhffong/Lint.jl)
  [1914dd2f] MacroTools v0.5.5
  [ee78f7c6] Makie v0.10.0
  [7eb4fadd] Match v1.1.0
  [d41bc354] NLSolversBase v7.6.1
  [2774e3e8] NLsolve v4.4.0
  [872cf16e] NaturallyUnitful v0.3.0
  [47be7bcc] ORCA v0.4.0
  [458c3c95] OpenSSL_jll v1.1.1+2
  [429524aa] Optim v0.20.1
  [4d0d745f] PDFIO v0.1.7
  [9b87118b] PackageCompiler v1.1.1
  [5ad8b20f] PhysicalConstants v0.2.1
  [f0f68f2c] PlotlyJS v0.13.1
  [91a5bcdd] Plots v0.29.9
  [d42e8734] PlusMinus v1.0.0 #master (https://github.com/tbeason/PlusMinus.jl)
  [438e738f] PyCall v1.91.4
  [d330b81b] PyPlot v2.9.0
  [c5292f4c] ResumableFunctions v0.5.1
  [f2b01f46] Roots v0.8.4
  [af85af4c] RowEchelon v0.1.1
  [276daf66] SpecialFunctions v0.10.3
  [123dc426] SymEngine v0.8.2
  [24249f21] SymPy v1.0.7
  [a906b1d5] Symata v0.4.8
  [d1185830] SymbolicUtils v0.4.0
  [afbbf031] TypedPolynomials v0.2.7
  [1986cc42] Unitful v1.2.1
  [d621b6e3] ValidatedNumerics v0.11.0
  [83775a58] Zlib_jll v1.2.11+10
  [37e2e46d] LinearAlgebra
  [9a3f8284] Random
odow commented 4 years ago

What happens with the following?

] add GMP_jll@6.1

You have some weird things, like JuMP not updating to the latest version (0.21.3, not 0.21.2). Some packages are holding you back.

You should take a look at Pkg environments: https://julialang.github.io/Pkg.jl/stable/environments/, and only add the packages you need in each environment. This helps avoid dependency hell.

jakewilliami commented 4 years ago

Ohh, it seems I have a dirty registry:

(@v1.4) pkg> add GMP_jll@6.1
   Updating registry at `~/.julia/registries/General`
┌ Warning: Some registries failed to update:
│     — `~/.julia/registries/General` — registry dirty
└ @ Pkg.Types /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Types.jl:1131
  Resolving package versions...
   Updating `~/.julia/environments/v1.4/Project.toml`
  [781609d7] + GMP_jll v6.1.2+5
   Updating `~/.julia/environments/v1.4/Manifest.toml`
  [781609d7] ↓ GMP_jll v6.2.0+0 ⇒ v6.1.2+5

Someone on the Julia slack channel showed me about the Pkg environments, and now I use them—they are excellent.

odow commented 4 years ago

Weird. Glad you got it sorted. Yes, environments solve everything.

Closing because this is not a bug in GLPK.jl.