Skip to content

Static binary build warns about 'getpwuid' #21

@diafour

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions