When trying to install OpenCV.jl, I get the following:
(@v1.7) pkg> add OpenCV
Updating registry at `~/.julia/registries/General.toml`
Resolving package versions...
Updating `~/.julia/environments/v1.7/Project.toml`
[f878e3a2] + OpenCV v4.5.2
Updating `~/.julia/environments/v1.7/Manifest.toml`
[1f15a43c] + CxxWrap v0.11.2
[f878e3a2] + OpenCV v4.5.2
[33b9d88c] + OpenCV_jll v4.5.2+0
[3eaa8342] + libcxxwrap_julia_jll v0.8.8+0
Precompiling project...
✗ OpenCV
0 dependencies successfully precompiled in 4 seconds (211 already precompiled)
1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package
Loading the package produces the following:
julia> using OpenCV
[ Info: Precompiling OpenCV [f878e3a2-a245-4720-8660-60795d644f2a]
C++ exception while wrapping module OpenCV: invalid subtyping in definition of CxxVec with supertype Any
signal (11): Segmentation fault: 11
in expression starting at none:0
gc_sweep_pool at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
_jl_gc_collect at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_gc_collect at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_gc_pool_alloc at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
iterate at ./range.jl:837 [inlined]
fill! at ./array.jl:353 [inlined]
fill at ./array.jl:473 [inlined]
fill at ./array.jl:471 [inlined]
NewNodeStream at ./compiler/ssair/ir.jl:269 [inlined]
domsort_ssa! at ./compiler/ssair/slot2ssa.jl:499
construct_ssa! at ./compiler/ssair/slot2ssa.jl:896
slot2reg at ./compiler/optimize.jl:419 [inlined]
run_passes at ./compiler/optimize.jl:303
optimize at ./compiler/optimize.jl:296 [inlined]
_typeinf at ./compiler/typeinfer.jl:255
typeinf at ./compiler/typeinfer.jl:209
typeinf_edge at ./compiler/typeinfer.jl:823 [inlined]
abstract_call_method at ./compiler/abstractinterpretation.jl:504
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:105
abstract_call_known at ./compiler/abstractinterpretation.jl:1342
abstract_call at ./compiler/abstractinterpretation.jl:1397
abstract_apply at ./compiler/abstractinterpretation.jl:987
abstract_call_known at ./compiler/abstractinterpretation.jl:1249
abstract_call at ./compiler/abstractinterpretation.jl:1397
abstract_call at ./compiler/abstractinterpretation.jl:1382
abstract_eval_statement at ./compiler/abstractinterpretation.jl:1534
typeinf_local at ./compiler/abstractinterpretation.jl:1918
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2014
_typeinf at ./compiler/typeinfer.jl:226
typeinf at ./compiler/typeinfer.jl:209
typeinf_edge at ./compiler/typeinfer.jl:823 [inlined]
abstract_call_method at ./compiler/abstractinterpretation.jl:504
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:105
abstract_call_known at ./compiler/abstractinterpretation.jl:1342
abstract_call at ./compiler/abstractinterpretation.jl:1397
abstract_apply at ./compiler/abstractinterpretation.jl:987
abstract_call_known at ./compiler/abstractinterpretation.jl:1249
abstract_call at ./compiler/abstractinterpretation.jl:1397
abstract_call at ./compiler/abstractinterpretation.jl:1382
abstract_eval_statement at ./compiler/abstractinterpretation.jl:1534
typeinf_local at ./compiler/abstractinterpretation.jl:1918
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2014
_typeinf at ./compiler/typeinfer.jl:226
typeinf at ./compiler/typeinfer.jl:209
typeinf_edge at ./compiler/typeinfer.jl:823 [inlined]
abstract_call_method at ./compiler/abstractinterpretation.jl:504
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:105
abstract_call_known at ./compiler/abstractinterpretation.jl:1342
abstract_call at ./compiler/abstractinterpretation.jl:1397
abstract_apply at ./compiler/abstractinterpretation.jl:987
abstract_call_known at ./compiler/abstractinterpretation.jl:1249
abstract_call at ./compiler/abstractinterpretation.jl:1397
abstract_call at ./compiler/abstractinterpretation.jl:1382
abstract_eval_statement at ./compiler/abstractinterpretation.jl:1534
typeinf_local at ./compiler/abstractinterpretation.jl:1918
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2014
_typeinf at ./compiler/typeinfer.jl:226
typeinf at ./compiler/typeinfer.jl:209
typeinf_edge at ./compiler/typeinfer.jl:823 [inlined]
abstract_call_method at ./compiler/abstractinterpretation.jl:504
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:105
abstract_call_known at ./compiler/abstractinterpretation.jl:1342
abstract_call at ./compiler/abstractinterpretation.jl:1397
abstract_call at ./compiler/abstractinterpretation.jl:1382
abstract_eval_statement at ./compiler/abstractinterpretation.jl:1534
typeinf_local at ./compiler/abstractinterpretation.jl:1918
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2014
_typeinf at ./compiler/typeinfer.jl:226
typeinf at ./compiler/typeinfer.jl:209
typeinf_edge at ./compiler/typeinfer.jl:823 [inlined]
abstract_call_method at ./compiler/abstractinterpretation.jl:504
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:105
abstract_call_known at ./compiler/abstractinterpretation.jl:1342
abstract_call at ./compiler/abstractinterpretation.jl:1397
abstract_call at ./compiler/abstractinterpretation.jl:1382
abstract_eval_statement at ./compiler/abstractinterpretation.jl:1534
typeinf_local at ./compiler/abstractinterpretation.jl:1918
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2014
_typeinf at ./compiler/typeinfer.jl:226
typeinf at ./compiler/typeinfer.jl:209
typeinf_edge at ./compiler/typeinfer.jl:823 [inlined]
abstract_call_method at ./compiler/abstractinterpretation.jl:504
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:105
abstract_call_known at ./compiler/abstractinterpretation.jl:1342
abstract_call at ./compiler/abstractinterpretation.jl:1397
abstract_call at ./compiler/abstractinterpretation.jl:1382
abstract_eval_statement at ./compiler/abstractinterpretation.jl:1534
typeinf_local at ./compiler/abstractinterpretation.jl:1918
typeinf_nocycle at ./compiler/abstractinterpretation.jl:2014
_typeinf at ./compiler/typeinfer.jl:226
typeinf at ./compiler/typeinfer.jl:209
typeinf_ext at ./compiler/typeinfer.jl:909
typeinf_ext_toplevel at ./compiler/typeinfer.jl:942
typeinf_ext_toplevel at ./compiler/typeinfer.jl:938
jfptr_typeinf_ext_toplevel_9965.clone_1 at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_type_infer at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_generate_fptr at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_compile_method_internal at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_f__call_latest at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
#invokelatest#2 at ./essentials.jl:716 [inlined]
invokelatest at ./essentials.jl:714 [inlined]
_start at ./client.jl:497
jfptr__start_28060.clone_1 at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
true_main at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_repl_entrypoint at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
Allocations: 2450047 (Pool: 2449489; Big: 558); GC: 1
signal (11): Segmentation fault: 11
in expression starting at none:0
gc_sweep_pool at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
_jl_gc_collect at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_gc_collect at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_gc_pool_alloc at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_gc_alloc at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
_new_array_ at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
_new_array at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_alloc_array_1d at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
Array at ./boot.jl:457 [inlined]
Array at ./boot.jl:466 [inlined]
Array at ./baseext.jl:36 [inlined]
zeros at ./array.jl:525 [inlined]
zeros at ./array.jl:521 [inlined]
stat at ./stat.jl:149
ispath at ./stat.jl:456 [inlined]
#temp_cleanup_purge#21 at ./file.jl:529
temp_cleanup_purge##kw at ./file.jl:526 [inlined]
#838 at ./initdefs.jl:329
jfptr_YY.838_30047.clone_1 at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
_atexit at ./initdefs.jl:350
jfptr__atexit_38138.clone_1 at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_atexit_hook at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_exit at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
jl_exit_thread0_cb at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
Allocations: 3255676 (Pool: 3254895; Big: 781); GC: 1
ERROR: Failed to precompile OpenCV [f878e3a2-a245-4720-8660-60795d644f2a] to /Users/polly/.julia/compiled/v1.7/OpenCV/jl_NeYLQK.
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
This is with Julia 1.7 on a Mac machine:
julia> versioninfo()
Julia Version 1.7.0
Commit 3bf9d17731 (2021-11-30 12:12 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin19.5.0)
CPU: Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, broadwell)
Environment:
JULIA_PKG_SERVER = pkg.julialang.org
I have similar problems on a Linux machine.
Is anybody else having this problem as well? Does anybody know how to fix this?
Thanks!