Page MenuHomeVyOS Platform

vyos-1x: xdp build error
Closed, InvalidPublic

Description

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.

Details

Difficulty level
Unknown (require assessment)
Version
1.4
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Internal change (not visible to end users)

Event Timeline

vfreex triaged this task as Normal priority.Jul 22 2022, 7:19 AM
vfreex created this task.
vfreex created this object in space S1 VyOS Public.
vfreex added a project: VyOS 1.4 Sagitta.
vfreex changed Version from - to 1.4.
vfreex changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
vfreex changed Issue type from Unspecified (please specify) to Internal change (not visible to end users).
Viacheslav added a subscriber: Viacheslav.

XDP was dropped
The task is not an actual