Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with OpenCV and julia 1.11.0 #48

Closed
stefanocovino opened this issue Oct 14, 2024 · 5 comments
Closed

Problems with OpenCV and julia 1.11.0 #48

stefanocovino opened this issue Oct 14, 2024 · 5 comments

Comments

@stefanocovino
Copy link

Dear friends,

I have problems in installing OpenCV on a linux (debian) platform and julia 1.11.0. This is the error log I get:

julia> err
PkgPrecompileError: The following 1 direct dependency failed to precompile:

OpenCV

Failed to precompile OpenCV [f878e3a2-a245-4720-8660-60795d644f2a] to "/home/stefanocovino/.julia/compiled/v1.11/OpenCV/jl_Mj1Y8s".
ERROR: LoadError: InitError: could not load library "/home/stefanocovino/.julia/artifacts/fbe819efdc02977e6bc7cabfab4fb33665dc17d9/lib/libcxxwrap_julia.so"
/home/stefanocovino/.julia/artifacts/fbe819efdc02977e6bc7cabfab4fb33665dc17d9/lib/libcxxwrap_julia.so: undefined symbol: small_typeof, version JL_LIBJULIA_1.11
Stacktrace:
[1] dlopen(s::String, flags::UInt32; throw_error::Bool)
@ Base.Libc.Libdl ./libdl.jl:120
[2] dlopen(s::String, flags::UInt32)
@ Base.Libc.Libdl ./libdl.jl:119
[3] macro expansion
@ ~/.julia/packages/JLLWrappers/inPJn/src/products/library_generators.jl:63 [inlined]
[4] init()
@ libcxxwrap_julia_jll ~/.julia/packages/libcxxwrap_julia_jll/zmDeI/src/wrappers/x86_64-linux-gnu-cxx11-julia_version+1.11.0.jl:9
[5] run_module_init(mod::Module, i::Int64)
@ Base ./loading.jl:1336
[6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
@ Base ./loading.jl:1324
[7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}, ignore_native::Nothing; register::Bool)
@ Base ./loading.jl:1213
[8] _include_from_serialized (repeats 2 times)
@ ./loading.jl:1169 [inlined]
[9] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Dict{String, Int64}, DEPOT_PATH::Vector{String})
@ Base ./loading.jl:1975
[10] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:2435
[11] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:2300
[12] #invoke_in_world#3
@ ./essentials.jl:1088 [inlined]
[13] invoke_in_world
@ ./essentials.jl:1085 [inlined]
[14] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:2287
[15] macro expansion
@ ./loading.jl:2226 [inlined]
[16] macro expansion
@ ./lock.jl:273 [inlined]
[17] __require(into::Module, mod::Symbol)
@ Base ./loading.jl:2183
[18] #invoke_in_world#3
@ ./essentials.jl:1088 [inlined]
[19] invoke_in_world
@ ./essentials.jl:1085 [inlined]
[20] require(into::Module, mod::Symbol)
@ Base ./loading.jl:2176
[21] include(mod::Module, _path::String)
@ Base ./Base.jl:557
[22] top-level scope
@ ~/.julia/packages/JLLWrappers/inPJn/src/toplevel_generators.jl:192
[23] include
@ ./Base.jl:557 [inlined]
[24] 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, UInt128}}, source::String)
@ Base ./loading.jl:2806
[25] top-level scope
@ stdin:4
during initialization of module libcxxwrap_julia_jll
in expression starting at /home/stefanocovino/.julia/packages/OpenCV_jll/Hfsh1/src/wrappers/x86_64-linux-gnu-cxx11-julia_version+1.11.0.jl:6
in expression starting at /home/stefanocovino/.julia/packages/OpenCV_jll/Hfsh1/src/OpenCV_jll.jl:2
in expression starting at stdin:4
ERROR: LoadError: Failed to precompile OpenCV_jll [33b9d88c-85f9-5d73-bd91-4e2b95a9aa0b] to "/home/stefanocovino/.julia/compiled/v1.11/OpenCV_jll/jl_54XHqw".
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{String, Int64})
@ Base ./loading.jl:3089
[3] (::Base.var"#1081#1082"{Base.PkgId})()
@ Base ./loading.jl:2477
[4] mkpidlock(f::Base.var"#1081#1082"{Base.PkgId}, at::String, pid::Int32; kwopts::@kwargs{stale_age::Int64, wait::Bool})
@ FileWatching.Pidfile ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:95
[5] #mkpidlock#6
@ ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:90 [inlined]
[6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@kwargs{stale_age::Int64})
@ FileWatching.Pidfile ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:116
[7] #invokelatest#2
@ ./essentials.jl:1056 [inlined]
[8] invokelatest
@ ./essentials.jl:1051 [inlined]
[9] maybe_cachefile_lock(f::Base.var"#1081#1082"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
@ Base ./loading.jl:3613
[10] maybe_cachefile_lock
@ ./loading.jl:3610 [inlined]
[11] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:2473
[12] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:2300
[13] #invoke_in_world#3
@ ./essentials.jl:1088 [inlined]
[14] invoke_in_world
@ ./essentials.jl:1085 [inlined]
[15] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:2287
[16] macro expansion
@ ./loading.jl:2226 [inlined]
[17] macro expansion
@ ./lock.jl:273 [inlined]
[18] __require(into::Module, mod::Symbol)
@ Base ./loading.jl:2183
[19] #invoke_in_world#3
@ ./essentials.jl:1088 [inlined]
[20] invoke_in_world
@ ./essentials.jl:1085 [inlined]
[21] require(into::Module, mod::Symbol)
@ Base ./loading.jl:2176
[22] include
@ ./Base.jl:557 [inlined]
[23] 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, UInt128}}, source::Nothing)
@ Base ./loading.jl:2806
[24] top-level scope
@ stdin:4
in expression starting at /home/stefanocovino/.julia/packages/OpenCV/2FyNG/src/OpenCV.jl:1
in expression starting at stdin:


Hope it hekps in identyfing the problem.

Thanks.

Stefanoi

@bencardoen
Copy link

Same here, including on 1.10.5, the Cxxwrap dependency fails. The relevant trace is

ERROR: LoadError: InitError: could not load library "/home/bcardoen/.julia/artifacts/fbe819efdc02977e6bc7cabfab4fb33665dc17d9/lib/libcxxwrap_julia.so"
/home/bcardoen/.julia/artifacts/fbe819efdc02977e6bc7cabfab4fb33665dc17d9/lib/libcxxwrap_julia.so: undefined symbol: small_typeof, version JL_LIBJULIA_1.11

@ViralBShah
Copy link
Contributor

Fixed in #47. Should register a new version soon.

@ViralBShah
Copy link
Contributor

Would be nice if you can try the dev version and verify.

@bencardoen
Copy link

bencardoen commented Oct 24, 2024

@ViralBShah nvm

juliaup add 1.11
julia +1.11
julia
] dev OpenCV
using OpenCV

installs but crashes on precompilation (Fedora 40). Perhaps I'm doing something wrong?

(@v1.11) pkg> status
Status `~/.julia/environments/v1.11/Project.toml`
  [f878e3a2] OpenCV v4.6.0 `~/.julia/dev/OpenCV`

Full trace

(@v1.11) pkg> dev OpenCV
     Cloning git-repo `https://github.com/JuliaImages/OpenCV.jl.git`
   Resolving package versions...
   Installed CxxWrap ────────────── v0.16.0
   Installed libcxxwrap_julia_jll ─ v0.13.2+0
  Downloaded artifact: OpenCV
  Downloaded artifact: libcxxwrap_julia
    Updating `~/.julia/environments/v1.11/Project.toml`
  [f878e3a2] + OpenCV v4.6.0 `~/.julia/dev/OpenCV`
    Updating `~/.julia/environments/v1.11/Manifest.toml`
  [1f15a43c] + CxxWrap v0.16.0
  [692b3bcd] + JLLWrappers v1.6.1
  [1914dd2f] + MacroTools v0.5.13
  [f878e3a2] + OpenCV v4.6.0 `~/.julia/dev/OpenCV`
  [21216c6a] + Preferences v1.4.3
  [6e34b625] + Bzip2_jll v1.0.8+2
  [2702e6a9] + EpollShim_jll v0.0.20230411+0
  [2e619515] + Expat_jll v2.6.2+0
  [a3f928ae] + Fontconfig_jll v2.13.96+0
  [d7e528f0] + FreeType2_jll v2.13.2+0
  [78b55507] + Gettext_jll v0.21.0+0
  [7746bdde] + Glib_jll v2.80.5+0
⌅ [e9f186c6] + Libffi_jll v3.2.2+1
  [d4300ac3] + Libgcrypt_jll v1.8.11+0
  [7e76a0d4] + Libglvnd_jll v1.6.0+0
  [7add5ba3] + Libgpg_error_jll v1.49.0+0
  [94ce4f54] + Libiconv_jll v1.17.0+0
  [4b2f31a3] + Libmount_jll v2.40.1+0
  [38a345b3] + Libuuid_jll v2.40.1+0
  [33b9d88c] + OpenCV_jll v4.6.0+2
⌅ [458c3c95] + OpenSSL_jll v1.1.23+1
  [ea2cea3b] + Qt5Base_jll v5.15.3+2
  [a2964d1f] + Wayland_jll v1.21.0+1
  [2381bf8a] + Wayland_protocols_jll v1.31.0+0
  [02c8fc9c] + XML2_jll v2.13.3+0
  [aed1982a] + XSLT_jll v1.1.41+0
  [4f6342f7] + Xorg_libX11_jll v1.8.6+0
  [0c0b7dd1] + Xorg_libXau_jll v1.0.11+0
  [a3789734] + Xorg_libXdmcp_jll v1.1.4+0
  [1082639a] + Xorg_libXext_jll v1.3.6+0
  [14d82f49] + Xorg_libpthread_stubs_jll v0.1.1+0
  [c7cfdc94] + Xorg_libxcb_jll v1.17.0+0
  [cc61e674] + Xorg_libxkbfile_jll v1.1.2+0
  [12413925] + Xorg_xcb_util_image_jll v0.4.0+1
  [2def613f] + Xorg_xcb_util_jll v0.4.0+1
  [975044d2] + Xorg_xcb_util_keysyms_jll v0.4.0+1
  [0d47668e] + Xorg_xcb_util_renderutil_jll v0.3.9+1
  [c22f9ab0] + Xorg_xcb_util_wm_jll v0.4.1+1
  [35661453] + Xorg_xkbcomp_jll v1.4.6+0
  [33bec58e] + Xorg_xkeyboard_config_jll v2.39.0+0
  [c5fb5394] + Xorg_xtrans_jll v1.5.0+0
  [3eaa8342] + libcxxwrap_julia_jll v0.13.2+0
  [d8fb68d0] + xkbcommon_jll v1.4.1+1
  [0dad84c5] + ArgTools v1.1.2
  [56f22d72] + Artifacts v1.11.0
  [2a0f44e3] + Base64 v1.11.0
  [ade2ca70] + Dates v1.11.0
  [f43a241f] + Downloads v1.6.0
  [7b1f6079] + FileWatching v1.11.0
  [b27032c2] + LibCURL v0.6.4
  [76f85450] + LibGit2 v1.11.0
  [8f399da3] + Libdl v1.11.0
  [56ddb016] + Logging v1.11.0
  [d6f4376e] + Markdown v1.11.0
  [ca575930] + NetworkOptions v1.2.0
  [44cfe95a] + Pkg v1.11.0
  [de0858da] + Printf v1.11.0
  [9a3f8284] + Random v1.11.0
  [ea8e919c] + SHA v0.7.0
  [fa267f1f] + TOML v1.0.3
  [a4e569a6] + Tar v1.10.0
  [cf7118a7] + UUIDs v1.11.0
  [4ec0a83e] + Unicode v1.11.0
  [e66e0078] + CompilerSupportLibraries_jll v1.1.1+0
  [deac9b47] + LibCURL_jll v8.6.0+0
  [e37daf67] + LibGit2_jll v1.7.2+0
  [29816b5a] + LibSSH2_jll v1.11.0+1
  [c8ffd9c3] + MbedTLS_jll v2.28.6+0
  [14a3606d] + MozillaCACerts_jll v2023.12.12
  [efcefdf7] + PCRE2_jll v10.42.0+1
  [83775a58] + Zlib_jll v1.2.13+1
  [8e850ede] + nghttp2_jll v1.59.0+0
  [3f19e933] + p7zip_jll v17.4.0+2
        Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`

julia> using OpenCV
Precompiling OpenCV...
Info Given OpenCV was explicitly requested, output will be shown live 
ERROR: LoadError: InitError: could not load library "/home/bcardoen/.julia/artifacts/55c9720fa4f3a61012a2311bfcf0ba4e66405dea/lib/libopencv_julia.so"
/home/bcardoen/.julia/artifacts/55c9720fa4f3a61012a2311bfcf0ba4e66405dea/lib/libopencv_julia.so: undefined symbol: small_typeof, version JL_LIBJULIA_1.11
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:120
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:119
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/jXOYx/src/products/library_generators.jl:63 [inlined]
  [4] __init__()
    @ OpenCV_jll ~/.julia/packages/OpenCV_jll/Hfsh1/src/wrappers/x86_64-linux-gnu-cxx11-julia_version+1.11.0.jl:78
  [5] run_module_init(mod::Module, i::Int64)
    @ Base ./loading.jl:1336
  [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1324
  [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}, ignore_native::Nothing; register::Bool)
    @ Base ./loading.jl:1213
  [8] _include_from_serialized (repeats 2 times)
    @ ./loading.jl:1169 [inlined]
  [9] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Dict{String, Int64}, DEPOT_PATH::Vector{String})
    @ Base ./loading.jl:1985
 [10] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2450
 [11] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2315
 [12] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [13] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [14] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2302
 [15] macro expansion
    @ ./loading.jl:2241 [inlined]
 [16] macro expansion
    @ ./lock.jl:273 [inlined]
 [17] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2198
 [18] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [19] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [20] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2191
 [21] include
    @ ./Base.jl:557 [inlined]
 [22] 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, UInt128}}, source::Nothing)
    @ Base ./loading.jl:2790
 [23] top-level scope
    @ stdin:5
during initialization of module OpenCV_jll
in expression starting at /home/bcardoen/.julia/dev/OpenCV/src/OpenCV.jl:1
in expression starting at stdin:5
  ✗ OpenCV
  42 dependencies successfully precompiled in 16 seconds. 25 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

OpenCV 

Failed to precompile OpenCV [f878e3a2-a245-4720-8660-60795d644f2a] to "/home/bcardoen/.julia/compiled/v1.11/OpenCV/jl_7W5cj8".
ERROR: LoadError: InitError: could not load library "/home/bcardoen/.julia/artifacts/55c9720fa4f3a61012a2311bfcf0ba4e66405dea/lib/libopencv_julia.so"
/home/bcardoen/.julia/artifacts/55c9720fa4f3a61012a2311bfcf0ba4e66405dea/lib/libopencv_julia.so: undefined symbol: small_typeof, version JL_LIBJULIA_1.11
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:120
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:119
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/jXOYx/src/products/library_generators.jl:63 [inlined]
  [4] __init__()
    @ OpenCV_jll ~/.julia/packages/OpenCV_jll/Hfsh1/src/wrappers/x86_64-linux-gnu-cxx11-julia_version+1.11.0.jl:78
  [5] run_module_init(mod::Module, i::Int64)
    @ Base ./loading.jl:1336
  [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1324
  [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}, ignore_native::Nothing; register::Bool)
    @ Base ./loading.jl:1213
  [8] _include_from_serialized (repeats 2 times)
    @ ./loading.jl:1169 [inlined]
  [9] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Dict{String, Int64}, DEPOT_PATH::Vector{String})
    @ Base ./loading.jl:1985
 [10] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2450
 [11] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2315
 [12] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [13] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [14] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2302
 [15] macro expansion
    @ ./loading.jl:2241 [inlined]
 [16] macro expansion
    @ ./lock.jl:273 [inlined]
 [17] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2198
 [18] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [19] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [20] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2191
 [21] include
    @ ./Base.jl:557 [inlined]
 [22] 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, UInt128}}, source::Nothing)
    @ Base ./loading.jl:2790
 [23] top-level scope
    @ stdin:5
during initialization of module OpenCV_jll
in expression starting at /home/bcardoen/.julia/dev/OpenCV/src/OpenCV.jl:1
in expression starting at stdin:

@bencardoen
Copy link

@ViralBShah please ignore the above, I forgot to first update registry. With an

] update

it precompiles fine. Thank you for resolving this, and apologies for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants