nff-go icon indicating copy to clipboard operation
nff-go copied to clipboard

Unable to compile on Ubuntu 20.04LTS

Open NAYANSEN90 opened this issue 3 years ago • 14 comments

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?

NAYANSEN90 avatar Apr 20 '21 06:04 NAYANSEN90

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?

mikebromwich avatar Apr 20 '21 11:04 mikebromwich

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 avatar Apr 20 '21 15:04 NAYANSEN90

Kernel version: 5.8.0-50-generic

NAYANSEN90 avatar Apr 20 '21 15:04 NAYANSEN90

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'.

mikebromwich avatar Apr 20 '21 15:04 mikebromwich

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 avatar Apr 20 '21 16:04 NAYANSEN90

Nope still did not build properly.

NAYANSEN90 avatar Apr 20 '21 16:04 NAYANSEN90

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?

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

knowncold avatar May 28 '21 10:05 knowncold

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

NAYANSEN90 avatar Jun 02 '21 07:06 NAYANSEN90

i have the problems too!!!!

junjiezou1 avatar Mar 06 '22 08:03 junjiezou1

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

JayaLavanya avatar Jul 12 '22 06:07 JayaLavanya

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

eecheng87 avatar Sep 14 '22 08:09 eecheng87

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

denisio avatar Sep 18 '22 05:09 denisio

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

thank you !

wenkai-Y avatar May 31 '23 14:05 wenkai-Y

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

amberlipp avatar Jan 23 '24 02:01 amberlipp