hybridgroup / gocv

Go package for computer vision using OpenCV 4 and beyond. Includes support for DNN, CUDA, and OpenCV Contrib.
https://gocv.io
Other
6.44k stars 852 forks source link

Missing vtk dependency on Manjaro (Archlinux) #968

Open Jumbef opened 2 years ago

Jumbef commented 2 years ago

Description

On on Manjaro french install gocv need installation of opencv AND vtk

Steps to Reproduce

  1. Fresh install Manjaro (with 21.2.5 ISO)
  2. Update system pacman -Suy
  3. Reboot
  4. Install Go pacman -S go
  5. Install OpenCV pacman -S opencv
  6. Use a tmp directory mkdir -p ~/tmp/gocv-test && cd ~/tmp/gocv-test
  7. Init a go module go mod init gocv-test
  8. Copy/paste the hello world sample in main.go file
  9. Run go mod tidy
  10. Run go run main.go then got ton of errors like :

/usr/bin/ld : warning : libvtkFiltersTexture.so.1, required by /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib/libopencv_viz.so, not found

Your Environment

Workarround / Solution :

From what I understood from the errors I looked about libvtk then installed it pacman -S vtk. Once done, retried step 9 successfully.

bryanjhv commented 2 years ago

It seems it also needs pacman -S hdf5 at the time of this comment. Also, I don't know if it's normal but the first time it takes a extra long time to run.

deadprogram commented 2 years ago

Also, I don't know if it's normal but the first time it takes a extra long time to run.

Compiling CGo like GoCV requires compiling and linking both the Go code and the C code. As a result, until the CGo is cached it takes longer to run.