Closed marcosantar93 closed 5 years ago
I uninstalled an OpenCV version which was installed with an Intel SDK and tried the whole installation once again, and I am getting this error whenever I run the program:
# runtime/cgo
/usr/bin/ld: cannot find -ldliaPlugin
/usr/bin/ld: cannot find -lHeteroPlugin
/usr/bin/ld: cannot find -lMKLDNNPlugin
/usr/bin/ld: cannot find -lmyriadPlugin
/usr/bin/ld: cannot find -linference_engine
/usr/bin/ld: cannot find -lclDNNPlugin
/usr/bin/ld: cannot find -lopencv_pvl
collect2: error: ld returned 1 exit status
It worked after changing CGO_LDFLAGS to null
CGO_LDFLAGS=-L/opencv/lib -L/deployment_tools/inference_engine/lib/ubuntu_16.04/intel64 -lpthread -ldl -ldliaPlugin -lHeteroPlugin -lMKLDNNPlugin -lmyriadPlugin -linference_engine -lclDNNPlugin -lopencv_core -lopencv_pvl -lopencv_videoio -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs -lopencv_objdetect -lopencv_features2d -lopencv_video -lopencv_dnn -lopencv_calib3d
CGO_LDFLAGS=
This solution seems a bit forced, any thoughts or suggestions? Or should I close this issue?
Hello @marcosantar93 if you want to use GoCV with the Intel OpenVINO you must follow these instructions here: https://github.com/hybridgroup/gocv/tree/master/openvino
You cannot "mix and match" both versions at the same time. You may either use the OpenCV 4.0 that you would build from source from the main project README (https://github.com/hybridgroup/gocv/blob/master/README.md) or you may use the OpenVINO install by following the OpenVINO instructions as linked above.
Hope that helps!
I'll try it in a few days and let you know. Thanks for the answer!
I could complete the installation from the link that you provided. However, when I run the openvino version program, I get this error:
/usr/bin/ld: cannot find -ldliaPlugin
collect2: error: ld returned 1 exit status
I could find that library on the lib directories referenced on env.sh
, so I deleted the -ldliaPlugin
flag and I could see the openvino version without any problems. However, when I run the DNN-detection example, I get the following error whenever I set the target to NetTargetFP16 or NetTargetFP32. It runs without problems with backend set to OpenVINO and NetTargetCPU.
go run ./cmd/dnn-detection/main.go 0 cmd/dnn-detection/res10_300x300_ssd_iter_140000.caffemodel cmd/dnn-detection/deploy.prototxt openvino fp16
Start reading device: 0
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.0.1-openvino) /home/jenkins/workspace/OpenCV/OpenVINO/build/opencv/modules/dnn/src/op_inf_engine.cpp:553: error: (-215:Assertion failed) in function 'initPlugin'
> Failed to initialize Inference Engine backend: Cannot find plugin to use :Tried load plugin : clDNNPlugin, error: Plugin clDNNPlugin cannot be loaded: cannot load plugin: clDNNPlugin from : Cannot load library 'libclDNNPlugin.so': libOpenCL.so.1: cannot open shared object file: No such file or directory, skipping
>
>
>
>
SIGABRT: abort
PC=0x7f4007aa0428 m=0 sigcode=18446744073709551610
signal arrived during cgo execution
goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x4c14d0, 0xc000053d68, 0xc000053d70)
/usr/local/go/src/runtime/cgocall.go:128 +0x5e fp=0xc000053d38 sp=0xc000053d00 pc=0x432efe
gocv.io/x/gocv._Cfunc_Net_Forward(0x29ff970, 0x29f39c0, 0x0)
_cgo_gotypes.go:4041 +0x4e fp=0xc000053d68 sp=0xc000053d38 pc=0x4bc30e
gocv.io/x/gocv.(*Net).Forward.func2(0x29ff970, 0x29f39c0, 0x29f39c0)
/home/marco/work/src/gocv.io/x/gocv/dnn.go:133 +0x60 fp=0xc000053da0 sp=0xc000053d68 pc=0x4be3f0
gocv.io/x/gocv.(*Net).Forward(0xc000053e98, 0x0, 0x0, 0x0)
/home/marco/work/src/gocv.io/x/gocv/dnn.go:133 +0x83 fp=0xc000053dd0 sp=0xc000053da0 pc=0x4bd223
main.main()
/home/marco/work/src/gocv.io/x/gocv/cmd/dnn-detection/main.go:117 +0x520 fp=0xc000053f98 sp=0xc000053dd0 pc=0x4bf5b0
runtime.main()
/usr/local/go/src/runtime/proc.go:201 +0x207 fp=0xc000053fe0 sp=0xc000053f98 pc=0x459477
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1333 +0x1 fp=0xc000053fe8 sp=0xc000053fe0 pc=0x481701
rax 0x0
rbx 0x4078e60
rcx 0x7f4007aa0428
rdx 0x6
rdi 0x53a9
rsi 0x53a9
rbp 0x7f4007e30700
rsp 0x7fff087f6898
r8 0x4a
r9 0x7f400f019a80
r10 0x8
r11 0x206
r12 0x40786e0
r13 0x4078b10
r14 0x4078b30
r15 0x229
rip 0x7f4007aa0428
rflags 0x206
cs 0x33
fs 0x0
gs 0x0
exit status 2
I checked and the library is where it should.
Closing due to inactivity, please open if needed. Thank you.
Description
After installing following instructions, I get the following error when I try to see the version
Steps to Reproduce
Your Environment
env.sh
orenv.cmd
script before trying togo run
orgo build
? Nogit pull
and it stopped working. I deleted the folder and tried to reinstall it several times and got this error every time.