I got an undefined reference error when building vyos-1x on Debian bullseye amd64:
cc -Wall -g -I../include/ -o xdp_prog_user common/common_params.o common/common_user_bpf_xdp.o \ xdp_prog_user.c -l:libbpf.a -lelf /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/libbpf.a(libbpf.o): undefined reference to symbol 'gzopen64@@ZLIB_1.2.3.3' /usr/bin/ld: /lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make: *** [common/common.mk:89: xdp_prog_user] Error 1
Seems zlib is missing when linking xdp and libbpf.
I don't know why VyOS's office build system doesn't have this issue. But I think it would be better to update the build script to explicitly link with zlib.