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
When deploying the binary, it also expects the library (.so file) available at system level
I tried keeping this file next to the binary but it did not work
Is there a way to statically compile in golang so one binary has all its dependencies?
What I tried
go build -ldflags="-extldflags=-static"
Error I got
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: cannot find -lobjectbox: No such file or directory
/usr/bin/ld: /tmp/go-link-2309517836/000004.o: in function `_cgo_cbcce81e6342_C2func_getaddrinfo':
/tmp/go-build/cgo-gcc-prolog:58: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status
The text was updated successfully, but these errors were encountered:
Description
When deploying the binary, it also expects the library (
.so
file) available at system levelI tried keeping this file next to the binary but it did not work
Is there a way to statically compile in golang so one binary has all its dependencies?
What I tried
Error I got
The text was updated successfully, but these errors were encountered: