jump-dev / Ipopt.jl

A Julia interface to the Ipopt nonlinear solver
https://github.com/coin-or/ipopt
Other
149 stars 58 forks source link

Cannot be installed properly on Alpine Linux which is a MUSL based distro #402

Closed DoctorDro closed 5 months ago

DoctorDro commented 5 months ago

Dear all, trying to install PowerModels and Ipopt on Latest Julia 10 under Alpine Linux failed because Ipopt cannot be installed there. Ipopt fails due to shared libraries such as libmetis.so cannot be loaded.

ERROR: LoadError: InitError: could not load library "/home/Dr2Dr/.julia/artifacts/056dc52f41656651083a0a7a46b9d87e9ada7ff9/lib/libcmumps.so"
Error loading shared library libmetis.so: No such file or directory (needed by /home/Dr2Dr/.julia/artifacts/056dc52f41656651083a0a7a46b9d87e9ada7ff9/lib/libcmumps.so)

Trying to create symbolic links where Ipopt expects libmetis.so revealed that other libraries such as spral dependencies could not be found due to the same reason. Then creating again symbolic links revealed that other libraries such as libipoptamplinterface.so could not be loaded and so on ...

Any ideas why that could be happening only on musl linux systems and not on any other Windows, Linux or FreeBSD?

odow commented 5 months ago

What is the output of ] st -m?

Do earlier versions of Ipopt install?

DoctorDro commented 5 months ago

Earlier versions of Ipopt do not install. My Alpine is on Windows WSL 2.

(@v1.10) pkg> status -m
Status `~/.julia/environments/v1.10/Manifest.toml`
  [14f7f29c] AMD v0.5.3
  [79e6a3ab] Adapt v4.0.1
  [4fba245c] ArrayInterface v7.7.0
  [6e4b80f9] BenchmarkTools v1.4.0
  [523fee87] CodecBzip2 v0.8.1
  [944b1d66] CodecZlib v0.7.3
  [bbf7d656] CommonSubexpressions v0.3.0
  [34da2185] Compat v4.12.0
  [187b0558] ConstructionBase v1.5.4
  [864edb3b] DataStructures v0.18.16
  [163ba53b] DiffResults v1.1.0
  [b552c78f] DiffRules v1.15.1
  [b4f34e82] Distances v0.10.11
  [ffbed154] DocStringExtensions v0.9.3
  [e2ba6199] ExprTools v0.1.10
  [9aa1b823] FastClosures v0.3.2
  [6a86dc24] FiniteDiff v2.22.0
  [f6369f11] ForwardDiff v0.10.36
  [2030c09a] InfrastructureModels v0.7.8
  [b6b21f68] Ipopt v1.6.0
  [92d709cd] IrrationalConstants v0.2.2
  [692b3bcd] JLLWrappers v1.5.0
  [682c06a0] JSON v0.21.4
  [4076af6c] JuMP v1.18.1
  [ba0b0d4f] Krylov v0.9.5
  [40e66cde] LDLFactorizations v0.10.1
  [d3d80556] LineSearches v7.2.0
  [5c8ed15e] LinearOperators v2.6.0
  [2ab3a3ac] LogExpFunctions v0.3.26
  [1914dd2f] MacroTools v0.5.13
  [b8f27783] MathOptInterface v1.25.2
  [f28f55f0] Memento v1.4.1
  [d8a4904e] MutableArithmetics v1.4.0
  [d41bc354] NLSolversBase v7.8.3
  [2774e3e8] NLsolve v4.5.1
  [77ba4419] NaNMath v1.0.2
  [bac558e1] OrderedCollections v1.6.3
  [d96e819e] Parameters v0.12.3
  [69de0a69] Parsers v2.8.1
  [c36e90e8] PowerModels v0.21.0
  [aea7be01] PrecompileTools v1.2.0
  [21216c6a] Preferences v1.4.1
  [10f199a5] QPSReader v0.2.1
  [189a3867] Reexport v1.2.2
  [ae029012] Requires v1.3.0
  [efcf1570] Setfield v1.1.1
  [276daf66] SpecialFunctions v2.3.1
  [1e83bf80] StaticArraysCore v1.4.2
  [82ae8749] StatsAPI v1.7.0
  [a759f4b9] TimerOutputs v0.5.23
  [3bb67fe8] TranscodingStreams v0.10.2
  [6dd1b50a] Tulip v0.9.6
  [3a884ed6] UnPack v1.0.2
  [ae81ac8f] ASL_jll v0.1.3+0
  [6e34b625] Bzip2_jll v1.0.8+1
  [e33a78d0] Hwloc_jll v2.10.0+0
  [9cc047cb] Ipopt_jll v300.1400.1303+0
  [d00139f3] METIS_jll v5.1.2+0
  [d7ed1dd3] MUMPS_seq_jll v500.600.200+0
⌅ [656ef2d0] OpenBLAS32_jll v0.3.24+0
  [efe28fd5] OpenSpecFun_jll v0.5.5+0
⌅ [319450e9] SPRAL_jll v2023.11.15+0
  [0dad84c5] ArgTools v1.1.1
  [56f22d72] Artifacts
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [8ba89e20] Distributed
  [f43a241f] Downloads v1.6.0
  [7b1f6079] FileWatching
  [9fa8497b] Future
  [b77e0a4c] InteractiveUtils
  [b27032c2] LibCURL v0.6.4
  [76f85450] LibGit2
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [ca575930] NetworkOptions v1.2.0
  [44cfe95a] Pkg v1.10.0
  [de0858da] Printf
  [9abbd945] Profile
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA v0.7.0
  [9e88b42a] Serialization
  [6462fe0b] Sockets
  [2f01184e] SparseArrays v1.10.0
  [10745b16] Statistics v1.10.0
  [4607b0f0] SuiteSparse
  [fa267f1f] TOML v1.0.3
  [a4e569a6] Tar v1.10.0
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode
  [e66e0078] CompilerSupportLibraries_jll v1.0.5+1
  [deac9b47] LibCURL_jll v8.4.0+0
  [e37daf67] LibGit2_jll v1.6.4+0
  [29816b5a] LibSSH2_jll v1.11.0+1
  [c8ffd9c3] MbedTLS_jll v2.28.2+1
  [14a3606d] MozillaCACerts_jll v2023.1.10
  [4536629a] OpenBLAS_jll v0.3.23+2
  [05823500] OpenLibm_jll v0.8.1+2
  [bea87d4a] SuiteSparse_jll v7.2.1+1
  [83775a58] Zlib_jll v1.2.13+1
  [8e850b90] libblastrampoline_jll v5.8.0+1
  [8e850ede] nghttp2_jll v1.52.0+1
  [3f19e933] p7zip_jll v17.4.0+2
odow commented 5 months ago

Earlier versions of Ipopt do not install

But the 1.5.1 version installed in https://github.com/jump-dev/Ipopt.jl/issues/403?

What is versioninfo()? How did you install Julia?

odow commented 5 months ago

Does it work on Julia 1.9 or earlier?

DoctorDro commented 5 months ago

I have the latest Julia. Julia is installed downloading the associated tar file from its website and unpacking it. I cannot install all Julia versions and test them. I am not a maintainer I am just a user. Alpine Linux can be installed on Windows by the Microsoft Store with one click.

odow commented 5 months ago

What is versioninfo()

?

I cannot install all Julia versions and test them Alpine Linux can be installed on Windows by the Microsoft Store with one click.

I don't have a Windows machine, so I can't reproduce this. It'd be helpful if you could.

I'll also note that MUSL is Tier 2 support: https://julialang.org/downloads/

"Tier 2: Julia is guaranteed to build from source using the default build options, but may or may not pass all tests. Official binaries are available on a case-by-case basis."

I'll talk to some folks on slack, but I don't really have any ideas or suggestions for how to go about debugging this.

odow commented 5 months ago

Upstream issue is: https://github.com/JuliaLang/julia/issues/40556#issuecomment-825126303

The recommendation is either to not use MUSL, or to apply Julian's patch: https://github.com/JuliaLang/julia/issues/40556#issuecomment-825126303

Here's the conversation from slack for posterity: image

Closing because there doesn't seem to be anything we can do from the perspective of Ipopt.jl.