mkubecek / vmware-host-modules

Patches needed to build VMware (Player and Workstation) host modules against recent kernels
GNU General Public License v2.0
2.27k stars 366 forks source link

linuxmint 21.2 with xanmod 6.1.46-x64v3 kernel (gcc 13.2 compiled), build vmnet faild. #211

Closed siriume closed 1 year ago

siriume commented 1 year ago

Hi, I'm using linuxmint 21.2 with xanmod 6.1.46-x64v3 kernel, after version 6.1.45 , its upgrade the gcc version to 13.2.

$ gcc --version
gcc (GCC) 13.2.0
Copyright © 2023 Free Software Foundation, Inc.
...
/opt/vmware-host-modules/vmnet-only/netif.c: in Function ‘VNetNetIfReceive’:
/opt/vmware-host-modules/vmnet-only/netif.c:355:4: Error:implicit declaration of function ‘netif_rx_ni’; did you mean ‘netif_rx’? [-Werror=implicit-function-declaration]
  355 |    netif_rx_ni(skb);
      |    ^~~~~~~~~~~
      |    netif_rx
cc1:Some warnings are treated as errors
make[3]: *** [scripts/Makefile.build:250: /opt/vmware-host-modules/vmnet-only/netif.o] Error 1
make[2]: *** [Makefile:2155: /opt/vmware-host-modules/vmnet-only] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-6.1.46-x64v3-xanmod1'
make[1]: *** [Makefile:117: vmnet.ko] Error 2
make[1]: Leaving directory '/opt/vmware-host-modules/vmnet-only'
make: *** [Makefile:21: vmnet-only] Error 2
mkubecek commented 1 year ago

Which branch is this? Is your local repository updated? This has been addressed long ago and, in fact, workstation 17.0.2 has this addressed even unpatched.

siriume commented 1 year ago
siriume commented 1 year ago

Which branch is this? Is your local repository updated? This has been addressed long ago and, in fact, workstation 17.0.2 has this addressed even unpatched.

$ sudo vmware-modconfig --console --install-all       
[AppLoader] GLib does not have GSettings support.
Failed to get gcc information.
mkubecek commented 1 year ago
  • workstation-17.0.2 8b2d314 modules: make COMPAT_LINUX_VERSION_CHECK_LT less tricky

Definitely not, this would never call netif_rx_ni() on a kernel >= 5.18. Even unpatched 17.0.2 would not.

Edit: also, this version has netif_rx() on line 355, netif_rx_ni() call is line 353. This also suggests you are trying to build a different source.

mkubecek commented 1 year ago

[AppLoader] GLib does not have GSettings support.

That's a known problem but not something I can do anything about as this is a closed source userspace application. Build the modules directly instead (option "2a" in INSTALL document).

siriume commented 1 year ago

[AppLoader] GLib does not have GSettings support.

That's a known problem but not something I can do anything about as this is a closed source userspace application. Build the modules directly instead (option "2a" in INSTALL document). Same error.

$  make VM_UNAME=`uname -r`
make -C vmmon-only 
make[1]: Entering directory '/opt/vmware-host-modules/vmmon-only'
Using kernel build system.
make -C /lib/modules/6.1.46-x64v3-xanmod1/build/include/.. M=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[2]: Entering directory '/usr/src/linux-headers-6.1.46-x64v3-xanmod1'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc-13 (Debian 13.2.0-1) 13.2.0
You are using:           gcc (GCC) 13.2.0
make[2]: Leaving directory '/usr/src/linux-headers-6.1.46-x64v3-xanmod1'
make -C $PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= postbuild
make[2]: Entering directory '/opt/vmware-host-modules/vmmon-only'
make[2]: 'postbuild' is up to date.
make[2]: Leaving directory '/opt/vmware-host-modules/vmmon-only'
cp -f vmmon.ko ./../vmmon.o
make[1]: Leaving directory '/opt/vmware-host-modules/vmmon-only'
make -C vmnet-only 
make[1]: Entering directory '/opt/vmware-host-modules/vmnet-only'
Using kernel build system.
make -C /lib/modules/6.1.46-x64v3-xanmod1/build/include/.. M=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[2]: Entering directory '/usr/src/linux-headers-6.1.46-x64v3-xanmod1'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc-13 (Debian 13.2.0-1) 13.2.0
You are using:           gcc (GCC) 13.2.0
CC [M]  /opt/vmware-host-modules/vmnet-only/netif.o
/opt/vmware-host-modules/vmnet-only/netif.c: In Function‘VNetNetIfReceive’中:
/opt/vmware-host-modules/vmnet-only/netif.c:355:4: Error:implicit declaration of function ‘netif_rx_ni’; did you mean ‘netif_rx’? [-Werror=implicit-function-declaration]
355 |    netif_rx_ni(skb);
|    ^~~~~~~~~~~
|    netif_rx
cc1:Some warnings are treated as errors
make[3]: *** [scripts/Makefile.build:250: /opt/vmware-host-modules/vmnet-only/netif.o] Error 1
make[2]: *** [Makefile:2155: /opt/vmware-host-modules/vmnet-only] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-6.1.46-x64v3-xanmod1'
make[1]: *** [Makefile:117: vmnet.ko] Error 2
make[1]: Leaving directory '/opt/vmware-host-modules/vmnet-only'
make: *** [Makefile:21: vmnet-only] Error 2
mkubecek commented 1 year ago

As I said, the source you are trying to build is not current workstation-17.0.2 head.