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:
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:
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