cloudflare-blog
cloudflare-blog copied to clipboard
Build fails for echo-sockmap target
Hi I am trying to build echo-sockmap target and it fails since echo-sockmap-ebpf.c is not in the repo (it is in the .gitignore and probably was not pushed) If I try to remove this file from Makefile I get
2019-02-tcp-splice/echo-sockmap.c:43: undefined reference to bpf_reloc_prog_verdict' 2019-02-tcp-splice/echo-sockmap.c:43: undefined reference to bpf_insn_prog_verdict'
2019-02-tcp-splice/echo-sockmap.c:48: undefined reference to bpf_insn_prog_parser_cnt' 2019-02-tcp-splice/echo-sockmap.c:48: undefined reference to bpf_insn_prog_parser'
2019-02-tcp-splice/echo-sockmap.c:57: undefined reference to bpf_insn_prog_verdict_cnt' 2019-02-tcp-splice/echo-sockmap.c:57: undefined reference to bpf_insn_prog_verdict'
Please advise. Thanks!
Hi @salieri11 ,
echo-sockmap-bpf.c file gets generated when building the project with the following command found in Makefile
clang -Wall -Wextra -O2 -emit-llvm -c \
echo-sockmap-kern.c \
-S -o - \
| llc -march=bpf -filetype=obj -o - \
| ./venv/bin/python3 tbpf-decode-elf.py /dev/stdin \
prog_parser prog_verdict \
> echo-sockmap-ebpf.c
Try running it manually to see if any of the commands fails and shows any errors.