medvedv / purifier

BSD 3-Clause "New" or "Revised" License
41 stars 10 forks source link

Unable to compile #3

Closed Onepamopa closed 7 years ago

Onepamopa commented 8 years ago

I tried with ubuntu 14.04 - it's very old, no longer supported, so I moved on 14.04.4 After few struggles I managed to compile dpdk-2.2.0 (all older versions - unable to compile at all)

Here's what happens when I try to compile the "src":

make

CC main.o /home/user/purifier/src/main.c:162:1: error: missing initializer for field ‘vmdq_dcb_conf’ of ‘struct ’ [-Werror=missing-field-initializers] }; ^ In file included from /home/user/purifier/src/main.c:49:0: /home/user/purifier/dpdk-2.2.0/build/include/rte_ethdev.h:776:32: note: ‘vmdq_dcb_conf’ declared here struct rte_eth_vmdq_dcb_conf vmdq_dcb_conf; ^ /home/user/purifier/src/main.c: In function ‘prf_send_packet’: /home/user/purifier/src/main.c:242:3: error: ‘struct rte_mbuf’ has no member named ‘pkt’ m->pkt.vlan_macip.f.l2_len = sizeof(struct ether_hdr); ^ /home/user/purifier/src/main.c:243:3: error: ‘struct rte_mbuf’ has no member named ‘pkt’ m->pkt.vlan_macip.f.l3_len = sizeof(struct ipv4_hdr); ^ In file included from /home/user/purifier/src/main.c:45:0: /home/user/purifier/src/main.c: In function ‘tcp_sanity_check’: /home/user/purifier/src/main.c:311:32: error: ‘PKT_RX_IPV4_HDR’ undeclared (first use in this function) if (unlikely(((m->ol_flags & PKT_RX_IPV4_HDR) != PKT_RX_IPV4_HDR) || ^ /home/user/purifier/dpdk-2.2.0/build/include/rte_branch_prediction.h:67:40: note: in definition of macro ‘unlikely’

define unlikely(x) __builtin_expect((x),0)

                                    ^

/home/user/purifier/src/main.c:311:32: note: each undeclared identifier is reported only once for each function it appears in if (unlikely(((m->ol_flags & PKT_RX_IPV4_HDR) != PKT_RX_IPV4_HDR) || ^ /home/user/purifier/dpdk-2.2.0/build/include/rte_branch_prediction.h:67:40: note: in definition of macro ‘unlikely’

define unlikely(x) __builtin_expect((x),0)

                                    ^

/home/user/purifier/src/main.c:326:38: error: ‘struct rte_mbuf’ has no member named ‘pkt’ ret = is_valid_ipv4_pkt(ipv4_hdr, m->pkt.data_len - sizeof(struct ether_hdr)); ^ /home/user/purifier/src/main.c: In function ‘init_nic’: /home/user/purifier/src/main.c:521:27: error: storage size of ‘filter’ isn’t known struct rte_5tuple_filter filter; ^ /home/user/purifier/src/main.c:548:3: error: invalid use of undefined type ‘struct rte_eth_rss_reta’ reta_conf.reta[i] = j; ^ /home/user/purifier/src/main.c:550:2: error: invalid use of undefined type ‘struct rte_eth_rss_reta’ reta_conf.mask_lo = 0xffffffffffffffff; ^ /home/user/purifier/src/main.c:551:2: error: invalid use of undefined type ‘struct rte_eth_rss_reta’ reta_conf.mask_hi = 0xffffffffffffffff; ^ /home/user/purifier/src/main.c:573:3: error: passing argument 2 of ‘rte_eth_dev_rss_reta_update’ from incompatible pointer type [-Werror] ret = rte_eth_dev_rss_reta_update(portid, &reta_conf); ^ In file included from /home/user/purifier/src/main.c:49:0: /home/user/purifier/dpdk-2.2.0/build/include/rte_ethdev.h:2966:5: note: expected ‘struct rte_eth_rss_retaentry64 ’ but argument is of type ‘struct rte_eth_rss_reta ’ int rte_eth_dev_rss_reta_update(uint8_t port, ^ /home/user/purifier/src/main.c:573:3: error: too few arguments to function ‘rte_eth_dev_rss_reta_update’ ret = rte_eth_dev_rss_reta_update(portid, &reta_conf); ^ In file included from /home/user/purifier/src/main.c:49:0: /home/user/purifier/dpdk-2.2.0/build/include/rte_ethdev.h:2966:5: note: declared here int rte_eth_dev_rss_reta_update(uint8_t port, ^ /home/user/purifier/src/main.c:577:29: error: invalid application of ‘sizeof’ to incomplete type ‘struct rte_5tuple_filter’ memset(&filter, 0, sizeof(struct rte_5tuple_filter)); ^ /home/user/purifier/src/main.c:586:3: error: implicit declaration of function ‘rte_eth_dev_add_5tuple_filter’ [-Werror=implicit-function-declaration] ret = rte_eth_dev_add_5tuple_filter(portid, 1, &filter, 0); ^ /home/user/purifier/src/main.c:586:3: error: nested extern declaration of ‘rte_eth_dev_add_5tuple_filter’ [-Werror=nested-externs] /home/user/purifier/src/main.c:521:27: error: unused variable ‘filter’ [-Werror=unused-variable] struct rte_5tuple_filter filter; ^ cc1: all warnings being treated as errors make[1]: _* [main.o] Error 1 make: *\ [all] Error 2

Any ideas ?

medvedv commented 7 years ago

Hi,

Recently purifier was adopted for current DPDK version - 16.07 so you can try latest Ubuntu with latest dpdk release.