gocv icon indicating copy to clipboard operation
gocv copied to clipboard

Error installing OpenCV on RPi running Ubuntu

Open lwileczek opened this issue 2 years ago • 0 comments

Description

I have a Raspberry Pi 4 running ubuntu 20.04. I tried using the make file to install OpenCV and keep getting this error

/usr/bin/ld: $WORK/b044/_cgo_.o: hidden symbol `opj_stream_default_create' isn't defined
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status

Steps to Reproduce

  1. Get RPi 4
  2. Install Ubuntu
  3. Clone gocv
  4. make install BUILD_SHARED_LIBS=OFF

Your Environment

  • Operating System and version: Linux ubuntu 5.4.0-1045-raspi #49-Ubuntu SMP PREEMPT Wed Sep 29 17:49:16 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
  • OpenCV version used: 4.6.4?
  • How did you install OpenCV? n/a
  • GoCV version used: v0.31.0
  • Go version: 1.18.3
  • Did you run the env.sh or env.cmd script before trying to go run or go build? No

Any help would be appreciated. I got this to work once before but I am struggling to get GoCV to work on a Pi now. I was hoping ot also build opencv as a static file to build it into my binary.

lwileczek avatar Jun 28 '22 19:06 lwileczek