mkubecek / vmware-host-modules

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

unable to build modules even on 6.8.9 #246

Closed Hyphaed closed 1 month ago

Hyphaed commented 1 month ago

I'm on Ubuntu 6.8.9 gcc version 14.0.1

I'm trying to build the vmware modules without luck

(base) ferran@z590i:~/Documents/PersonalPackages$ git clone https://github.com/mkubecek/vmware-host-modules.git
Cloning into 'vmware-host-modules'...
remote: Enumerating objects: 4790, done.
remote: Counting objects: 100% (1509/1509), done.
remote: Compressing objects: 100% (221/221), done.
remote: Total 4790 (delta 1419), reused 1331 (delta 1288), pack-reused 3281
Receiving objects: 100% (4790/4790), 1.84 MiB | 3.45 MiB/s, done.
Resolving deltas: 100% (3674/3674), done.
(base) ferran@z590i:~/Documents/PersonalPackages$ cd vmware-host-modules/
(base) ferran@z590i:~/Documents/PersonalPackages/vmware-host-modules$ git checkout w17.5.1
Note: switching to 'w17.5.1'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 60bfdb5 import Workstation 17.5.0 module sources
(base) ferran@z590i:~/Documents/PersonalPackages/vmware-host-modules$ make tarballs
git archive -o vmmon.tar --format=tar HEAD vmmon-only
git archive -o vmnet.tar --format=tar HEAD vmnet-only
(base) ferran@z590i:~/Documents/PersonalPackages/vmware-host-modules$ tar -cf vmmon.tar vmmon-only
(base) ferran@z590i:~/Documents/PersonalPackages/vmware-host-modules$ tar -cf vmnet.tar vmnet-only
(base) ferran@z590i:~/Documents/PersonalPackages/vmware-host-modules$ sudo cp vmmon.tar /usr/lib/vmware/modules/source/vmmon.tar
(base) ferran@z590i:~/Documents/PersonalPackages/vmware-host-modules$ sudo cp vmnet.tar /usr/lib/vmware/modules/source/vmnet.tar
(base) ferran@z590i:~/Documents/PersonalPackages/vmware-host-modules$ sudo vmware-modconfig --console --install-all
[AppLoader] Use shipped Linux kernel AIO access library.
An up-to-date "libaio" or "libaio1" package from your system is preferred.
[AppLoader] GLib does not have GSettings support.
Stopping VMware services:
   VMware Authentication Daemon                                        done
   Virtual machine monitor                                             done
make: Entering directory '/tmp/modconfig-r8FVVF/vmmon-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/6.8.9-tkg-eevdf/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-headers-6.8.9-tkg-eevdf'
  CC [M]  /tmp/modconfig-r8FVVF/vmmon-only/linux/driver.o
  CC [M]  /tmp/modconfig-r8FVVF/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/modconfig-r8FVVF/vmmon-only/linux/hostif.o
  CC [M]  /tmp/modconfig-r8FVVF/vmmon-only/common/apic.o
  CC [M]  /tmp/modconfig-r8FVVF/vmmon-only/common/comport.o
  CC [M]  /tmp/modconfig-r8FVVF/vmmon-only/common/cpuid.o
  CC [M]  /tmp/modconfig-r8FVVF/vmmon-only/common/crosspage.o
  CC [M]  /tmp/modconfig-r8FVVF/vmmon-only/common/memtrack.o
  CC [M]  /tmp/modconfig-r8FVVF/vmmon-only/common/moduleloop.o
  CC [M]  /tmp/modconfig-r8FVVF/vmmon-only/common/phystrack.o
  CC [M]  /tmp/modconfig-r8FVVF/vmmon-only/common/sharedAreaVmmon.o
  CC [M]  /tmp/modconfig-r8FVVF/vmmon-only/common/statVarsVmmon.o
  CC [M]  /tmp/modconfig-r8FVVF/vmmon-only/common/task.o
  CC [M]  /tmp/modconfig-r8FVVF/vmmon-only/common/vmx86.o
  CC [M]  /tmp/modconfig-r8FVVF/vmmon-only/bootstrap/bootstrap.o
  CC [M]  /tmp/modconfig-r8FVVF/vmmon-only/bootstrap/monLoader.o
  CC [M]  /tmp/modconfig-r8FVVF/vmmon-only/bootstrap/monLoaderVmmon.o
  CC [M]  /tmp/modconfig-r8FVVF/vmmon-only/bootstrap/vmmblob.o
/tmp/modconfig-r8FVVF/vmmon-only/common/task.c:548:1: warning: no previous prototype for ‘TaskGetFlatWriteableDataSegment’ [-Wmissing-prototypes]
  548 | TaskGetFlatWriteableDataSegment(void)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/modconfig-r8FVVF/vmmon-only/common/vmx86.c:52:
./arch/x86/include/asm/timex.h: In function ‘random_get_entropy’:
./arch/x86/include/asm/timex.h:12:24: error: implicit declaration of function ‘random_get_entropy_fallback’; did you mean ‘random_get_entropy’? [-Wimplicit-function-declaration]
   12 |                 return random_get_entropy_fallback();
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                        random_get_entropy
/tmp/modconfig-r8FVVF/vmmon-only/common/vmx86.c: At top level:
/tmp/modconfig-r8FVVF/vmmon-only/common/vmx86.c:700:1: warning: no previous prototype for ‘Vmx86FreeVMDriver’ [-Wmissing-prototypes]
  700 | Vmx86FreeVMDriver(VMDriver *vm)
      | ^~~~~~~~~~~~~~~~~
/tmp/modconfig-r8FVVF/vmmon-only/common/vmx86.c:733:1: warning: no previous prototype for ‘Vmx86AllocVMDriver’ [-Wmissing-prototypes]
  733 | Vmx86AllocVMDriver(uint32 numVCPUs)
      | ^~~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:243: /tmp/modconfig-r8FVVF/vmmon-only/common/vmx86.o] Error 1
make[3]: *** Waiting for unfinished jobs....
/tmp/modconfig-r8FVVF/vmmon-only/linux/hostif.c:2926:1: warning: no previous prototype for ‘HostIFCheckTrackedMPN’ [-Wmissing-prototypes]
 2926 | HostIFCheckTrackedMPN(VMDriver *vm, // IN: The VM instance
      | ^~~~~~~~~~~~~~~~~~~~~
/tmp/modconfig-r8FVVF/vmmon-only/linux/hostif.c:3046:1: warning: no previous prototype for ‘HostIFWritePhysicalWork’ [-Wmissing-prototypes]
 3046 | HostIFWritePhysicalWork(MA ma,             // MA to be written to
      | ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/modconfig-r8FVVF/vmmon-only/linux/hostif.c:3205:1: warning: no previous prototype for ‘HostIFStartTimer’ [-Wmissing-prototypes]
 3205 | HostIFStartTimer(Bool rateChanged,  //IN: Did rate change?
      | ^~~~~~~~~~~~~~~~
/tmp/modconfig-r8FVVF/vmmon-only/linux/driver.c:271:1: warning: no previous prototype for ‘LinuxDriverInit’ [-Wmissing-prototypes]
  271 | LinuxDriverInit(void)
      | ^~~~~~~~~~~~~~~
/tmp/modconfig-r8FVVF/vmmon-only/linux/driver.c:339:1: warning: no previous prototype for ‘LinuxDriverExit’ [-Wmissing-prototypes]
  339 | LinuxDriverExit(void)
      | ^~~~~~~~~~~~~~~
make[2]: *** [/usr/src/linux-headers-6.8.9-tkg-eevdf/Makefile:1924: /tmp/modconfig-r8FVVF/vmmon-only] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.8.9-tkg-eevdf'
make: *** [Makefile:117: vmmon.ko] Error 2
make: Leaving directory '/tmp/modconfig-r8FVVF/vmmon-only'
make: Entering directory '/tmp/modconfig-r8FVVF/vmnet-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/6.8.9-tkg-eevdf/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-headers-6.8.9-tkg-eevdf'
  CC [M]  /tmp/modconfig-r8FVVF/vmnet-only/driver.o
  CC [M]  /tmp/modconfig-r8FVVF/vmnet-only/hub.o
  CC [M]  /tmp/modconfig-r8FVVF/vmnet-only/userif.o
  CC [M]  /tmp/modconfig-r8FVVF/vmnet-only/netif.o
  CC [M]  /tmp/modconfig-r8FVVF/vmnet-only/bridge.o
  CC [M]  /tmp/modconfig-r8FVVF/vmnet-only/procfs.o
  CC [M]  /tmp/modconfig-r8FVVF/vmnet-only/smac_compat.o
  CC [M]  /tmp/modconfig-r8FVVF/vmnet-only/smac.o
  CC [M]  /tmp/modconfig-r8FVVF/vmnet-only/vnetEvent.o
  CC [M]  /tmp/modconfig-r8FVVF/vmnet-only/vnetUserListener.o
/tmp/modconfig-r8FVVF/vmnet-only/vnetUserListener.c:87:1: warning: no previous prototype for ‘VNetUserListener_Create’ [-Wmissing-prototypes]
   87 | VNetUserListener_Create(uint32 classMask,  // IN: the listener's class mask
      | ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/modconfig-r8FVVF/vmnet-only/userif.c:1091:1: warning: no previous prototype for ‘VNetUserIf_Create’ [-Wmissing-prototypes]
 1091 | VNetUserIf_Create(VNetPort **ret) // OUT
      | ^~~~~~~~~~~~~~~~~
/tmp/modconfig-r8FVVF/vmnet-only/netif.c:173:1: warning: no previous prototype for ‘VNetNetIf_Create’ [-Wmissing-prototypes]
  173 | VNetNetIf_Create(char *devName,  // IN:
      | ^~~~~~~~~~~~~~~~
/tmp/modconfig-r8FVVF/vmnet-only/bridge.c:258:1: warning: no previous prototype for ‘VNetBridge_Create’ [-Wmissing-prototypes]
  258 | VNetBridge_Create(const char *devName, // IN:  name of device (e.g., "eth0")
      | ^~~~~~~~~~~~~~~~~
/tmp/modconfig-r8FVVF/vmnet-only/bridge.c:1411:1: warning: no previous prototype for ‘VNetBridgeSendLargePacket’ [-Wmissing-prototypes]
 1411 | VNetBridgeSendLargePacket(struct sk_buff *skb,        // IN: packet to split
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
  LD [M]  /tmp/modconfig-r8FVVF/vmnet-only/vmnet.o
/tmp/modconfig-r8FVVF/vmnet-only/vmnet.o: warning: objtool: VNetCsumAndCopyToUser+0x33: call to csum_partial_copy_nocheck() with UACCESS enabled
/tmp/modconfig-r8FVVF/vmnet-only/vmnet.o: warning: objtool: init_module(): not an indirect call target
/tmp/modconfig-r8FVVF/vmnet-only/vmnet.o: warning: objtool: cleanup_module(): not an indirect call target
  MODPOST /tmp/modconfig-r8FVVF/vmnet-only/Module.symvers
  CC [M]  /tmp/modconfig-r8FVVF/vmnet-only/vmnet.mod.o
  LD [M]  /tmp/modconfig-r8FVVF/vmnet-only/vmnet.ko
make[1]: Leaving directory '/usr/src/linux-headers-6.8.9-tkg-eevdf'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= postbuild
make[1]: Entering directory '/tmp/modconfig-r8FVVF/vmnet-only'
make[1]: 'postbuild' is up to date.
make[1]: Leaving directory '/tmp/modconfig-r8FVVF/vmnet-only'
cp -f vmnet.ko ./../vmnet.o
make: Leaving directory '/tmp/modconfig-r8FVVF/vmnet-only'
Unable to install all modules.  See log for details.
mkubecek commented 1 month ago

Please read the instructions in INSTALL file. Tag w17.5.1 marks the unpatched source, i.e. exactly the same as you get from VMware. You need current head of workstation-17.5.1 branch instead.

Hyphaed commented 1 month ago

many thanks for you great work

now jus got into the other open ticket on 6.9

on 6.8.9 working without problems