ebpfkit-monitor icon indicating copy to clipboard operation
ebpfkit-monitor copied to clipboard

Question about the error when running make command

Open flairekq opened this issue 2 years ago • 8 comments

Hi, I encountered this error when I am running the make command image I'm suspecting its because kconfig.h does not exist at /lib/modules like what was stated in the system requirements image But, I'm not really sure how I can resolve this issue as I'm a new Linux user, I've checked that the linux-headers is installed and the kconfig.h exists at /usr/src/linux-headers-4.19.0-20-common/include/linux. Anyone has any idea how I can resolve this issue? Thanks in advance.

flairekq avatar Jun 20 '22 07:06 flairekq

Hey @flairekq 👋🏻

Can you paste the output of uname -r please ? (I'm wondering if your running kernel is out of sync with the headers you downloaded)

Other idea: have you tried removing all the build in the MakeFile here:

[...]
		-I/lib/modules/$$(uname -r)/build/include \
		-I/lib/modules/$$(uname -r)/build/include/uapi \
		-I/lib/modules/$$(uname -r)/build/include/generated/uapi \
		-I/lib/modules/$$(uname -r)/build/arch/x86/include \
		-I/lib/modules/$$(uname -r)/build/arch/x86/include/uapi \
		-I/lib/modules/$$(uname -r)/build/arch/x86/include/generated \
[...]

Thanks !

Gui774ume avatar Jun 27 '22 09:06 Gui774ume

Hey @flairekq , Can you paste the output of uname -r please ? (I'm wondering if your running kernel is out of sync with the headers you downloaded) Thanks !

Hi! image

flairekq avatar Jun 27 '22 09:06 flairekq

Ho yeah, so you're definitely out of sync 🎉 Your running kernel is 5.10 and the headers you pointed to are from a 4.19 kernel. Can you install the headers of your kernel ? (probably something like sudo apt install linux-headers-$(uname -r) )

Then, if your headers are installed somewhere else than /lib/modules/ then make sure to update the Makefile accordingly :)

Gui774ume avatar Jun 27 '22 09:06 Gui774ume

Ho yeah, so you're definitely out of sync 🎉 Your running kernel is 5.10 and the headers you pointed to are from a 4.19 kernel. Can you install the headers of your kernel ? (probably something like sudo apt install linux-headers-$(uname -r) )

Oh wait omg im sorry i forgot that 4.19 kernel is on another laptop. The current one is this: image

Btw, I tried removing all the build in the MakeFile but it still has the same error.

flairekq avatar Jun 27 '22 09:06 flairekq

Ok so once you have your headers somewhere, update the Makefile to point to them :)

Gui774ume avatar Jun 27 '22 09:06 Gui774ume

So if I'm not mistaken it should look like this:

[...]
		-I/usr/src/linux-headers-$$(uname -r)/build/include \
		-I/usr/src/linux-headers-$$(uname -r)/build/include/uapi \
		-I/usr/src/linux-headers-$$(uname -r)/build/include/generated/uapi \
		-I/usr/src/linux-headers-$$(uname -r)/build/arch/x86/include \
		-I/usr/src/linux-headers-$$(uname -r)/build/arch/x86/include/uapi \
		-I/usr/src/linux-headers-$$(uname -r)/build/arch/x86/include/generated \
[...]

Instead of this:

[...]
		-I/lib/modules/$$(uname -r)/build/include \
		-I/lib/modules/$$(uname -r)/build/include/uapi \
		-I/lib/modules/$$(uname -r)/build/include/generated/uapi \
		-I/lib/modules/$$(uname -r)/build/arch/x86/include \
		-I/lib/modules/$$(uname -r)/build/arch/x86/include/uapi \
		-I/lib/modules/$$(uname -r)/build/arch/x86/include/generated \
[...]

Gui774ume avatar Jun 27 '22 09:06 Gui774ume

Hmm, still has the same error image

flairekq avatar Jun 27 '22 09:06 flairekq

Hmm, still has the same error image

Can you check where your kernel headers are?

For me including "-I/usr/src/linux-hwe-5.15-headers-5.15.0-73/include " in the make file worked.

kumarkshiv avatar Jul 09 '23 10:07 kumarkshiv