gocv icon indicating copy to clipboard operation
gocv copied to clipboard

Installation with static libs fails

Open DarkiT opened this issue 1 year ago • 2 comments

Description

I have a pretty much clean Ubuntu 20.04 environment where I want to run gocv. The normal installation runs fine, but if I try to run it with BUILD_SHARED_LIBS=OFF the installation fails with

root@53ee82285d3a:/go/gocv# go build -tags static --ldflags '-extldflags "-static"' -v -tags customenv . /usr/local/go/pkg/tool/linux_amd64/link: running g++ failed: exit status 1 /usr/bin/ld: cannot find -lIconv::Iconv /usr/bin/ld: /go/opencv/build/lib/libopencv_core.a(opencl_core.cpp.o): in function `opencl_check_fn(int)': opencl_core.cpp:(.text._ZL15opencl_check_fni+0xea): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/bin/ld: cannot find -lIconv::Iconv collect2: error: ld returned 1 exit status

DarkiT avatar Jan 19 '23 07:01 DarkiT