mOS-networking-stack
mOS-networking-stack copied to clipboard
Error compile dpdk
system: centos 6.8 kernel: 3.10.105-1.el6.elrepo.x86_64
These problems occurred when I compiled DPDK.
make[5]: Nothing to be done for `depdirs'. Configuration done == 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 CC eal.o In file included from /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c:58: /data/disk1/software/mosapp/drivers/dpdk-16.11/x86_64-native-linuxapp-gcc/include/rte_debug.h:82:5: warning: "RTE_LOG_LEVEL" is not defined In file included from /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c:59: /data/disk1/software/mosapp/drivers/dpdk-16.11/x86_64-native-linuxapp-gcc/include/rte_memory.h:81:5: warning: "RTE_CACHE_LINE_SIZE" is not defined /data/disk1/software/mosapp/drivers/dpdk-16.11/x86_64-native-linuxapp-gcc/include/rte_memory.h:83:7: warning: "RTE_CACHE_LINE_SIZE" is not defined /data/disk1/software/mosapp/drivers/dpdk-16.11/x86_64-native-linuxapp-gcc/include/rte_memory.h:86:2: error: #error "Unsupported cache line size" In file included from /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c:62: /data/disk1/software/mosapp/drivers/dpdk-16.11/x86_64-native-linuxapp-gcc/include/rte_eal.h:83: error: ‘RTE_MAX_LCORE’ undeclared here (not in a function) In file included from /data/disk1/software/mosapp/drivers/dpdk-16.11/x86_64-native-linuxapp-gcc/include/rte_eal_memconfig.h:40, from /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c:63: /data/disk1/software/mosapp/drivers/dpdk-16.11/x86_64-native-linuxapp-gcc/include/rte_malloc_heap.h:53: error: requested alignment is not a constant In file included from /data/disk1/software/mosapp/drivers/dpdk-16.11/x86_64-native-linuxapp-gcc/include/generic/rte_rwlock.h:54, from /data/disk1/software/mosapp/drivers/dpdk-16.11/x86_64-native-linuxapp-gcc/include/rte_rwlock.h:41, from /data/disk1/software/mosapp/drivers/dpdk-16.11/x86_64-native-linuxapp-gcc/include/rte_eal_memconfig.h:41, from /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c:63: /data/disk1/software/mosapp/drivers/dpdk-16.11/x86_64-native-linuxapp-gcc/include/rte_atomic.h:46:5: warning: "RTE_MAX_LCORE" is not defined In file included from /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c:63: /data/disk1/software/mosapp/drivers/dpdk-16.11/x86_64-native-linuxapp-gcc/include/rte_eal_memconfig.h:73: error: ‘RTE_MAX_MEMSEG’ undeclared here (not in a function) /data/disk1/software/mosapp/drivers/dpdk-16.11/x86_64-native-linuxapp-gcc/include/rte_eal_memconfig.h:74: error: ‘RTE_MAX_MEMZONE’ undeclared here (not in a function) /data/disk1/software/mosapp/drivers/dpdk-16.11/x86_64-native-linuxapp-gcc/include/rte_eal_memconfig.h:76: error: ‘RTE_MAX_TAILQ’ undeclared here (not in a function) /data/disk1/software/mosapp/drivers/dpdk-16.11/x86_64-native-linuxapp-gcc/include/rte_eal_memconfig.h:79: error: ‘RTE_MAX_NUMA_NODES’ undeclared here (not in a function) /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c: In function ‘eal_parse_sysfs_value’: /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c:140: error: ‘RTE_LOG_LEVEL’ undeclared (first use in this function) /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c:140: error: (Each undeclared identifier is reported only once /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c:140: error: for each function it appears in.) /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c: In function ‘eal_proc_type_detect’: /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c:298: error: ‘RTE_LOG_LEVEL’ undeclared (first use in this function) /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c: In function ‘eal_parse_socket_mem’: /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c:388: error: ‘RTE_LOG_LEVEL’ undeclared (first use in this function) /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c:381: warning: unused variable ‘arg’ /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c: In function ‘eal_parse_args’: /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c:566: error: ‘RTE_LOG_LEVEL’ undeclared (first use in this function) /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c: In function ‘eal_check_mem_on_local_socket’: /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c:683: error: ‘RTE_LOG_LEVEL’ undeclared (first use in this function) /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c: In function ‘rte_eal_init’: /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c:794: error: ‘RTE_LOG_LEVEL’ undeclared (first use in this function) /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c: In function ‘rte_eal_check_module’: /data/disk1/software/mosapp/drivers/dpdk-16.11/lib/librte_eal/linuxapp/eal/eal.c:926: error: ‘RTE_LOG_LEVEL’ undeclared (first use in this function) make[7]: *** [eal.o] Error 1 make[6]: *** [eal] Error 2 make[5]: *** [linuxapp] Error 2 make[4]: *** [librte_eal] Error 2 make[3]: *** [lib] Error 2 make[2]: *** [all] Error 2 make[1]: *** [pre_install] Error 2 make: *** [install] Error 2
Hi fruitdish,
We provide support for mOS for kernel versions higher than > linux-3.13
. It looks like dpdk-16.11
can't even compile in your environment. Can you try compiling the vanilla version of dpdk-16.11.? You can download it from this link? There is a good chance you won't be able to build it.
You can try upgrading your kernel. That should resolve the issue.
hi ajamshed, I tried to use the DPDK you gave me,and I can compile it.Thank you.
Can you tell me which gcc version you are using?
gcc version: 4.4.7 20120313 (Red Hat 4.4.7-18) Despite the DPDK asked gcc version >= 4.9 ,but I can compile it
system: CentOS Linux 7 kernel: 3.10.0-862.9.1.el7.x86_64 gcc::4.8.5 These problems occurred when I compiled DPDK.but i can compile it through --compile-pcap.These kenel version i can also compile it successfully if the dpdk version is 18.0. ./setup.sh --compile-dpdk
Selected DPDK library to be used for MOS
RTE_SDK exported as drivers/dpdk-17.08 RTE_TARGET exported as x86_64-native-linuxapp-gcc
Press enter to continue ... 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 CC [M] /home/mosapp/mOS-networking-stack/drivers/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igbuio.o In file included from /home/mosapp/mOS-networking-stack/drivers/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igbuio.c:35:0: /home/mosapp/mOS-networking-stack/drivers/dpdk-### 17.08/lib/librte_eal/linuxapp/igb_uio/igb_uio.h:353:9: error: unknown field ‘ndo_change_mtu’ specified in initializer .ndo_change_mtu = NULL, ^ /home/mosapp/mOS-networking-stack/drivers/dpdk-17.08/lib/librte_eal/linuxapp/igb_uio/igb_uio.h:359:9: error: unknown field ‘ndo_set_vf_vlan’ specified in initializer .ndo_set_vf_vlan = NULL, ^ /home/mosapp/mOS-networking-stack/drivers/dpdk-17.08/lib/librte_eal/linuxapp/igb_uio/igb_uio.h:368:9: error: unknown field ‘ndo_setup_tc’ specified in initializer .ndo_setup_tc = NULL, ^ make[10]: *** [/home/mosapp/mOS-networking-stack/drivers/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/igbuio.o] Error 1 make[9]: *** [module/home/mosapp/mOS-networking-stack/drivers/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio] Error 2 make[8]: *** [sub-make] Error 2 make[7]: *** [igb_uio.ko] Error 2 make[6]: *** [igb_uio] Error 2 make[5]: *** [linuxapp] Error 2 make[4]: *** [librte_eal] Error 2 make[3]: *** [lib] Error 2 make[2]: *** [all] Error 2 make[1]: *** [pre_install] Error 2 make: *** [install] Error 2
Done with DPDK setup. Press enter to start MOS setup ... Start building up the MOS library checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for ranlib... ranlib checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking linux/sched.h usability... yes checking linux/sched.h presence... yes checking for linux/sched.h... yes checking pthread.h usability... yes checking pthread.h presence... yes checking for pthread.h... yes checking numa.h usability... yes checking numa.h presence... yes checking for numa.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking for inttypes.h... (cached) yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking stddef.h usability... yes checking stddef.h presence... yes checking for stddef.h... yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for strings.h... (cached) yes checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking for unistd.h... (cached) yes checking for inline... inline checking for off_t... yes checking for size_t... yes checking for ssize_t... yes checking for uint16_t... yes checking for uint32_t... yes checking for uint8_t... yes checking whether lstat correctly handles trailing slash... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes checking for ftruncate... yes checking for gettimeofday... yes checking for memset... yes checking for strcasecmp... yes checking for strchr... yes checking for strpbrk... yes checking for strrchr... yes checking for strstr... yes configure: creating ./config.status config.status: creating ../core/src/Makefile configure: creating ./config.status config.status: creating ../core/src/Makefile config.status: creating ../samples/epserver/Makefile configure: creating ./config.status config.status: creating ../core/src/Makefile config.status: creating ../samples/epserver/Makefile config.status: creating ../samples/epwget/Makefile configure: creating ./config.status config.status: creating ../core/src/Makefile config.status: creating ../samples/epserver/Makefile config.status: creating ../samples/epwget/Makefile config.status: creating ../samples/midstat/Makefile configure: creating ./config.status config.status: creating ../core/src/Makefile config.status: creating ../samples/epserver/Makefile config.status: creating ../samples/epwget/Makefile config.status: creating ../samples/midstat/Makefile config.status: creating ../samples/simple_firewall/Makefile configure: creating ./config.status config.status: creating ../core/src/Makefile config.status: creating ../samples/epserver/Makefile config.status: creating ../samples/epwget/Makefile config.status: creating ../samples/midstat/Makefile config.status: creating ../samples/simple_firewall/Makefile config.status: creating ../samples/nat/Makefile rm -f ../lib/* rm -f *.o ~ core rm -rf ..d tags .bpf CC core.c CC tcp_stream.c CC config.c CC api.c CC mos_api.c CC eventpoll.c CC socket.c CC pipe.c CC tcp_util.c CC eth_in.c CC ip_in.c CC tcp.c CC tcp_in.c CC eth_out.c CC ip_out.c CC tcp_out.c CC arp.c CC timer.c CC cpu.c CC util.c CC addr_pool.c CC fhash.c CC memory_mgt.c CC logger.c CC debug.c CC tcp_rb_frag_queue.c CC tcp_send_buffer.c CC tcp_sb_queue.c CC tcp_stream_queue.c CC bpf/sf_bpf_filter.c CC bpf/sfbpf-int.c CC bpf/sf_gencode.c CC bpf/sf_grammar.c CC bpf/sf_nametoaddr.c CC bpf/sf_optimize.c CC bpf/sf_scanner.c CC event_callback.c CC tcp_rb.c CC icmp.c CC scalable_event.c CC key_value_store.c CC dpdk_module.c dpdk_module.c:16:24: fatal error: rte_ethdev.h: No such file or directory #include <rte_ethdev.h> ^ compilation terminated. make: *** [dpdk_module.o] Error 1 Thanks for you applaying!
@MikeCreken:
We provide support for mOS stack for linux kernel versions >=3.13. Is it possible that you can upgrade your kernel?
Hi,now i upgrade the kenel to 4.17,but there are other errors follows!
Press enter to continue ... 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 CC [M] /home/mosapp/mOS-networking-stack/drivers/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/i40e_main.o /home/mosapp/mOS-networking-stack/drivers/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/i40e_main.c: In function ‘i40e_get_netdev_stats_struct’: /home/mosapp/mOS-networking-stack/drivers/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/i40e_main.c:425:3: error: implicit declaration of function ‘ACCESS_ONCE’ [-Werror=implicit-function-declaration] tx_ring = ACCESS_ONCE(vsi->tx_rings[i]); ^ /home/mosapp/mOS-networking-stack/drivers/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/i40e_main.c:425:11: error:assignment makes pointer from integer without a cast [-Werror] tx_ring = ACCESS_ONCE(vsi->tx_rings[i]); ^ /home/mosapp/mOS-networking-stack/drivers/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/i40e_main.c: In function ‘i40e_update_vsi_stats’: /home/mosapp/mOS-networking-stack/drivers/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/i40e_main.c:859:5: error: assignment makes pointer from integer without a cast [-Werror] p = ACCESS_ONCE(vsi->tx_rings[q]); ^ /home/mosapp/mOS-networking-stack/drivers/dpdk-17.08/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/igb_uio/i40e_main.c: At top level: /home/mosapp/mOS-networking-stack/drivers/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 [-Werror] __be16 proto, struct tc_to_netdev *tc)
@MikeCreken,
I can patch up the mOS core stack so that it can work with linux-4.17
kernel. mOS stack is working fine for kernel versions >= 3.13 & <= 4.10. I will roll out updates and upgrade the stack so that it can work with the latest linux kernel versions within the next 24 hours. Apologies for the inconvenience. In the mean time, if it is not too much of a pain, can you try running mOS on <= linux-4.10.x?
Now i try to use 3.16,there are no problems!Thanks for your applaying!
@MikeCreken:
Just FYI, mOS should now work for the later linux kernel versions as well.
Thanks!
Hi,
I'm getting a similar error with kernel 4.9 and DPDK 18.08.
$ ./setup --compile-dpdk ... dpdk_module.c:87:3: error: unknown field ‘header_split’ specified in initializer .header_split = 0, /**< Header Split disabled */ ^ dpdk_module.c:88:3: error: unknown field ‘hw_ip_checksum’ specified in initializer .hw_ip_checksum = 1, /**< IP checksum offload enabled */ ^ dpdk_module.c:88:22: error: excess elements in struct initializer [-Werror] .hw_ip_checksum = 1, /**< IP checksum offload enabled */ ^ dpdk_module.c:88:22: note: (near initialization for ‘port_conf.rxmode’) dpdk_module.c:89:3: error: unknown field ‘hw_vlan_filter’ specified in initializer .hw_vlan_filter = 0, /**< VLAN filtering disabled */ ^ dpdk_module.c:89:22: error: excess elements in struct initializer [-Werror] .hw_vlan_filter = 0, /**< VLAN filtering disabled */ ^ dpdk_module.c:89:22: note: (near initialization for ‘port_conf.rxmode’) dpdk_module.c:90:3: error: unknown field ‘jumbo_frame’ specified in initializer .jumbo_frame = 0, /**< Jumbo Frame Support disabled */ ^ dpdk_module.c:90:22: error: excess elements in struct initializer [-Werror] .jumbo_frame = 0, /**< Jumbo Frame Support disabled */ ^ dpdk_module.c:90:22: note: (near initialization for ‘port_conf.rxmode’) dpdk_module.c:91:3: error: unknown field ‘hw_strip_crc’ specified in initializer .hw_strip_crc = 1, /**< CRC stripped by hardware */ ^ dpdk_module.c:91:22: error: excess elements in struct initializer [-Werror] .hw_strip_crc = 1, /**< CRC stripped by hardware */ ^ dpdk_module.c:91:22: note: (near initialization for ‘port_conf.rxmode’) dpdk_module.c:126:2: error: unknown field ‘txq_flags’ specified in initializer .txq_flags = 0x0, ^ dpdk_module.c: In function ‘dpdk_get_nif’: dpdk_module.c:413:3: error: ‘rte_eth_dev_count’ is deprecated [-Werror=deprecated-declarations] num_dev = rte_eth_dev_count(); ^~~~~~~ In file included from dpdk_module.c:16:0: /home/dpdk//x86_64-native-linuxapp-gcc/include/rte_ethdev.h:1398:10: note: declared here uint16_t rte_eth_dev_count(void); ^~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Makefile:105: recipe for target 'dpdk_module.o' failed make: *** [dpdk_module.o] Error 1
@ekorian
Is there any specific feature that you want to use in dpdk-18.08
that is not available in dpdk-18.02
? mOS currently works for dpdk-18.02
. The reason why the compilation process is showing errors is that the API for dpdk-18.08
is a bit different from dpdk-18.02
. I would suggest that you use dpdk-18.02
for the time being. I will update mOS for dpdk-18.08
in the coming days.
@ajamshed I'm running other apps on 18.08. It would be lovely from you to add support for it. Thanks!
@ekorian ,
I have extended support of mOS till dpdk-18.11
. Please refer to the devel
branch.
Hello ajamshed ,I have encountered problems when compiling DPDk, can you help me find it?
system: CentOS Linux release 7.6.1810 kernel: 4.4.176-1.el7.elrepo.x86_64 GCC: 4.8.5 DPDk:dpdk-stable-16.11.8
rm -f ../lib/* rm -f *.o ~ core rm -rf ..d tags .bpf CC core.c CC tcp_stream.c CC config.c CC api.c CC mos_api.c CC eventpoll.c CC socket.c CC pipe.c CC tcp_util.c CC eth_in.c CC ip_in.c CC tcp.c CC tcp_in.c CC eth_out.c CC ip_out.c CC tcp_out.c CC arp.c CC timer.c CC cpu.c CC util.c CC addr_pool.c CC fhash.c CC memory_mgt.c CC logger.c CC debug.c CC tcp_rb_frag_queue.c CC tcp_send_buffer.c CC tcp_sb_queue.c CC tcp_stream_queue.c CC bpf/sf_bpf_filter.c CC bpf/sfbpf-int.c CC bpf/sf_gencode.c CC bpf/sf_grammar.c CC bpf/sf_nametoaddr.c CC bpf/sf_optimize.c CC bpf/sf_scanner.c CC event_callback.c CC tcp_rb.c CC icmp.c CC scalable_event.c CC key_value_store.c CC dpdk_module.c dpdk_module.c: In function ‘dpdk_load_module_upper_half’: dpdk_module.c:598:2: error: implicit declaration of function ‘rte_log_set_level’ [-Werror=implicit-function-declaration] rte_log_set_level(RTE_LOGTYPE_PMD, 0); ^ cc1: all warnings being treated as errors make: *** [dpdk_module.o] Error 1
Done with MOS library setup
@goobee,
I have just made update the code. mOS is now backported so that it supports older dpdk-16.11/ driver as well. Let me know if you see any other problems.
@ajamshed Thank you very much, it works.
Please let me know if you observe any other issues.