libjq-go icon indicating copy to clipboard operation
libjq-go copied to clipboard

Static binary build warns about 'getpwuid'

Open diafour opened this issue 5 years ago • 0 comments

root@303b4a33c9cd:/go/libjq-go/example# CGO_ENABLED=1 CGO_CFLAGS="-I$(pwd)/libjq-buster/include" CGO_LDFLAGS="-L$(pwd)/libjq-buster/lib" go build -ldflags="-linkmode external -extldflags '-static' -s -w" example.go
# command-line-arguments
/usr/bin/ld: /go/libjq-go/example/libjq-buster/lib/libjq.a(util.o): in function `get_home':
util.c:(.text+0x2be): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

Produced binary still works though. Should test it with library path expanding...

diafour avatar Nov 22 '20 09:11 diafour