Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to compile on Ubuntu 20.04LTS #727

Open
NAYANSEN90 opened this issue Apr 20, 2021 · 14 comments
Open

Unable to compile on Ubuntu 20.04LTS #727

NAYANSEN90 opened this issue Apr 20, 2021 · 14 comments

Comments

@NAYANSEN90
Copy link

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
Copy link

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
Copy link
Author

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
Copy link
Author

Kernel version: 5.8.0-50-generic

@mikebromwich
Copy link

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
Copy link
Author

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
Copy link
Author

Nope still did not build properly.

@knowncold
Copy link

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?

@NAYANSEN90
Copy link
Author

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

@junjiezou1
Copy link

i have the problems too!!!!

@JayaLavanya
Copy link

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

@eecheng87
Copy link

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

@denisio
Copy link

denisio commented Sep 18, 2022

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

@wenkai-Y
Copy link

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

thank you !

@amberlipp
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants