hybridgroup / gocv

Go package for computer vision using OpenCV 4 and beyond. Includes support for DNN, CUDA, OpenCV Contrib, and OpenVINO.
https://gocv.io
Other
6.74k stars 868 forks source link

build error on debian 12 arm64 docker #1252

Open djzzwx opened 1 week ago

djzzwx commented 1 week ago

Description

[+] Building 59.7s (8/8) FINISHED docker:default => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 301B 0.0s => WARN: LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 5) 0.0s => [internal] load metadata for ghcr.io/hybridgroup/opencv:4.10.0 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load build context 0.1s => => transferring context: 20.34MB 0.1s => CACHED [1/4] FROM ghcr.io/hybridgroup/opencv:4.10.0 0.0s => [2/4] COPY . /go/src/gocv.io/x/gocv/ 0.2s => [3/4] WORKDIR /go/src/gocv.io/x/gocv 0.0s => ERROR [4/4] RUN go build -tags example -o /build/gocv_version ./cmd/version/ 59.2s

[4/4] RUN go build -tags example -o /build/gocv_version ./cmd/version/: 59.02 # gocv.io/x/gocv/cmd/version 59.02 /usr/local/go/pkg/tool/linux_arm64/link: running g++ failed: exit status 1 59.02 /usr/bin/g++ -o $WORK/b001/exe/a.out -Wl,--export-dynamic-symbol=_cgo_panic -Wl,--export-dynamic-symbol=_cgo_topofstack -Wl,--export-dynamic-symbol=crosscall2 -Wl,--export-dynamic-symbol=go_onmouse_dispatcher -Wl,--compress-debug-sections=zlib /tmp/go-link-2453243127/go.o /tmp/go-link-2453243127/000000.o /tmp/go-link-2453243127/000001.o /tmp/go-link-2453243127/000002.o /tmp/go-link-2453243127/000003.o /tmp/go-link-2453243127/000004.o /tmp/go-link-2453243127/000005.o /tmp/go-link-2453243127/000006.o /tmp/go-link-2453243127/000007.o /tmp/go-link-2453243127/000008.o /tmp/go-link-2453243127/000009.o /tmp/go-link-2453243127/000010.o /tmp/go-link-2453243127/000011.o /tmp/go-link-2453243127/000012.o /tmp/go-link-2453243127/000013.o /tmp/go-link-2453243127/000014.o /tmp/go-link-2453243127/000015.o /tmp/go-link-2453243127/000016.o /tmp/go-link-2453243127/000017.o /tmp/go-link-2453243127/000018.o /tmp/go-link-2453243127/000019.o /tmp/go-link-2453243127/000020.o /tmp/go-link-2453243127/000021.o /tmp/go-link-2453243127/000022.o /tmp/go-link-2453243127/000023.o /tmp/go-link-2453243127/000024.o /tmp/go-link-2453243127/000025.o /tmp/go-link-2453243127/000026.o /tmp/go-link-2453243127/000027.o /tmp/go-link-2453243127/000028.o /tmp/go-link-2453243127/000029.o /tmp/go-link-2453243127/000030.o /tmp/go-link-2453243127/000031.o /tmp/go-link-2453243127/000032.o /tmp/go-link-2453243127/000033.o /tmp/go-link-2453243127/000034.o /tmp/go-link-2453243127/000035.o /tmp/go-link-2453243127/000036.o /tmp/go-link-2453243127/000037.o /tmp/go-link-2453243127/000038.o /tmp/go-link-2453243127/000039.o /tmp/go-link-2453243127/000040.o /tmp/go-link-2453243127/000041.o /tmp/go-link-2453243127/000042.o /tmp/go-link-2453243127/000043.o /tmp/go-link-2453243127/000044.o /tmp/go-link-2453243127/000045.o /tmp/go-link-2453243127/000046.o /tmp/go-link-2453243127/000047.o /tmp/go-link-2453243127/000048.o /tmp/go-link-2453243127/000049.o /tmp/go-link-2453243127/000050.o /tmp/go-link-2453243127/000051.o -O2 -g -L/usr/local/lib -lopencv_gapi -lopencv_stitching -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_dpm -lopencv_face -lopencv_fuzzy -lopencv_hfs -lopencv_img_hash -lopencv_intensity_transform -lopencv_line_descriptor -lopencv_mcc -lopencv_quality -lopencv_rapid -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_signal -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_superres -lopencv_optflow -lopencv_surface_matching -lopencv_tracking -lopencv_highgui -lopencv_datasets -lopencv_text -lopencv_plot -lopencv_videostab -lopencv_videoio -lopencv_wechat_qrcode -lopencv_xfeatures2d -lopencv_shape -lopencv_ml -lopencv_ximgproc -lopencv_video -lopencv_xobjdetect -lopencv_objdetect -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_dnn -lopencv_flann -lopencv_xphoto -lopencv_photo -lopencv_imgproc -lopencv_core -O2 -g -lpthread -no-pie 59.02 /usr/bin/ld: /usr/local/lib/libopencv_core.so: undefined reference to tbb::detail::r1::spawn(tbb::detail::d1::task&, tbb::detail::d1::task_group_context&)' 59.02 /usr/bin/ld: /usr/local/lib/libopencv_core.so: undefined reference totbb::detail::r1::allocate(tbb::detail::d1::small_object_pool&, unsigned long)' 59.02 /usr/bin/ld: /usr/local/lib/libopencv_core.so: undefined reference to `tbb::detail::r1::deallocate(tbb::detail::d1::small_object_pool&, void, unsigned long, tbb::detail::d1::execution_data const&)' 59.02 /usr/bin/ld: /usr/local/lib/libopencv_core.so: undefined reference to tbb::detail::r1::initialize(tbb::detail::d1::task_arena_base&)' 59.02 /usr/bin/ld: /usr/local/lib/libopencv_core.so: undefined reference totbb::detail::r1::destroy(tbb::detail::d1::task_group_context&)' 59.02 /usr/bin/ld: /usr/local/lib/libopencv_core.so: undefined reference to tbb::detail::r1::allocate(tbb::detail::d1::small_object_pool*&, unsigned long, tbb::detail::d1::execution_data const&)' 59.02 /usr/bin/ld: /usr/local/lib/libopencv_core.so: undefined reference totbb::detail::r1::execute(tbb::detail::d1::task_arena_base&, tbb::detail::d1::delegate_base&)' 59.02 /usr/bin/ld: /usr/local/lib/libopencv_core.so: undefined reference to tbb::detail::r1::terminate(tbb::detail::d1::task_arena_base&)' 59.02 /usr/bin/ld: /usr/local/lib/libopencv_core.so: undefined reference totbb::detail::r1::execute_and_wait(tbb::detail::d1::task&, tbb::detail::d1::task_group_context&, tbb::detail::d1::wait_context&, tbb::detail::d1::task_group_context&)' 59.02 /usr/bin/ld: /usr/local/lib/libopencv_core.so: undefined reference to tbb::detail::r1::initialize(tbb::detail::d1::task_group_context&)' 59.02 /usr/bin/ld: /usr/local/lib/libopencv_core.so: undefined reference totbb::detail::r1::is_group_execution_cancelled(tbb::detail::d1::task_group_context&)' 59.02 /usr/bin/ld: /usr/local/lib/libopencv_core.so: undefined reference to tbb::detail::r1::execution_slot(tbb::detail::d1::execution_data const*)' 59.02 /usr/bin/ld: /usr/local/lib/libopencv_core.so: undefined reference totbb::detail::r1::max_concurrency(tbb::detail::d1::task_arena_base const*)' 59.02 /usr/bin/ld: /usr/local/lib/libopencv_core.so: undefined reference to `tbb::detail::r1::notify_waiters(unsigned long)' 59.02 collect2: error: ld returned 1 exit status 59.02

WARNING: current commit information was not captured by the build: failed to read current commit information with git rev-parse --is-inside-work-tree

1 warning found (use docker --debug to expand):

Steps to Reproduce

dockerfile

to build this docker image:

docker build .

FROM ghcr.io/hybridgroup/opencv:4.10.0

ENV GOPATH /go

COPY . /go/src/gocv.io/x/gocv/

WORKDIR /go/src/gocv.io/x/gocv RUN go build -tags example -o /build/gocv_version ./cmd/version/

CMD ["/build/gocv_version"]

Your Environment