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

Question about the error when running make command #2

Open
flairekq opened this issue Jun 20, 2022 · 8 comments
Open

Question about the error when running make command #2

flairekq opened this issue Jun 20, 2022 · 8 comments

Comments

@flairekq
Copy link

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.

@Gui774ume
Copy link
Owner

Gui774ume commented Jun 27, 2022

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 !

@flairekq
Copy link
Author

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

@Gui774ume
Copy link
Owner

Gui774ume commented Jun 27, 2022

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 :)

@flairekq
Copy link
Author

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.

@Gui774ume
Copy link
Owner

Gui774ume commented Jun 27, 2022

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

@Gui774ume
Copy link
Owner

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 \
[...]

@flairekq
Copy link
Author

Hmm, still has the same error
image

@kumarkshiv
Copy link

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.

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

3 participants