Hello,
My name is Vivek. I'm a Computer Science major from Canada.

I was trying to install DPDK but encountered this error. I am familiar with
BPF programming so tried to look into the compat.h file but the
build/af_xdp directory was empty after I got the error message. I've
attached a txt file that shows the terminal output

I ran the following scripts:
meson build
ninja -C build

Could you please direct me to the right direction for building DPDK
properly? I am on Linux Mint. Are there dependencies that I should've
instaslled?

Best Regards,
V
[1/1853] Linking static target drivers/libtmp_rte_net_avp.a
[2/1853] Linking static target drivers/libtmp_rte_net_axgbe.a
[3/1853] Generating drivers/rte_net_axgbe.pmd.c with a custom command
[4/1853] Generating drivers/rte_net_avp.pmd.c with a custom command
[5/1853] Compiling C object 
drivers/librte_net_axgbe.a.p/meson-generated_.._rte_net_axgbe.pmd.c.o
[6/1853] Compiling C object 
drivers/librte_net_avp.a.p/meson-generated_.._rte_net_avp.pmd.c.o
[7/1853] Linking static target drivers/librte_net_avp.a
[8/1853] Linking static target drivers/librte_net_axgbe.a
[9/1853] Compiling C object 
drivers/librte_net_axgbe.so.25.0.p/meson-generated_.._rte_net_axgbe.pmd.c.o
[10/1853] Compiling C object 
drivers/librte_net_avp.so.25.0.p/meson-generated_.._rte_net_avp.pmd.c.o
[11/1853] Linking target drivers/librte_net_axgbe.so.25.0
[12/1853] Linking target drivers/librte_net_avp.so.25.0
[13/1853] Compiling C object 
drivers/libtmp_rte_net_af_xdp.a.p/net_af_xdp_rte_eth_af_xdp.c.o
FAILED: drivers/libtmp_rte_net_af_xdp.a.p/net_af_xdp_rte_eth_af_xdp.c.o 
cc -Idrivers/libtmp_rte_net_af_xdp.a.p -Idrivers -I../drivers 
-Idrivers/net/af_xdp -I../drivers/net/af_xdp -Ilib/ethdev -I../lib/ethdev -I. 
-I.. -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include 
-Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include 
-I../lib/eal/x86/include -I../kernel/linux -Ilib/eal/common -I../lib/eal/common 
-Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log 
-Ilib/metrics -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/net 
-I../lib/net -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring 
-I../lib/ring -Ilib/meter -I../lib/meter -Idrivers/bus/pci -I../drivers/bus/pci 
-I../drivers/bus/pci/linux -Ilib/pci -I../lib/pci -Idrivers/bus/vdev 
-I../drivers/bus/vdev -I/usr/local/include -fdiagnostics-color=always 
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -O3 -include 
rte_config.h -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral 
-Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs 
-Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes 
-Wundef -Wwrite-strings -Wno-packed-not-aligned -Wno-missing-field-initializers 
-D_GNU_SOURCE -fPIC -march=native -mrtm -DALLOW_EXPERIMENTAL_API 
-DALLOW_INTERNAL_API -Wno-format-truncation -Wno-address-of-packed-member 
-DRTE_NET_AF_XDP_LIBXDP -DRTE_NET_AF_XDP_SHARED_UMEM -DETH_AF_XDP_UPDATE_XSKMAP 
-DRTE_LOG_DEFAULT_LOGTYPE=pmd.net.af_xdp -MD -MQ 
drivers/libtmp_rte_net_af_xdp.a.p/net_af_xdp_rte_eth_af_xdp.c.o -MF 
drivers/libtmp_rte_net_af_xdp.a.p/net_af_xdp_rte_eth_af_xdp.c.o.d -o 
drivers/libtmp_rte_net_af_xdp.a.p/net_af_xdp_rte_eth_af_xdp.c.o -c 
../drivers/net/af_xdp/rte_eth_af_xdp.c
In file included from ../drivers/net/af_xdp/rte_eth_af_xdp.c:42:
../drivers/net/af_xdp/compat.h: In function ‘load_program’:
../drivers/net/af_xdp/compat.h:108:29: error: incompatible type for argument 1 
of ‘bpf_prog_load’
  108 |         ret = bpf_prog_load(prog_path, BPF_PROG_TYPE_XDP, obj, 
&prog_fd);
      |                             ^~~~~~~~~
      |                             |
      |                             const char *
In file included from ../drivers/net/af_xdp/compat.h:10,
                 from ../drivers/net/af_xdp/rte_eth_af_xdp.c:42:
/usr/include/bpf/bpf.h:109:49: note: expected ‘enum bpf_prog_type’ but argument 
is of type ‘const char *’
  109 | LIBBPF_API int bpf_prog_load(enum bpf_prog_type prog_type,
      |                              ~~~~~~~~~~~~~~~~~~~^~~~~~~~~
In file included from ../drivers/net/af_xdp/rte_eth_af_xdp.c:42:
../drivers/net/af_xdp/compat.h:108:40: warning: passing argument 2 of 
‘bpf_prog_load’ makes pointer from integer without a cast [-Wint-conversion]
  108 |         ret = bpf_prog_load(prog_path, BPF_PROG_TYPE_XDP, obj, 
&prog_fd);
      |                                        ^~~~~~~~~~~~~~~~~
      |                                        |
      |                                        int
In file included from ../drivers/net/af_xdp/compat.h:10,
                 from ../drivers/net/af_xdp/rte_eth_af_xdp.c:42:
/usr/include/bpf/bpf.h:110:42: note: expected ‘const char *’ but argument is of 
type ‘int’
  110 |                              const char *prog_name, const char *license,
      |                              ~~~~~~~~~~~~^~~~~~~~~
In file included from ../drivers/net/af_xdp/rte_eth_af_xdp.c:42:
../drivers/net/af_xdp/compat.h:108:59: warning: passing argument 3 of 
‘bpf_prog_load’ from incompatible pointer type [-Wincompatible-pointer-types]
  108 |         ret = bpf_prog_load(prog_path, BPF_PROG_TYPE_XDP, obj, 
&prog_fd);
      |                                                           ^~~
      |                                                           |
      |                                                           struct 
bpf_object **
In file included from ../drivers/net/af_xdp/compat.h:10,
                 from ../drivers/net/af_xdp/rte_eth_af_xdp.c:42:
/usr/include/bpf/bpf.h:110:65: note: expected ‘const char *’ but argument is of 
type ‘struct bpf_object **’
  110 |                              const char *prog_name, const char *license,
      |                                                     ~~~~~~~~~~~~^~~~~~~
In file included from ../drivers/net/af_xdp/rte_eth_af_xdp.c:42:
../drivers/net/af_xdp/compat.h:108:64: warning: passing argument 4 of 
‘bpf_prog_load’ from incompatible pointer type [-Wincompatible-pointer-types]
  108 |         ret = bpf_prog_load(prog_path, BPF_PROG_TYPE_XDP, obj, 
&prog_fd);
      |                                                                ^~~~~~~~
      |                                                                |
      |                                                                int *
In file included from ../drivers/net/af_xdp/compat.h:10,
                 from ../drivers/net/af_xdp/rte_eth_af_xdp.c:42:
/usr/include/bpf/bpf.h:111:53: note: expected ‘const struct bpf_insn *’ but 
argument is of type ‘int *’
  111 |                              const struct bpf_insn *insns, size_t 
insn_cnt,
      |                              ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
In file included from ../drivers/net/af_xdp/rte_eth_af_xdp.c:42:
../drivers/net/af_xdp/compat.h:108:15: error: too few arguments to function 
‘bpf_prog_load’
  108 |         ret = bpf_prog_load(prog_path, BPF_PROG_TYPE_XDP, obj, 
&prog_fd);
      |               ^~~~~~~~~~~~~
In file included from ../drivers/net/af_xdp/compat.h:10,
                 from ../drivers/net/af_xdp/rte_eth_af_xdp.c:42:
/usr/include/bpf/bpf.h:109:16: note: declared here
  109 | LIBBPF_API int bpf_prog_load(enum bpf_prog_type prog_type,
      |                ^~~~~~~~~~~~~
../drivers/net/af_xdp/rte_eth_af_xdp.c: In function ‘link_xdp_prog_with_dev’:
../drivers/net/af_xdp/rte_eth_af_xdp.c:962:16: warning: implicit declaration of 
function ‘bpf_set_link_xdp_fd’; did you mean ‘bpf_link__fd’? 
[-Wimplicit-function-declaration]
  962 |         return bpf_set_link_xdp_fd(ifindex, fd, flags);
      |                ^~~~~~~~~~~~~~~~~~~
      |                bpf_link__fd
../drivers/net/af_xdp/rte_eth_af_xdp.c:962:16: warning: nested extern 
declaration of ‘bpf_set_link_xdp_fd’ [-Wnested-externs]
../drivers/net/af_xdp/rte_eth_af_xdp.c: In function ‘remove_xdp_program’:
../drivers/net/af_xdp/rte_eth_af_xdp.c:971:15: warning: implicit declaration of 
function ‘bpf_get_link_xdp_id’ [-Wimplicit-function-declaration]
  971 |         ret = bpf_get_link_xdp_id(internals->if_index, &curr_prog_id,
      |               ^~~~~~~~~~~~~~~~~~~
../drivers/net/af_xdp/rte_eth_af_xdp.c:971:15: warning: nested extern 
declaration of ‘bpf_get_link_xdp_id’ [-Wnested-externs]
[14/1853] Compiling C object 
drivers/libtmp_rte_net_bnx2x.a.p/net_bnx2x_bnx2x_vfpf.c.o
[15/1853] Compiling C object 
drivers/libtmp_rte_net_bnx2x.a.p/net_bnx2x_bnx2x_ethdev.c.o
[16/1853] Compiling C object 
drivers/libtmp_rte_net_bnx2x.a.p/net_bnx2x_bnx2x_rxtx.c.o
[17/1853] Compiling C object 
drivers/libtmp_rte_net_bnxt.a.p/net_bnxt_bnxt_cpr.c.o
[18/1853] Compiling C object 
drivers/libtmp_rte_net_bnx2x.a.p/net_bnx2x_ecore_sp.c.o
[19/1853] Compiling C object 
drivers/net/bnxt/libbnxt_avx2_lib.a.p/bnxt_rxtx_vec_avx2.c.o
[20/1853] Compiling C object 
drivers/libtmp_rte_net_bnx2x.a.p/net_bnx2x_bnx2x_stats.c.o
[21/1853] Compiling C object 
drivers/libtmp_rte_net_bnx2x.a.p/net_bnx2x_bnx2x.c.o
[22/1853] Compiling C object 
drivers/libtmp_rte_net_bnx2x.a.p/net_bnx2x_elink.c.o
ninja: build stopped: subcommand failed.

Reply via email to