(no subject)

Vinod <[email protected]>
Newsgroups gmane.comp.security.detection.bro
Message-ID <CAPbeBdPLsBVLDsS77UDCXorTkzdTWiVT+-pmRwTsUeZ9zt71Aw@mail.gmail.com>
Hi,

I am trying to compile the Zeek XDP plugin (
https://github.com/irtimmer/bro-xdp_packet-plugin) and running into lots of
errors. posting the configuration and errors below

Host: Ubuntu 18.04
Kernels tested with: 4.18.0.18 and 5.1

Any help will be greatly appreciated.


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
Build Directory        : build
Bro Source Directory   : /home/neo/zeek
-- Bro executable      : /home/neo/zeek/build/src/bro
-- Bro source          : /home/neo/zeek
-- Bro build           : /home/neo/zeek/build
-- Bro install prefix  : /opt/bro
-- Bro plugin directory: /opt/bro/lib/bro/plugins
-- Bro debug mode      : false
-- Found KernelHeaders: /usr/src/linux-5.1
-- Configuring done
-- Generating done
-- Build files have been written to: /home/neo/bro-xdp_packet-plugin/build


neo@base-ubuntu:~/bro-xdp_packet-plugin$ make
Makefile:11: recipe for target 'build-it' failed
make: [build-it] Error 1 (ignored)
( cd build && make )
make[1]: Entering directory '/home/neo/bro-xdp_packet-plugin/build'
make[2]: Entering directory '/home/neo/bro-xdp_packet-plugin/build'
make[3]: Entering directory '/home/neo/bro-xdp_packet-plugin/build'
Scanning dependencies of target bif-plugin-irtimmer_af_xdp-af_xdp.bif
make[3]: Leaving directory '/home/neo/bro-xdp_packet-plugin/build'
make[3]: Entering directory '/home/neo/bro-xdp_packet-plugin/build'
[  7%] [BIFCL] Processing src/af_xdp.bif
make[3]: Leaving directory '/home/neo/bro-xdp_packet-plugin/build'
[  7%] Built target bif-plugin-irtimmer_af_xdp-af_xdp.bif
make[3]: Entering directory '/home/neo/bro-xdp_packet-plugin/build'
Scanning dependencies of target generate_outputs
make[3]: Leaving directory '/home/neo/bro-xdp_packet-plugin/build'
[  7%] Built target generate_outputs
make[3]: Entering directory '/home/neo/bro-xdp_packet-plugin/build'
Scanning dependencies of target af_xdp_bpf
make[3]: Leaving directory '/home/neo/bro-xdp_packet-plugin/build'
make[3]: Entering directory '/home/neo/bro-xdp_packet-plugin/build'
[ 15%] Generating af_xdp_bpf.ll
In file included from /home/neo/bro-xdp_packet-plugin/src/bpf/bpf.c:5:


























































*/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:75:11: error: use of
undeclared identifier 'BPF_FUNC_sock_ops_cb_flags_set'        (void *)
BPF_FUNC_sock_ops_cb_flags_set;
 ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:79:11: error: use
of undeclared identifier 'BPF_FUNC_sk_redirect_hash'        (void *)
BPF_FUNC_sk_redirect_hash;
 ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:85:11: error: use
of undeclared identifier 'BPF_FUNC_sock_hash_update'        (void *)
BPF_FUNC_sock_hash_update;
 ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:93:11: error: use
of undeclared identifier 'BPF_FUNC_override_return'        (void *)
BPF_FUNC_override_return;
 ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:95:11: error: use
of undeclared identifier 'BPF_FUNC_msg_redirect_map'        (void *)
BPF_FUNC_msg_redirect_map;
 ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:98:11: error: use
of undeclared identifier 'BPF_FUNC_msg_redirect_hash'        (void *)
BPF_FUNC_msg_redirect_hash;
 ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:100:11: error: use
of undeclared identifier 'BPF_FUNC_msg_apply_bytes'        (void *)
BPF_FUNC_msg_apply_bytes;
 ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:102:11: error: use
of undeclared identifier 'BPF_FUNC_msg_cork_bytes'        (void *)
BPF_FUNC_msg_cork_bytes;
 ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:104:11: error: use
of undeclared identifier 'BPF_FUNC_msg_pull_data'        (void *)
BPF_FUNC_msg_pull_data;
 ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:106:11: error: use
of undeclared identifier 'BPF_FUNC_bind'        (void *) BPF_FUNC_bind;
             ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:108:11:
error: use of undeclared identifier 'BPF_FUNC_xdp_adjust_tail'        (void
*) BPF_FUNC_xdp_adjust_tail;
 ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:111:11: error: use
of undeclared identifier 'BPF_FUNC_skb_get_xfrm_state'        (void *)
BPF_FUNC_skb_get_xfrm_state;
 ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:113:11: error: use
of undeclared identifier 'BPF_FUNC_get_stack'        (void *)
BPF_FUNC_get_stack;
 ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:114:48: warning:
declaration of 'struct bpf_fib_lookup' will not be visible outside of this
function [-Wvisibility]static int (*bpf_fib_lookup)(void *ctx, struct
bpf_fib_lookup *params,
 ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:116:11: error: use
of undeclared identifier 'BPF_FUNC_fib_lookup'        (void *)
BPF_FUNC_fib_lookup;
 ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:119:11: error: use
of undeclared identifier 'BPF_FUNC_lwt_push_encap'        (void *)
BPF_FUNC_lwt_push_encap;
 ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:122:11: error: use
of undeclared identifier 'BPF_FUNC_lwt_seg6_store_bytes'        (void *)
BPF_FUNC_lwt_seg6_store_bytes;
 ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:125:11: error: use
of undeclared identifier 'BPF_FUNC_lwt_seg6_action'        (void *)
BPF_FUNC_lwt_seg6_action;
 ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:128:11: error: use
of undeclared identifier 'BPF_FUNC_lwt_seg6_adjust_srh'        (void *)
BPF_FUNC_lwt_seg6_adjust_srh;
 ^/home/neo/bro-xdp_packet-plugin/src/bpf/bpf_helpers.h:130:11: error: use
of undeclared identifier 'BPF_FUNC_rc_repeat'        (void *)
BPF_FUNC_rc_repeat;*
                 ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
CMakeFiles/af_xdp_bpf.dir/build.make:64: recipe for target 'af_xdp_bpf.ll'
failed
make[3]: *** [af_xdp_bpf.ll] Error 1
make[3]: Leaving directory '/home/neo/bro-xdp_packet-plugin/build'
CMakeFiles/Makefile2:169: recipe for target 'CMakeFiles/af_xdp_bpf.dir/all'
failed
make[2]: *** [CMakeFiles/af_xdp_bpf.dir/all] Error 2
make[2]: Leaving directory '/home/neo/bro-xdp_packet-plugin/build'
Makefile:151: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/neo/bro-xdp_packet-plugin/build'
Makefile:11: recipe for target 'build-it' failed
make: *** [build-it] Error 2

Regards,
Vinod

_______________________________________________
Zeek mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/zeek
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.