Open mi12078 opened 6 years ago
same here... but with 4.15.r180107.gb2cd1df-1 (Manjaro Linux)...
make -C /lib/modules/4.15.0-1-MANJARO/build SUBDIRS=/usr/home/aw/devel/mydb/myswapb modules
make[1]: Entering directory '/usr/lib/modules/4.15.0-1-MANJARO/build'
CC [M] /usr/home/aw/devel/mydb/myswapb/myswap.o
In file included from /usr/home/aw/devel/mydb/myswapb/myswap.c:90:0:
./include/linux/kernel.h:6:10: fatal error: stdarg.h: No such file or directory
#include <stdarg.h>
-arne
adding -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/include to ccflags-y in Makefile helped... :)
ccflags-y = -Wno-declaration-after-statement -mpopcnt -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/include
-arne
@riddicc Thanks, that helped solve the include error
I had the same problem on Arch Linux (4.15.11-1-ARCH), adding -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include to ccflags-y solved the issue
@riddicc Thanks for the solution. This issue made me confuse a lots after long time not use my arch system.
helped me with fedora 28. The right directory for fedora is -I/usr/lib/gcc/x86_64-redhat-linux/8/include
When compiling for said kernel I get the following error:
The kernel which was booted at the time of compiling was 4.14.6-1-ARCH. There are no problems when building this module for aforementioned kernel. 4.15.0-rc3 was built out of source if it is of any importance. Tried building with 4.15.0-rc3 booted, error still persists. Could it be that I somehow miscompiled the kernel?