Closed CoCoThink closed 5 years ago
This doesn't look like a problem with the patches, rather missing devel package or wrong compiler options. Can you check if build works with unpatched module sources from VMware? (Preferrably 14.1.1, those should build against kernels up to 4.16-rc4 even without the patches, just with more warnings.)
For the next time: when reporting problems, don't forget to say (1) which branch are you building and (2) against which kernel.
Had the issue on arch linux, the package linux-headers
was missing.
Hello there, unfortunately having the same issue on Artix Linux, compiling against 5.0.9-artix1-1-ARTIX. The error code is the following:
make -C vmmon-only
make[1]: Entering directory '/home/alsetema/vmware-host-modules-p15.0.4-k5.1/vmmon-only'
Using standalone build system.
In file included from ./autoconf/geninclude.c:20:
./include/compat_autoconf.h:38:13: fatal error: generated/autoconf.h: No such file or directory
# include <generated/autoconf.h>
^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: Entering directory '/home/alsetema/vmware-host-modules-p15.0.4-k5.1/vmmon-only/driver-5.0.9-artix1-1-ARTIX'
In file included from .././autoconf/geninclude.c:20:
.././include/compat_autoconf.h:38:13: fatal error: generated/autoconf.h: No such file or directory
# include <generated/autoconf.h>
^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Dependencies for bootstrap.c
cc1: error: code model kernel does not support PIC mode
make[2]: *** [.././Makefile.normal:140: bootstrap.d] Error 1
make[2]: Leaving directory '/home/alsetema/vmware-host-modules-p15.0.4-k5.1/vmmon-only/driver-5.0.9-artix1-1-ARTIX'
make[1]: *** [Makefile.normal:143: deps] Error 2
make[1]: Leaving directory '/home/alsetema/vmware-host-modules-p15.0.4-k5.1/vmmon-only'
make: *** [Makefile:21: vmmon-only] Error 2
Compiling for version 15.0.4 of workstation player.
I have been reading online that it could be an issue with the kernel headers I am using, but cannot provide any more information unfortunately... Any clues?
UPDATE: error disappeared after a restart lol
Same error on openSUSE Leap 15.1 even after installing the kernel sources it spits this nice error:
You should not include /usr/include/{linux,asm}/ header files directly for the compilation of kernel modules.
glibc now uses kernel header files from a well-defined working kernel version (as recommended by Linus Torvalds) These files are glibc internal and may not match the currently running kernel. They should only be included via other system header files - user space programs should not directly include <linux/.h> or <asm/.h> as well.
Since Linux 2.6, the kernel module build process has been updated such that users building modules should not typically need to specify additional include directories at all.
To build kernel modules, ensure you have the build environment
available either via the kernel-devel and kernel-
Then, modules can be built using:
make -C
For the currently running kernel there will be a symbolic
link pointing to the build environment located at
/lib/modules/4.12.14-lp151.24-default/build for use as
If you are seeing this message, your environment is not configured properly.
Please adjust the Makefile accordingly.
KERNEL_VERSION macro is not defined, environment is busted Include compat_version.h before compat_autoconf.h No Module support in this kernel. Please configure with CONFIG_MODULES
You don't need kernel sources, you need kernel-default-devel
(and kernel-devel
but that would be installed as a dependency). Also make sure you clean up leftovers from previous failed builds before trying again.
Maybe you need apt-get install linux-headers-$(uname -r)
.
Reinstalling linux-headers doesn't work, but it works after restarting
@nathan-liu-pro solution solved this issue for me
I have encountered an error when making. My system is Manjaro.
Here are the details.
Using standalone build system. In file included from ./autoconf/geninclude.c:20:0: ./include/compat_autoconf.h:38:13: fatal error: generated/autoconf.h: No such file or directory
include <generated/autoconf.h>
compilation terminated. In file included from .././autoconf/geninclude.c:20:0: .././include/compat_autoconf.h:38:13: fatal error: generated/autoconf.h: No such file or directory
include <generated/autoconf.h>
compilation terminated. Dependencies for hostif.c cc1: error: code model kernel does not support PIC mode make[1]: [.././Makefile.normal:132: hostif.d] Error 1 make: [Makefile.normal:143: deps] Error 2