OpenCloudOS / nettrace

nettrace is a eBPF-based tool to trace network packet and diagnose network problem.
Other
326 stars 80 forks source link

libzstd依赖问题导致编译出错 #122

Closed yan-ace62 closed 1 month ago

yan-ace62 commented 1 month ago

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/libelf.a(elf_compress.o): in function__libelf_compress':(.text+0x113): undefined reference to `ZSTD_createCCtx'

出问题是因为libelf依赖libzstd,libzstd静态链接flag缺失导致编译失败。 输入 pkg-config -libs --static 提示链接flag为-lzstd -pthread 在Makefile中增加-lzstd就能正常编译了。