Replies: 1 comment
-
The problem is usually that you are building as a non-root user and the kernel makefiles cannot create a temporary directory in /usr/src/kernels/version to be able to detect the cc flags. When the kernel tries to determine if a CC flag is available it runs the 'try-run' macro in scripts/Makefile.compiler (or scripts/Kbuild.include depending on the kernel version) which creates a temp directory:
So you can see here that if KBUILD_EXTMOD is not set then $TMPOUT will end up using /usr/src/kernels/version. If you don't have write permissions there, the So the solution is one of the following: Note that if you are building a module with something like |
Beta Was this translation helpful? Give feedback.
-
I’am trying to make modules, but failed.
And I’ve tried to update gcc version, but also failed.
Maybe I should update my linux kernel to solve this problem?
BTW, CentOS 7.9 and gcc version 4.8.5 20150623 (Red Hat 4.8.5-44)
Thanks for your help.
Beta Was this translation helpful? Give feedback.
All reactions