aregm / nff-go

NFF-Go -Network Function Framework for GO (former YANFF)
BSD 3-Clause "New" or "Revised" License
1.38k stars 156 forks source link

Unable to compile on Ubuntu 20.04LTS #727

Open NAYANSEN90 opened 3 years ago

NAYANSEN90 commented 3 years ago

During the compilation process the kni kernel module building fails. It seems that the DPDK 19.08 is not supported for Ubuntu 20.04.

Is there any plans to upgrade the DPDK version for the repository?

mikebromwich commented 3 years ago

I'm successfully using nff-go on Ubuntu Server 20.04.2 LTS - with DPDK 19.08 which comes part of the current nff-go version. I've just followed the documented steps (yesterday!) against a clean machine and have done nothing special.

Did you install the kernel headers using sudo apt-get install -y linux-headers-`uname -r`

What errors are you seeing in the compilation?

NAYANSEN90 commented 3 years ago

I had problems while building the kernel KNI module.

/home/nayan/nff-go/dpdk/dpdk/build/build/kernel/linux/kni/kni_net.c:737:20: error: initialization of ‘void ()(struct net_device , unsigned int)’ from incompatible pointer type ‘void ()(struct net_device )’ [-Werror=incompatible-pointer-types] 737 | .ndo_tx_timeout = kni_net_tx_timeout, | ^~~~~~ /home/nayan/nff-go/dpdk/dpdk/build/build/kernel/linux/kni/kni_net.c:737:20: note: (near initialization for ‘kni_net_netdev_ops.ndo_tx_timeout’) cc1: all warnings being treated as errors

Did you get this?

NAYANSEN90 commented 3 years ago

Kernel version: 5.8.0-50-generic

mikebromwich commented 3 years ago

No, I didn't get this - or if I did, it didn't stop compilation. Perhaps, by default, warnings are not considered as errors? I literally just installed the prerequisites advised - and then ran 'make -j8'.

NAYANSEN90 commented 3 years ago

I was trying to make the application with only make. Now when I try to make with 2 threads "make -j2" , the thread building the kni kernel module still stops, but the other thread keeps on compiling. I think that is what has happened for you as well. It means that the KNI kernel module will not be built and cannot be used. But maybe the rest of library will work fine.

You could try with simply make and see if that is what you see.

NAYANSEN90 commented 3 years ago

Nope still did not build properly.

knowncold commented 3 years ago

I had problems while building the kernel KNI module.

/home/nayan/nff-go/dpdk/dpdk/build/build/kernel/linux/kni/kni_net.c:737:20: error: initialization of ‘void ()(struct netdevice , unsigned int)’ from incompatible pointer type ‘void (_)(struct net_device )’ [-Werror=incompatible-pointer-types] 737 | .ndo_tx_timeout = kni_net_tx_timeout, | ^~~~~~ /home/nayan/nff-go/dpdk/dpdk/build/build/kernel/linux/kni/kni_net.c:737:20: note: (near initialization for ‘kni_net_netdev_ops.ndo_tx_timeout’) cc1: all warnings being treated as errors

Did you get this?

I got this problem, too. Have you solved it in some way?

NAYANSEN90 commented 3 years ago

No havent solved it. Moved to older Ubuntu version only.

junjiezou1 commented 2 years ago

i have the problems too!!!!

JayaLavanya commented 2 years ago

Hi Everyone, I am also facing this issue.. May I know if this is solved for anyone ?

eecheng87 commented 1 year ago

Just comment that line and disable Werror, the issue can be solved.

denisio commented 1 year ago

Just edit Makefile and add "-Wno-error=incompatible-pointer-types"

wenkai-Y commented 1 year ago

Just edit Makefile and add "-Wno-error=incompatible-pointer-types"

thank you !

amberlipp commented 7 months ago

I also have this problem in OS 5.10.0-136.12.0.86.oe2203sp1.aarch64 !!!! You can try disable config CONFIG_RTE_KNI_KMOD_ETHTOOL=n