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.42k stars 853 forks source link

fix: syntax error in go build command #1171

Closed kaanyagci closed 1 month ago

kaanyagci commented 1 month ago

Building the Docker image with Dockerfile with docker build . was failing with the following error message:

 => ERROR [4/4] RUN go build -tags example -o /build/gocv_version -i ./cmd/version/                                                                                                                                                                                                                                                                                  0.3s
------
 > [4/4] RUN go build -tags example -o /build/gocv_version -i ./cmd/version/:
0.308 flag provided but not defined: -i
0.308 usage: go build [-o output] [build flags] [packages]
0.308 Run 'go help build' for details.
------
Dockerfile:10
--------------------
   8 |
   9 |     WORKDIR /go/src/gocv.io/x/gocv
  10 | >>> RUN go build -tags example -o /build/gocv_version -i ./cmd/version/
  11 |
  12 |     CMD ["/build/gocv_version"]
--------------------
ERROR: failed to solve: process "/bin/sh -c go build -tags example -o /build/gocv_version -i ./cmd/version/" did not complete successfully: exit code: 2

Removed the -i flag from go build as it's not defined

deadprogram commented 1 month ago

I'm not sure what I meant by that flag @kaanyagci but thank you for the fix!

I changed the branch for this PR to dev as mentioned here https://github.com/hybridgroup/gocv/blob/release/CONTRIBUTING.md#how-to-use-our-github-repository

Now merging, thanks again.