# Failed to precompile Ipopt

**URL:** https://discourse.julialang.org/t/failed-to-precompile-ipopt/80758
**Category:** General Usage
**Tags:** build
**Created:** [May 9, 2022, 1:54pm UTC](https://discourse.julialang.org/t/failed-to-precompile-ipopt/80758 "2022-05-09T13:54:01Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![liuwa666](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liuwa666/32/35456_2.png) [@liuwa666](https://discourse.julialang.org/u/liuwa666)
#### Post date: [May 9, 2022, 1:54pm UTC](https://discourse.julialang.org/t/failed-to-precompile-ipopt/80758/1 "2022-05-09T13:54:01Z")

</div>

One of my project is dependent on PowerDynamics.jl, and PowerDynamics.jl is dependent on Ipopt.jl. Today when I was updating this project, the following situation occurs:

```bash
pkg> precompile
Precompiling project...
  ✗ Ipopt
  ✗ PowerDynamics
  0 dependencies successfully precompiled in 13 seconds (243 already precompiled)

ERROR: The following 1 direct dependency failed to precompile:

PowerDynamics [cc46b21f-1b17-51c2-b642-af74c3d3a8be]

Failed to precompile PowerDynamics [cc46b21f-1b17-51c2-b642-af74c3d3a8be] to C:\Users\liuwa\.julia\compiled\v1.7\PowerDynamics\jl_48B2.tmp.
ERROR: LoadError: InitError: could not load library "C:\Users\liuwa\.julia\artifacts\fff13fce0db4ed5379a0eeb73b6047a39b950e9d\bin\libipopt-3.dll"
The specified module could not be found.
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl .\libdl.jl:117
  [2] dlopen (repeats 2 times)
    @ .\libdl.jl:117 [inlined]
  [3] __init__ ()
    @ Ipopt_jll C:\Users\liuwa\.julia\packages\Ipopt_jll\ZudKO\src\wrappers\x86_64-w64-mingw32-libgfortran5-cxx11.jl:79
  [4] _include_from_serialized(path::String, depmods::Vector{Any})
    @ Base .\loading.jl:768
  [5] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base .\loading.jl:854
  [6] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1097
  [7] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:1013
  [8] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:997
  [9] top-level scope
    @ C:\Users\liuwa\.julia\packages\Ipopt\bYzBL\src\Ipopt.jl:26
 [10] include
    @ .\Base.jl:418 [inlined]
 [11] 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:1318
 [12] top-level scope
    @ none:1
 [13] eval
    @ .\boot.jl:373 [inlined]
 [14] eval(x::Expr)
    @ Base.MainInclude .\client.jl:453
 [15] top-level scope
    @ none:1
during initialization of module Ipopt_jll
in expression starting at C:\Users\liuwa\.julia\packages\Ipopt\bYzBL\src\Ipopt.jl:1
ERROR: LoadError: Failed to precompile Ipopt [b6b21f68-93f8-5de0-b562-5493be1d77c9] to C:\Users\liuwa\.julia\compiled\v1.7\Ipopt\jl_6CBF.tmp.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
    @ Base .\loading.jl:1466
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1410
  [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1120
  [5] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:1013
  [6] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:997
  [7] include(mod::Module, _path::String)
    @ Base .\Base.jl:418
  [8] include(x::String)
    @ PowerDynamics C:\Users\liuwa\.julia\packages\PowerDynamics\2NFVY\src\PowerDynamics.jl:4
  [9] top-level scope
    @ C:\Users\liuwa\.julia\packages\PowerDynamics\2NFVY\src\PowerDynamics.jl:62
 [10] include
    @ .\Base.jl:418 [inlined]
 [11] 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:1318
 [12] top-level scope
    @ none:1
 [13] eval
    @ .\boot.jl:373 [inlined]
 [14] eval(x::Expr)
    @ Base.MainInclude .\client.jl:453
 [15] top-level scope
    @ none:1
in expression starting at C:\Users\liuwa\.julia\packages\PowerDynamics\2NFVY\src\operationpoint\power_flow.jl:1
in expression starting at C:\Users\liuwa\.julia\packages\PowerDynamics\2NFVY\src\PowerDynamics.jl:4

```

I had deleted “/.julia”, then had uninstalled and reinstalled the julia, and precompiled the project again. But this error still happened. My system info is:

```bash
julia> versioninfo()
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: AMD Ryzen 9 5900HX with Radeon Graphics
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, znver3)

```

Please help me, thanks very much

---

<div class="post-metadata">

### Author: ![liuwa666](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liuwa666/32/35456_2.png) [@liuwa666](https://discourse.julialang.org/u/liuwa666)
#### Post date: [May 9, 2022, 2:46pm UTC](https://discourse.julialang.org/t/failed-to-precompile-ipopt/80758/2 "2022-05-09T14:46:06Z")

</div>

![image](https://global.discourse-cdn.com/julialang/original/3X/9/3/9355bb7b6d4749e0fc0f683a0ca33ad34e71afbe.png)

The error message says:“”“ERROR: LoadError: InitError: could not load library “C:\Users\liuwa.julia\artifacts\fff13fce0db4ed5379a0eeb73b6047a39b950e9d\bin\libipopt-3.dll”  
The specified module could not be found.”“”. but this file actually exists.

With my project status info:

```bash
pkg> st
      Status `E:\seprojs\juliapowermodel\psyssecurity\Project.toml`
  [6e4b80f9] BenchmarkTools v1.3.1    
  [336ed68f] CSV v0.10.4
  [a93c6f00] DataFrames v1.3.4        
  [5721bf48] DataVoyager v1.0.2       
  [c43c736e] Genie v4.18.0
  [682c06a0] JSON v0.21.3
  [0f8b85d8] JSON3 v1.9.4
  [b9914132] JSONTables v1.0.3        
  [bac558e1] OrderedCollections v1.4.1
  [cc46b21f] PowerDynamics v3.0.0     
  [c36e90e8] PowerModels v0.18.4      
  [229d1e32] PowerPlots v0.4.3        
  [295af30f] Revise v3.3.3
  [856f2bd8] StructTypes v1.8.1       
  [112f6efa] VegaLite v2.6.0
  [2a0f44e3] Base64
  [ade2ca70] Dates

```

---

<div class="post-metadata">

### Author: ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)
#### Post date: [May 9, 2022, 2:46pm UTC](https://discourse.julialang.org/t/failed-to-precompile-ipopt/80758/3 "2022-05-09T14:46:26Z")

</div>

I was able to reproduce this in a clean environment, so maybe worth filing an issue?

I don’t know anything about this package, but for some reason a fresh install pulls in `Ipopt 0.6.3`, a very old version of the dependency. The package should actually be compatible with Ipopt 0.9, and I was able to precompile it by first doing `]add Ipopt@0.9` and then adding PowerDynamics afterwards.

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [May 9, 2022, 3:26pm UTC](https://discourse.julialang.org/t/failed-to-precompile-ipopt/80758/4 "2022-05-09T15:26:41Z")

</div>

In a temporary environment (`]activate --temp`) install [`DependencyWalker.jl`](https://github.com/giordano/DependencyWalker.jl) and [`Ipopt_jll.jl`](https://github.com/JuliaBinaryWrappers/Ipopt_jll.jl)

```julia
]add DependencyWalker Ipopt_jll

```

(you may get an error here, ignore it) then run

```julia
using DependencyWalker, Ipopt_jll

```

you should get an error here, that’s ok, it’s what we want, then run

```julia
Library(raw"C:\Users\liuwa\.julia\artifacts\fff13fce0db4ed5379a0eeb73b6047a39b950e9d\bin\libipopt-3.dll")

```

This should show _which_ library is missing. Unfortunately Windows isn’t very collaborative: it knows _something_ is missing, but it wouldn’t tell you _what_ 🤷

---

<div class="post-metadata">

### Author: ![liuwa666](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liuwa666/32/35456_2.png) [@liuwa666](https://discourse.julialang.org/u/liuwa666)
#### Post date: [May 10, 2022, 12:44am UTC](https://discourse.julialang.org/t/failed-to-precompile-ipopt/80758/5 "2022-05-10T00:44:08Z")

</div>

Thanks, got it.  
The version of Ipopt.jl in my project is too lower(0.6.3), i update the version to 0.7.0, the problem disappears

---

<div class="post-metadata">

### Author: ![liuwa666](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liuwa666/32/35456_2.png) [@liuwa666](https://discourse.julialang.org/u/liuwa666)
#### Post date: [May 10, 2022, 12:45am UTC](https://discourse.julialang.org/t/failed-to-precompile-ipopt/80758/6 "2022-05-10T00:45:12Z")

</div>

Thanks.

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [May 10, 2022, 12:49am UTC](https://discourse.julialang.org/t/failed-to-precompile-ipopt/80758/7 "2022-05-10T00:49:48Z")

</div>

Sounds like there are some missing compat bounds somewhere. It’d be good to know what, to avoid the same troubles to other users in the future.

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [May 10, 2022, 12:57am UTC](https://discourse.julialang.org/t/failed-to-precompile-ipopt/80758/8 "2022-05-10T00:57:31Z")

</div>

Older versions of Ipopt\_jll didn’t have any compat bounds: [Ipopt\_jll.jl/Project.toml at Ipopt-v3.13.2+1 · JuliaBinaryWrappers/Ipopt\_jll.jl · GitHub](https://github.com/JuliaBinaryWrappers/Ipopt_jll.jl/blob/Ipopt-v3.13.2%2B1/Project.toml)

The culprit is usually MUMPS.

---

<div class="post-metadata">

### Author: ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)
#### Post date: [May 10, 2022, 1:29am UTC](https://discourse.julialang.org/t/failed-to-precompile-ipopt/80758/9 "2022-05-10T01:29:10Z")

</div>

> [@odow](#):
>
> Older versions of Ipopt\_jll didn’t have any compat bounds

This can be fixed in the registry; I think [https://github.com/JuliaRegistries/RetroCap.jl](https://github.com/JuliaRegistries/RetroCap.jl) is one option for implementing a fix.

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [May 12, 2022, 5:48pm UTC](https://discourse.julialang.org/t/failed-to-precompile-ipopt/80758/10 "2022-05-12T17:48:21Z")

</div>

Can we get a fix in the registry? We’re seeing failures in AutoMerge because of this, like [https://github.com/JuliaRegistries/General/runs/6408226248?check\_suite\_focus=true](https://github.com/JuliaRegistries/General/runs/6408226248?check_suite_focus=true) and [https://github.com/JuliaRegistries/General/runs/6408617521?check\_suite\_focus=true](https://github.com/JuliaRegistries/General/runs/6408617521?check_suite_focus=true)

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [May 12, 2022, 5:56pm UTC](https://discourse.julialang.org/t/failed-to-precompile-ipopt/80758/11 "2022-05-12T17:56:43Z")

</div>

Other PR which is failing: [https://github.com/JuliaRegistries/General/pull/60114](https://github.com/JuliaRegistries/General/pull/60114). This seems a rather widespread breakage

---

<div class="post-metadata">

### Author: ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)
#### Post date: [May 12, 2022, 10:45pm UTC](https://discourse.julialang.org/t/failed-to-precompile-ipopt/80758/12 "2022-05-12T22:45:42Z")

</div>

I tried RetroCap with its `MonotonicUpperBound` option, after editing it to affect JLLs, and it gave me

```diff
diff --git a/I/Ipopt_jll/Compat.toml b/I/Ipopt_jll/Compat.toml
index d2e570109f..f9462e16ff 100644
--- a/I/Ipopt_jll/Compat.toml
+++ b/I/Ipopt_jll/Compat.toml
@@ -1,6 +1,11 @@
 [3]
+ASL_jll = "0.0.0 - 0.1"
+OpenBLAS32_jll = "0.0.0 - 0.3"
 julia = "1"
 
+["3-3.13.1"]
+MUMPS_seq_jll = "0.0.0 - 5"
+
 ["3.13.2"]
 JLLWrappers = "1.1.0-1"
 
@@ -11,6 +16,8 @@ MUMPS_seq_jll = "5.2.1"
 JLLWrappers = "1.2.0-1"
 
 [300]
+ASL_jll = "0.0.0 - 0.1"
 JLLWrappers = "1.2.0-1"
 MUMPS_seq_jll = "5.4.1"
+OpenBLAS32_jll = "0.0.0 - 0.3"
 julia = "1.6.0-1"

```

But I realize I don’t actually know where the incompabilities are… (I don’t use any of these libraries)

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [May 12, 2022, 10:58pm UTC](https://discourse.julialang.org/t/failed-to-precompile-ipopt/80758/13 "2022-05-12T22:58:42Z")

</div>

I’ll take a look.

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [May 12, 2022, 11:09pm UTC](https://discourse.julialang.org/t/failed-to-precompile-ipopt/80758/14 "2022-05-12T23:09:08Z")

</div>

Does this fix it? [https://github.com/JuliaRegistries/General/pull/60145](https://github.com/JuliaRegistries/General/pull/60145)

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [May 12, 2022, 11:25pm UTC](https://discourse.julialang.org/t/failed-to-precompile-ipopt/80758/15 "2022-05-12T23:25:39Z")

</div>

It looks like your PR solved the failure to load the package in [https://github.com/JuliaRegistries/General/pull/60114](https://github.com/JuliaRegistries/General/pull/60114). Thanks!
