mtcp-stack / mtcp

mTCP: A Highly Scalable User-level TCP Stack for Multicore Systems
Other
1.98k stars 436 forks source link

Build failure on kernel 4.14 #188

Closed zER0pAGe-1 closed 6 years ago

zER0pAGe-1 commented 6 years ago

Hi, I tried to build dpdk on archlinux with kernel 4.14, gcc version 7.3.1 and encountered a DPDK build error.

Configuration done using x86_64-native-linuxapp-gcc
== Build lib
== Build lib/librte_compat
== Build lib/librte_eal
== Build lib/librte_eal/common
== Build lib/librte_eal/linuxapp
== Build lib/librte_eal/linuxapp/eal
== Build lib/librte_eal/linuxapp/igb_uio
/root/net/mtcp/dpdk-17.08/lib/librte_eal/linuxapp/igb_uio/i40e/common.mk:157: Missing System.map file - depmod will not check for missing symbols
/root/net/mtcp/dpdk-17.08/lib/librte_eal/linuxapp/igb_uio/i40e/common.mk:157: Missing System.map file - depmod will not check for missing symbols
  CC [M]  /root/net/mtcp/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/i40e_main.o
/root/net/mtcp/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/i40e_main.c:5750:28: error: 'struct tc_to_netdev' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
       __be16 proto, struct tc_to_netdev *tc)
                            ^~~~~~~~~~~~
/root/net/mtcp/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/i40e_main.c: In function '__i40e_setup_tc':
/root/net/mtcp/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/i40e_main.c:5754:8: error:dereferencing pointer to incomplete type 'struct tc_to_netdev'
  if (tc->type != TC_SETUP_MQPRIO)
        ^~
/root/net/mtcp/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/i40e_main.c: At top level:
/root/net/mtcp/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/i40e_main.c:9950:19: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .ndo_setup_tc  = __i40e_setup_tc,
                   ^~~~~~~~~~~~~~~
/root/net/mtcp/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/i40e_main.c:9950:19: note:(near initialization for 'i40e_netdev_ops.ndo_setup_tc')
/root/net/mtcp/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/i40e_main.c: In function '__i40e_setup_tc':
/root/net/mtcp/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/i40e_main.c:5761:1: error:control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1: all warnings being treated as errors
make[10]: *** [/usr/lib/modules/4.14.36-1-lts/build/scripts/Makefile.build:329: /root/net/mtcp/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/i40e_main.o] Error 1
make[9]: *** [/usr/lib/modules/4.14.36-1-lts/build/Makefile:1528: _module_/root/net/mtcp/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio] Error 2
make[8]: *** [Makefile:146: sub-make] Error 2
make[7]: *** [/root/net/mtcp/dpdk-17.08/mk/rte.module.mk:79: igb_uio.ko] Error 2
make[6]: *** [/root/net/mtcp/dpdk-17.08/mk/rte.subdir.mk:65: igb_uio] Error 2
make[5]: *** [/root/net/mtcp/dpdk-17.08/mk/rte.subdir.mk:65: linuxapp] Error 2
make[4]: *** [/root/net/mtcp/dpdk-17.08/mk/rte.subdir.mk:65: librte_eal] Error 2
make[3]: *** [/root/net/mtcp/dpdk-17.08/mk/rte.sdkbuild.mk:78: lib] Error 2
make[2]: *** [/root/net/mtcp/dpdk-17.08/mk/rte.sdkroot.mk:129: all] Error 2
make[1]: *** [/root/net/mtcp/dpdk-17.08/mk/rte.sdkinstall.mk:86: pre_install] Error 2
make: *** [/root/net/mtcp/dpdk-17.08/mk/rte.sdkroot.mk:107: install] Error 2

The dpdk-18.02 version will not trigger the error, so would you plzzzzz update the DPDK to 18.02 or give me some tips on how to alter the relevent dpdk code to adapt to mTCP?

ajamshed commented 6 years ago

Thanks @convexcat for reporting the compile time error. Can you try running the latest code in the devel branch? I have done some fixes to the code. Please let me know if you see any other issues.