<div dir="ltr">Hi, <div><br></div><div>I am trying to compile the Zeek XDP plugin (<a href="https://github.com/irtimmer/bro-xdp_packet-plugin">https://github.com/irtimmer/bro-xdp_packet-plugin</a>) and running into lots of errors. posting the configuration and errors below</div><div><br></div><div>Host: Ubuntu 18.04</div><div>Kernels tested with: 4.18.0.18 and 5.1</div><div><br></div><div>Any help will be greatly appreciated.</div><div><br></div><div><br></div><div>neo@base-ubuntu:~/bro-xdp_packet-plugin$ ./configure --bro-dist=/home/neo/zeek --with-kernel=/usr/src/linux-5.1 --with-bpf=/usr/local --with-clang=/usr/bin/clang --with-llc=/usr/bin/llc<br>Build Directory        : build<br>Bro Source Directory   : /home/neo/zeek<br>-- Bro executable      : /home/neo/zeek/build/src/bro<br>-- Bro source          : /home/neo/zeek<br>-- Bro build           : /home/neo/zeek/build<br>-- Bro install prefix  : /opt/bro<br>-- Bro plugin directory: /opt/bro/lib/bro/plugins<br>-- Bro debug mode      : false<br>-- Found KernelHeaders: /usr/src/linux-5.1  <br>-- Configuring done<br>-- Generating done<br>-- Build files have been written to: /home/neo/bro-xdp_packet-plugin/build<br><br><br>neo@base-ubuntu:~/bro-xdp_packet-plugin$ make<br>Makefile:11: recipe for target &#39;build-it&#39; failed<br>make: [build-it] Error 1 (ignored)<br>( cd build &amp;&amp; make )<br>make[1]: Entering directory &#39;/home/neo/bro-xdp_packet-plugin/build&#39;<br>make[2]: Entering directory &#39;/home/neo/bro-xdp_packet-plugin/build&#39;<br>make[3]: Entering directory &#39;/home/neo/bro-xdp_packet-plugin/build&#39;<br>Scanning dependencies of target bif-plugin-irtimmer_af_xdp-af_xdp.bif<br>make[3]: Leaving directory &#39;/home/neo/bro-xdp_packet-plugin/build&#39;<br>make[3]: Entering directory &#39;/home/neo/bro-xdp_packet-plugin/build&#39;<br>[  7%] [BIFCL] Processing src/af_xdp.bif<br>make[3]: Leaving directory &#39;/home/neo/bro-xdp_packet-plugin/build&#39;<br>[  7%] Built target bif-plugin-irtimmer_af_xdp-af_xdp.bif<br>make[3]: Entering directory &#39;/home/neo/bro-xdp_packet-plugin/build&#39;<br>Scanning dependencies of target generate_outputs<br>make[3]: Leaving directory &#39;/home/neo/bro-xdp_packet-plugin/build&#39;<br>[  7%] Built target generate_outputs<br>make[3]: Entering directory &#39;/home/neo/bro-xdp_packet-plugin/build&#39;<br>Scanning dependencies of target af_xdp_bpf<br>make[3]: Leaving directory &#39;/home/neo/bro-xdp_packet-plugin/build&#39;<br>make[3]: Entering directory &#39;/home/neo/bro-xdp_packet-plugin/build&#39;<br>[ 15%] Generating af_xdp_bpf.ll<br>In file included from /home/neo/bro-xdp_packet-plugin/src/bpf/bpf.c:5:<br><b>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:75:11: error: use of undeclared identifier &#39;BPF_FUNC_sock_ops_cb_flags_set&#39;<br>        (void *) BPF_FUNC_sock_ops_cb_flags_set;<br>                 ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:79:11: error: use of undeclared identifier &#39;BPF_FUNC_sk_redirect_hash&#39;<br>        (void *) BPF_FUNC_sk_redirect_hash;<br>                 ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:85:11: error: use of undeclared identifier &#39;BPF_FUNC_sock_hash_update&#39;<br>        (void *) BPF_FUNC_sock_hash_update;<br>                 ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:93:11: error: use of undeclared identifier &#39;BPF_FUNC_override_return&#39;<br>        (void *) BPF_FUNC_override_return;<br>                 ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:95:11: error: use of undeclared identifier &#39;BPF_FUNC_msg_redirect_map&#39;<br>        (void *) BPF_FUNC_msg_redirect_map;<br>                 ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:98:11: error: use of undeclared identifier &#39;BPF_FUNC_msg_redirect_hash&#39;<br>        (void *) BPF_FUNC_msg_redirect_hash;<br>                 ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:100:11: error: use of undeclared identifier &#39;BPF_FUNC_msg_apply_bytes&#39;<br>        (void *) BPF_FUNC_msg_apply_bytes;<br>                 ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:102:11: error: use of undeclared identifier &#39;BPF_FUNC_msg_cork_bytes&#39;<br>        (void *) BPF_FUNC_msg_cork_bytes;<br>                 ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:104:11: error: use of undeclared identifier &#39;BPF_FUNC_msg_pull_data&#39;<br>        (void *) BPF_FUNC_msg_pull_data;<br>                 ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:106:11: error: use of undeclared identifier &#39;BPF_FUNC_bind&#39;<br>        (void *) BPF_FUNC_bind;<br>                 ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:108:11: error: use of undeclared identifier &#39;BPF_FUNC_xdp_adjust_tail&#39;<br>        (void *) BPF_FUNC_xdp_adjust_tail;<br>                 ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:111:11: error: use of undeclared identifier &#39;BPF_FUNC_skb_get_xfrm_state&#39;<br>        (void *) BPF_FUNC_skb_get_xfrm_state;<br>                 ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:113:11: error: use of undeclared identifier &#39;BPF_FUNC_get_stack&#39;<br>        (void *) BPF_FUNC_get_stack;<br>                 ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:114:48: warning: declaration of &#39;struct bpf_fib_lookup&#39; will not be visible outside of this function [-Wvisibility]<br>static int (*bpf_fib_lookup)(void *ctx, struct bpf_fib_lookup *params,<br>                                               ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:116:11: error: use of undeclared identifier &#39;BPF_FUNC_fib_lookup&#39;<br>        (void *) BPF_FUNC_fib_lookup;<br>                 ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:119:11: error: use of undeclared identifier &#39;BPF_FUNC_lwt_push_encap&#39;<br>        (void *) BPF_FUNC_lwt_push_encap;<br>                 ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:122:11: error: use of undeclared identifier &#39;BPF_FUNC_lwt_seg6_store_bytes&#39;<br>        (void *) BPF_FUNC_lwt_seg6_store_bytes;<br>                 ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:125:11: error: use of undeclared identifier &#39;BPF_FUNC_lwt_seg6_action&#39;<br>        (void *) BPF_FUNC_lwt_seg6_action;<br>                 ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:128:11: error: use of undeclared identifier &#39;BPF_FUNC_lwt_seg6_adjust_srh&#39;<br>        (void *) BPF_FUNC_lwt_seg6_adjust_srh;<br>                 ^<br>/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:130:11: error: use of undeclared identifier &#39;BPF_FUNC_rc_repeat&#39;<br>        (void *) BPF_FUNC_rc_repeat;</b><br>                 ^<br>fatal error: too many errors emitted, stopping now [-ferror-limit=]<br>1 warning and 20 errors generated.<br>CMakeFiles/af_xdp_bpf.dir/build.make:64: recipe for target &#39;af_xdp_bpf.ll&#39; failed<br>make[3]: *** [af_xdp_bpf.ll] Error 1<br>make[3]: Leaving directory &#39;/home/neo/bro-xdp_packet-plugin/build&#39;<br>CMakeFiles/Makefile2:169: recipe for target &#39;CMakeFiles/af_xdp_bpf.dir/all&#39; failed<br>make[2]: *** [CMakeFiles/af_xdp_bpf.dir/all] Error 2<br>make[2]: Leaving directory &#39;/home/neo/bro-xdp_packet-plugin/build&#39;<br>Makefile:151: recipe for target &#39;all&#39; failed<br>make[1]: *** [all] Error 2<br>make[1]: Leaving directory &#39;/home/neo/bro-xdp_packet-plugin/build&#39;<br>Makefile:11: recipe for target &#39;build-it&#39; failed<br>make: *** [build-it] Error 2<br></div><div><br></div><div>Regards,</div><div>Vinod</div></div>