Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build error on debian 12 arm64 docker #1252

Open
djzzwx opened this issue Nov 19, 2024 · 0 comments
Open

build error on debian 12 arm64 docker #1252

djzzwx opened this issue Nov 19, 2024 · 0 comments

Comments

@djzzwx
Copy link

djzzwx commented Nov 19, 2024

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 to tbb::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 to tbb::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 to tbb::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 to tbb::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 to tbb::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 to tbb::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):

  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 5)
    Dockerfile:10

8 |
9 | WORKDIR /go/src/gocv.io/x/gocv
10 | >>> RUN go build -tags example -o /build/gocv_version ./cmd/version/
11 |
12 | CMD ["/build/gocv_version"]

ERROR: failed to solve: process "/bin/sh -c go build -tags example -o /build/gocv_version ./cmd/version/" did not complete successfully: exit code: 1

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

  • Operating System and version: debian12 arm64
  • OpenCV version used: 4.10.0
  • How did you install OpenCV? docker
  • GoCV version used: latest
  • Go version: 1.23
  • Did you run the env.sh or env.cmd script before trying to go run or go build?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant