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

Static binary build warns about 'getpwuid' #21

Open
diafour opened this issue Nov 22, 2020 · 0 comments
Open

Static binary build warns about 'getpwuid' #21

diafour opened this issue Nov 22, 2020 · 0 comments

Comments

@diafour
Copy link
Contributor

diafour commented Nov 22, 2020

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...

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