denismakogon / gocv-alpine

GoCV-compatible OpenCV 3.4 Alpine 3.7 Docker image
Apache License 2.0
118 stars 52 forks source link

Not updated to OpenCV4 #6

Closed evanfrawley closed 5 years ago

evanfrawley commented 5 years ago

Hi,

Thanks for the neat library!

I am trying to build and run the test script in the README, but it seems that gocv is now updated to OpenCV 4.0.0. I tried rerunning the build scripts after changing the image names to have ...4.0.0 and changing the OPEN_CV_VERSION to 4.0.0 and rebuilding all images from scratch but neither worked.

When running the ...:test script, I end up getting the following docker output:

Sending build context to Docker daemon  2.048kB
Step 1/7 : FROM denismakogon/gocv-alpine:3.4.2-buildstage as build-stage
 ---> 8d9938523d3a
Step 2/7 : ENV PKG_CONFIG_PATH /usr/local/lib64/pkgconfig
 ---> Using cache
 ---> 5fd2af774c48
Step 3/7 : RUN go get -u -d gocv.io/x/gocv
 ---> Using cache
 ---> 0ec91f5a202f
Step 4/7 : RUN cd $GOPATH/src/gocv.io/x/gocv && go build -o $GOPATH/bin/gocv-version ./cmd/version/main.go
 ---> Running in 97ee030f03e3
# pkg-config --cflags  -- opencv4
Package opencv4 was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv4.pc'
to the PKG_CONFIG_PATH environment variable
Package 'opencv4', required by 'virtual:world', not found
pkg-config: exit status 1
The command '/bin/sh -c cd $GOPATH/src/gocv.io/x/gocv && go build -o $GOPATH/bin/gocv-version ./cmd/version/main.go' returned a non-zero code: 2

with

# pkg-config --cflags  -- opencv4
Package opencv4 was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv4.pc'
to the PKG_CONFIG_PATH environment variable
Package 'opencv4', required by 'virtual:world', not found
pkg-config: exit status 1

as the error code in red. Do you have any insight into updating this to OpenCV 4?

Thanks!

MasashiYokota commented 5 years ago

I tried sending the PR #7 . Please check it. Thank you.

evanfrawley commented 5 years ago

Thank you so much @MasashiYokota! I was able to build the images in my machine :)

MasashiYokota commented 5 years ago

You're welcome 😄

denismakogon commented 5 years ago

fix merged.