VMware Communities
NCEPAWCIT
Contributor
Contributor
Jump to solution

Linux Kernel 6.0.10, kernel module build fails

[root@ohrberg]# CPATH=/usr/src/kernels/$(uname -r)/include/linux vmware-modconfig --console --install-all
[AppLoader] GLib does not have GSettings support.
Stopping vmware (via systemctl):  Warning: The unit file, source configuration file or drop-ins of vmware.service changed on disk. Run 'systemctl daemon-reload' to reload units.
                                                           [  OK  ]
make: Entering directory '/tmp/modconfig-WklGCW/vmmon-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/6.0.10-300.fc37.x86_64/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/kernels/6.0.10-300.fc37.x86_64'
  CC [M]  /tmp/modconfig-WklGCW/vmmon-only/linux/driver.o
  CC [M]  /tmp/modconfig-WklGCW/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/modconfig-WklGCW/vmmon-only/linux/hostif.o
  CC [M]  /tmp/modconfig-WklGCW/vmmon-only/common/apic.o
  CC [M]  /tmp/modconfig-WklGCW/vmmon-only/common/comport.o
  CC [M]  /tmp/modconfig-WklGCW/vmmon-only/common/cpuid.o
  CC [M]  /tmp/modconfig-WklGCW/vmmon-only/common/memtrack.o
  CC [M]  /tmp/modconfig-WklGCW/vmmon-only/common/crosspage.o
  CC [M]  /tmp/modconfig-WklGCW/vmmon-only/common/moduleloop.o
  CC [M]  /tmp/modconfig-WklGCW/vmmon-only/common/phystrack.o
  CC [M]  /tmp/modconfig-WklGCW/vmmon-only/common/statVarsVmmon.o
  CC [M]  /tmp/modconfig-WklGCW/vmmon-only/common/sharedAreaVmmon.o
  CC [M]  /tmp/modconfig-WklGCW/vmmon-only/common/task.o
  CC [M]  /tmp/modconfig-WklGCW/vmmon-only/common/vmx86.o
  CC [M]  /tmp/modconfig-WklGCW/vmmon-only/bootstrap/bootstrap.o
  CC [M]  /tmp/modconfig-WklGCW/vmmon-only/bootstrap/monLoader.o
/tmp/modconfig-WklGCW/vmmon-only/bootstrap/monLoader.c: In function ‘MonLoader_Process’:
/tmp/modconfig-WklGCW/vmmon-only/bootstrap/monLoader.c:840:24: warning: the comparison will always evaluate as ‘false’ for the address of ‘entries’ will never be NULL [-Waddress]
  840 |    if (header->entries == 0 || header->count == 0) {
      |                        ^~
In file included from /tmp/modconfig-WklGCW/vmmon-only/bootstrap/monLoader.c:57:
/tmp/modconfig-WklGCW/vmmon-only/./include/monLoader.h:239:19: note: ‘entries’ declared here
  239 |    MonLoaderEntry entries[];
      |                   ^~~~~~~
/tmp/modconfig-WklGCW/vmmon-only/common/crosspage.o: warning: objtool: CrossPage_CodePage+0x1f7: 'naked' return found in RETHUNK build
/tmp/modconfig-WklGCW/vmmon-only/common/crosspage.o: warning: objtool: CrossPage_CodePage+0x1f7: missing int3 after ret
/tmp/modconfig-WklGCW/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Free() falls through to next function PhysTrack_Add()
/tmp/modconfig-WklGCW/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Add() falls through to next function PhysTrack_Remove()
/tmp/modconfig-WklGCW/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Remove() falls through to next function PhysTrack_Test()
  CC [M]  /tmp/modconfig-WklGCW/vmmon-only/bootstrap/monLoaderVmmon.o
  CC [M]  /tmp/modconfig-WklGCW/vmmon-only/bootstrap/vmmblob.o
In file included from /tmp/modconfig-WklGCW/vmmon-only/./include/cpu_types.h:29,
                 from /tmp/modconfig-WklGCW/vmmon-only/./include/modulecall.h:33,
                 from /tmp/modconfig-WklGCW/vmmon-only/common/moduleloop.c:33:
/tmp/modconfig-WklGCW/vmmon-only/./include/vm_basic_defs.h:753: warning: "DO_ONCE" redefined
  753 | #define DO_ONCE(code)                                                   \
      | 
In file included from ./include/linux/random.h:9,
                 from ./include/linux/nodemask.h:97,
                 from ./include/linux/sched.h:22,
                 from /tmp/modconfig-WklGCW/vmmon-only/common/moduleloop.c:31:
./include/linux/once.h:46: note: this is the location of the previous definition
   46 | #define DO_ONCE(func, ...)                                                   \
      | 
In file included from /tmp/modconfig-WklGCW/vmmon-only/./include/cpu_types.h:29,
                 from /tmp/modconfig-WklGCW/vmmon-only/./include/modulecall.h:33,
                 from /tmp/modconfig-WklGCW/vmmon-only/common/vmx86.h:33,
                 from /tmp/modconfig-WklGCW/vmmon-only/common/vmx86.c:42:
/tmp/modconfig-WklGCW/vmmon-only/./include/vm_basic_defs.h:753: warning: "DO_ONCE" redefined
  753 | #define DO_ONCE(code)                                                   \
      | 
In file included from ./include/linux/random.h:9,
                 from ./include/linux/nodemask.h:97,
                 from ./include/linux/sched.h:22,
                 from /tmp/modconfig-WklGCW/vmmon-only/common/vmx86.c:31:
./include/linux/once.h:46: note: this is the location of the previous definition
   46 | #define DO_ONCE(func, ...)                                                   \
      | 
In file included from /tmp/modconfig-WklGCW/vmmon-only/./include/cpu_types.h:29,
                 from /tmp/modconfig-WklGCW/vmmon-only/./include/modulecall.h:33,
                 from /tmp/modconfig-WklGCW/vmmon-only/linux/hostif.c:58:
/tmp/modconfig-WklGCW/vmmon-only/./include/vm_basic_defs.h:753: warning: "DO_ONCE" redefined
  753 | #define DO_ONCE(code)                                                   \
      | 
In file included from ./include/linux/random.h:9,
                 from ./include/linux/nodemask.h:97,
                 from ./include/linux/sched.h:22,
                 from ./include/linux/binfmts.h:5,
                 from /tmp/modconfig-WklGCW/vmmon-only/linux/hostif.c:31:
./include/linux/once.h:46: note: this is the location of the previous definition
   46 | #define DO_ONCE(func, ...)                                                   \
      | 
In file included from /tmp/modconfig-WklGCW/vmmon-only/./include/cpu_types.h:29,
                 from /tmp/modconfig-WklGCW/vmmon-only/./include/modulecall.h:33,
                 from /tmp/modconfig-WklGCW/vmmon-only/./common/vmx86.h:33,
                 from /tmp/modconfig-WklGCW/vmmon-only/linux/driver.h:32,
                 from /tmp/modconfig-WklGCW/vmmon-only/linux/driver.c:47:
/tmp/modconfig-WklGCW/vmmon-only/./include/vm_basic_defs.h:753: warning: "DO_ONCE" redefined
  753 | #define DO_ONCE(code)                                                   \
      | 
In file included from ./include/linux/random.h:9,
                 from ./include/linux/nodemask.h:97,
                 from ./include/linux/list_lru.h:12,
                 from ./include/linux/fs.h:13,
                 from ./include/linux/highmem.h:5,
                 from /tmp/modconfig-WklGCW/vmmon-only/linux/driver.c:25:
./include/linux/once.h:46: note: this is the location of the previous definition
   46 | #define DO_ONCE(func, ...)                                                   \
      | 
/tmp/modconfig-WklGCW/vmmon-only/linux/hostif.c: In function ‘isVAReadable’:
/tmp/modconfig-WklGCW/vmmon-only/linux/hostif.c:2363:4: error: unknown type name ‘mm_segment_t’
 2363 |    mm_segment_t old_fs;
      |    ^~~~~~~~~~~~
/tmp/modconfig-WklGCW/vmmon-only/linux/hostif.c:2365:13: error: implicit declaration of function ‘get_fs’; did you mean ‘sget_fc’? [-Werror=implicit-function-declaration]
 2365 |    old_fs = get_fs();
      |             ^~~~~~
      |             sget_fc
/tmp/modconfig-WklGCW/vmmon-only/linux/hostif.c:2366:4: error: implicit declaration of function ‘set_fs’; did you mean ‘sget_fc’? [-Werror=implicit-function-declaration]
 2366 |    set_fs(KERNEL_DS);
      |    ^~~~~~
      |    sget_fc
/tmp/modconfig-WklGCW/vmmon-only/linux/hostif.c:2366:11: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNEL_2_1’?
 2366 |    set_fs(KERNEL_DS);
      |           ^~~~~~~~~
      |           KERNEL_2_1
/tmp/modconfig-WklGCW/vmmon-only/linux/hostif.c:2366:11: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:249: /tmp/modconfig-WklGCW/vmmon-only/linux/hostif.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/modconfig-WklGCW/vmmon-only/common/task.o: warning: objtool: .text: unexpected end of section
make[1]: *** [Makefile:1856: /tmp/modconfig-WklGCW/vmmon-only] Error 2
make[1]: Leaving directory '/usr/src/kernels/6.0.10-300.fc37.x86_64'
make: *** [Makefile:117: vmmon.ko] Error 2
make: Leaving directory '/tmp/modconfig-WklGCW/vmmon-only'
make: Entering directory '/tmp/modconfig-WklGCW/vmnet-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/6.0.10-300.fc37.x86_64/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/kernels/6.0.10-300.fc37.x86_64'
  CC [M]  /tmp/modconfig-WklGCW/vmnet-only/driver.o
  CC [M]  /tmp/modconfig-WklGCW/vmnet-only/hub.o
  CC [M]  /tmp/modconfig-WklGCW/vmnet-only/userif.o
  CC [M]  /tmp/modconfig-WklGCW/vmnet-only/netif.o
  CC [M]  /tmp/modconfig-WklGCW/vmnet-only/bridge.o
  CC [M]  /tmp/modconfig-WklGCW/vmnet-only/procfs.o
  CC [M]  /tmp/modconfig-WklGCW/vmnet-only/smac_compat.o
  CC [M]  /tmp/modconfig-WklGCW/vmnet-only/smac.o
  CC [M]  /tmp/modconfig-WklGCW/vmnet-only/vnetEvent.o
  CC [M]  /tmp/modconfig-WklGCW/vmnet-only/vnetUserListener.o
/tmp/modconfig-WklGCW/vmnet-only/hub.c:237:24: warning: argument 1 of type ‘uint8[]’ {aka ‘unsigned char[]’} with mismatched bound [-Warray-parameter=]
  237 | VNetHub_AllocPvn(uint8 id[]) // IN: the PVN ID to alloc on
      |                  ~~~~~~^~~~
In file included from /tmp/modconfig-WklGCW/vmnet-only/hub.c:43:
/tmp/modconfig-WklGCW/vmnet-only/vnetInt.h:173:34: note: previously declared as ‘uint8[20]’ {aka ‘unsigned char[20]’}
  173 | VNetJack *VNetHub_AllocPvn(uint8 id[VNET_PVN_ID_LEN]);
      |                            ~~~~~~^~~~~~~~~~~~~~~~~~~
/tmp/modconfig-WklGCW/vmnet-only/hub.c:261:20: warning: argument 3 of type ‘uint8[]’ {aka ‘unsigned char[]’} with mismatched bound [-Warray-parameter=]
  261 |              uint8 id[])    // IN: PVN ID to use (NULL if allocPvn == FALSE)
      |              ~~~~~~^~~~
/tmp/modconfig-WklGCW/vmnet-only/hub.c:68:37: note: previously declared as ‘uint8[20]’ {aka ‘unsigned char[20]’}
   68 |                               uint8 id[VNET_PVN_ID_LEN]);
      |                               ~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/string.h:253,
                 from ./include/linux/bitmap.h:11,
                 from ./include/linux/cpumask.h:12,
                 from ./arch/x86/include/asm/paravirt.h:17,
                 from ./arch/x86/include/asm/irqflags.h:63,
                 from ./include/linux/irqflags.h:16,
                 from ./include/linux/rcupdate.h:26,
                 from ./include/linux/rculist.h:11,
                 from ./include/linux/pid.h:5,
                 from ./include/linux/sched.h:14,
                 from /tmp/modconfig-WklGCW/vmnet-only/netif.c:25:
/tmp/modconfig-WklGCW/vmnet-only/netif.c: In function ‘VNetNetIf_Create’:
/tmp/modconfig-WklGCW/vmnet-only/netif.c:256:14: warning: passing argument 1 of ‘__builtin_memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  256 |    memcpy(dev->dev_addr, netIf->port.paddr, sizeof netIf->port.paddr);
      |           ~~~^~~~~~~~~~
./include/linux/fortify-string.h:379:27: note: in definition of macro ‘__fortify_memcpy_chk’
  379 |         __underlying_##op(p, q, __fortify_size);                        \
      |                           ^
/tmp/modconfig-WklGCW/vmnet-only/netif.c:256:4: note: in expansion of macro ‘memcpy’
  256 |    memcpy(dev->dev_addr, netIf->port.paddr, sizeof netIf->port.paddr);
      |    ^~~~~~
/tmp/modconfig-WklGCW/vmnet-only/netif.c:256:14: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
  256 |    memcpy(dev->dev_addr, netIf->port.paddr, sizeof netIf->port.paddr);
      |           ~~~^~~~~~~~~~
./include/linux/fortify-string.h:379:27: note: in definition of macro ‘__fortify_memcpy_chk’
  379 |         __underlying_##op(p, q, __fortify_size);                        \
      |                           ^
/tmp/modconfig-WklGCW/vmnet-only/netif.c:256:4: note: in expansion of macro ‘memcpy’
  256 |    memcpy(dev->dev_addr, netIf->port.paddr, sizeof netIf->port.paddr);
      |    ^~~~~~
/tmp/modconfig-WklGCW/vmnet-only/netif.c: In function ‘VNetNetIfReceive’:
/tmp/modconfig-WklGCW/vmnet-only/netif.c:348:4: error: implicit declaration of function ‘netif_rx_ni’; did you mean ‘netif_rx’? [-Werror=implicit-function-declaration]
  348 |    netif_rx_ni(skb);
      |    ^~~~~~~~~~~
      |    netif_rx
/tmp/modconfig-WklGCW/vmnet-only/netif.c: In function ‘VNetNetifSetMAC’:
/tmp/modconfig-WklGCW/vmnet-only/netif.c:535:14: warning: passing argument 1 of ‘__builtin_memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  535 |    memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
      |           ~~~^~~~~~~~~~
./include/linux/fortify-string.h:379:27: note: in definition of macro ‘__fortify_memcpy_chk’
  379 |         __underlying_##op(p, q, __fortify_size);                        \
      |                           ^
/tmp/modconfig-WklGCW/vmnet-only/netif.c:535:4: note: in expansion of macro ‘memcpy’
  535 |    memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
      |    ^~~~~~
/tmp/modconfig-WklGCW/vmnet-only/netif.c:535:14: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
  535 |    memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
      |           ~~~^~~~~~~~~~
./include/linux/fortify-string.h:379:27: note: in definition of macro ‘__fortify_memcpy_chk’
  379 |         __underlying_##op(p, q, __fortify_size);                        \
      |                           ^
/tmp/modconfig-WklGCW/vmnet-only/netif.c:535:4: note: in expansion of macro ‘memcpy’
  535 |    memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
      |    ^~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:249: /tmp/modconfig-WklGCW/vmnet-only/netif.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/modconfig-WklGCW/vmnet-only/bridge.c: In function ‘VNetBridgeReceiveFromVNet’:
/tmp/modconfig-WklGCW/vmnet-only/bridge.c:694:10: error: implicit declaration of function ‘netif_rx_ni’; did you mean ‘netif_rx’? [-Werror=implicit-function-declaration]
  694 |          netif_rx_ni(clone);
      |          ^~~~~~~~~~~
      |          netif_rx
/tmp/modconfig-WklGCW/vmnet-only/bridge.c: In function ‘VNetBridgeUp’:
/tmp/modconfig-WklGCW/vmnet-only/bridge.c:956:47: warning: passing argument 2 of ‘SMAC_SetMac’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  956 |          SMAC_SetMac(bridge->smac, bridge->dev->dev_addr);
      |                                    ~~~~~~~~~~~^~~~~~~~~~
In file included from /tmp/modconfig-WklGCW/vmnet-only/bridge.c:54:
/tmp/modconfig-WklGCW/vmnet-only/smac.h:75:45: note: expected ‘uint8 *’ {aka ‘unsigned char *’} but argument is of type ‘const unsigned char *’
   75 | SMAC_SetMac(struct SMACState *state, uint8 *mac); // IN: state, and host MAC
      |                                      ~~~~~~~^~~
/tmp/modconfig-WklGCW/vmnet-only/driver.c: In function ‘VNetFileOpUnlockedIoctl’:
/tmp/modconfig-WklGCW/vmnet-only/driver.c:966:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
  966 |       {
      |       ^
/tmp/modconfig-WklGCW/vmnet-only/driver.c:976:4: note: here
  976 |    case SIOCGETAPIVERSION:
      |    ^~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:249: /tmp/modconfig-WklGCW/vmnet-only/bridge.o] Error 1
make[1]: *** [Makefile:1856: /tmp/modconfig-WklGCW/vmnet-only] Error 2
make[1]: Leaving directory '/usr/src/kernels/6.0.10-300.fc37.x86_64'
make: *** [Makefile:117: vmnet.ko] Error 2
make: Leaving directory '/tmp/modconfig-WklGCW/vmnet-only'
Unable to install all modules.  See log for details.

I have tried to download/build the github mods, but to no avail. Has anybody solved this for Fedora 37?

Thank you!

0 Kudos
1 Solution

Accepted Solutions
NCEPAWCIT
Contributor
Contributor
Jump to solution

Figured it out:

First, install VMware Workstation 6.2.5 Pro from bundle. Then:

# wget https://github.com/mkubecek/vmware-host-modules/archive/workstation-16.2.5.tar.gz
# tar -zxf workstation-16.2.5.tar.gz
# cd vmware-host-modules-workstation-16.2.5/
# make install

 

View solution in original post

0 Kudos
3 Replies
NCEPAWCIT
Contributor
Contributor
Jump to solution

Figured it out:

First, install VMware Workstation 6.2.5 Pro from bundle. Then:

# wget https://github.com/mkubecek/vmware-host-modules/archive/workstation-16.2.5.tar.gz
# tar -zxf workstation-16.2.5.tar.gz
# cd vmware-host-modules-workstation-16.2.5/
# make install

 

0 Kudos
jmbraben
Contributor
Contributor
Jump to solution

Much thanks...I've been banging my head and searching other forums for this answer.
My only contribution is to "make" prior to "make install" 😀

alepamo11
Contributor
Contributor
Jump to solution

Thanks Bro

0 Kudos