gocv icon indicating copy to clipboard operation
gocv copied to clipboard

Missing vtk dependency on Manjaro (Archlinux)

Open Jumbef opened this issue 2 years ago • 2 comments

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

  • Operating System and version: Manjaro fresh install from 21.2.5 ISO then updated
  • OpenCV version used: 4.5.5
  • How did you install OpenCV? Distro package manager
  • GoCV version used: 0.30.0
  • Go version: 1.18
  • Did you run the env.sh or env.cmd script before trying to go run or go build? No, the script is deprecated.

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.

Jumbef avatar Apr 16 '22 16:04 Jumbef

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.

bryanjhv avatar Jun 06 '22 17:06 bryanjhv

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.

deadprogram avatar Jun 07 '22 05:06 deadprogram