You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go build -ldflags="-extldflags=-static" -o test main.go
# gocv.io/x/gocv
In file included from aruco.cpp:1:
aruco.h:12:13: error: 'aruco' in namespace 'cv' does not name a type
12 | typedef cv::aruco::Dictionary* ArucoDictionary;
Now If I provide -tags customEnv, it would generate the following error:
go build -tags customenv -ldflags="-extldflags=-static" -o test main.go
aruco.h:5:10: fatal error: opencv2/opencv.hpp: No such file or directory
5 | #include <opencv2/opencv.hpp>
| ^~~~~~~~~~~~~~~~~~~~
Setting CGO_CPPFLAGS="-I/usr/local/include/opencv4" would trigger the first error again regarding aruco errors.
FYI
I also ran the same code using the prebuilt docker image for gocv/opencv:4.9.0 and the latest gocv/opencv:4.10.0, both static and non-static versions of the image. None of them run.
Also tried to downgrade gocv to 0.36 and opencv 4.9.0, no luck, same issue.
Please note that I am disabling everything except for the most basic imgproc and core and imgcodec. but looks like it's still trying to include aruco, i even tried to add the build flag for aruco.go and aruco_dictionary.go, no luck, maybe I miss something. Unless I have to include the aruco/dnn features?
Would appreciate some help if anyone knows whats going on, thank ya'll very much!
Simple script:
Running the following command:
Now If I provide -tags customEnv, it would generate the following error:
Setting
CGO_CPPFLAGS="-I/usr/local/include/opencv4"
would trigger the first error again regarding aruco errors.FYI
I also ran the same code using the prebuilt docker image for gocv/opencv:4.9.0 and the latest gocv/opencv:4.10.0, both static and non-static versions of the image. None of them run.
Also tried to downgrade gocv to 0.36 and opencv 4.9.0, no luck, same issue.
Your Environment
Statically build opencv 4.10.0
wget -qO- https://github.com/opencv/opencv/archive/refs/tags/4.10.0.tar.gz | tar xz
wget -qO- https://github.com/opencv/opencv_contrib/archive/refs/tags/4.10.0.tar.gz | tar xz
The text was updated successfully, but these errors were encountered: