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
Ubuntu 24.04 links libelf.so against libzstd.so. This doesn't matter at all for dynamically linked builds, but if you want a link a fully static binary, you need -l zstd in CGO_LDFLAGS. Currently libbpfgo only has:
# If libelf is new and it links to zstd, then zstd needs to be manually linked in.ifneq ($(shell ldd $(shell /sbin/ldconfig -n -p | grep libelf.so.1 | awk '{ print $$NF }') | grep zstd),)
CGO_LDFLAGS := $(CGO_LDFLAGS) -l zstd
endif
Perhaps there's a better way in libbpfgo itself.
The text was updated successfully, but these errors were encountered:
Thanks @bobrik. zstd is indeed a requirement depending on the environment when a static build is the target. I'll be bumping this repo as soon as possible and tackling that.
Ubuntu 24.04 links
libelf.so
againstlibzstd.so
. This doesn't matter at all for dynamically linked builds, but if you want a link a fully static binary, you need-l zstd
inCGO_LDFLAGS
. Currentlylibbpfgo
only has:I worked around this in
ebpf_exporter
:Perhaps there's a better way in
libbpfgo
itself.The text was updated successfully, but these errors were encountered: