After upgrading to the 5.16 kernel on my main machine:
uname -a :
5.16.0-arch1-1 #1 SMP PREEMPT Mon, 10 Jan 2022 20:11:47 +0000 x86_64 GNU/Linux
I found that recompiling the vmmon module fails with
/tmp/modconfig-lXl0QD/vmnet-only/vm_assert.h:43:10: fatal error: stdarg.h: No such file or directory
43 | #include <stdarg.h>
There are more errors, all based on not finding the stdarg.h header file. Now, the linux-headers have been installed, and compiling on the previous kernel worked ok.
When starting workstation pro (vmware --version: VMware Workstation 16.2.1 build-18811642) it offers to recompile the modules
Which then fails with:
So this looks like more customers may run into as the 5.16 becomes more current.
Rebuilding on the commandline with:
vmware-modconfig --console --install-al
Results in the same error, it looks like the process does not find the linux headers anymore. The header missing is in the source directory
cd /usr/src/linux/include
find . -name stdarg.h -type f
./linux/stdarg.h
Which leads me to believe that the Makefile does not look into that directory when building. Can somebody point me to where the kernel headers path for compiling is set?
AFAIK, this workaround/method does not work anymore with 5.18 kernel series.
For now, i can dispense with vmware.
Regards
AFAIK, this workaround/method does not work anymore with 5.18 kernel series.
For now, i can dispense with vmware.
Regards
EXTRA_CFLAGS += -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include/
to the beginning of Makefile in rtl8723au directory.
No, using userspace includes, whether glibc ones or gcc ones, is exactly what's wrong. Kernel code should not include userspace header files. The correct solution is to replace all "#include <stdarg.h>" with "#include <linux/stdarg.h>" and the same for stddef.h.
Hi Bazagee,
I am also a Linux novice (to put it lightly), but here is what I did, and it seems to have worked (for now, anyway), I read about the incompatibility of 16.2.3 with kernel 5.15 (and VMWare's intent on releasing a new minor: 16.3.4), so I waited until my WS gave me the update availability popup. Another user posted that the upgrade worked for them with the new kernel (I didn't check if their host was Windows or Linux; it was Windows... so I dodged a bullet). In any case, I allowed WS to upgrade while still on 5.13, and then allowed the OS to upgrade the kernel to 5.15. Everything went smoothly, and all modules compiled successfully. My VMs are running nominally, but after reading the increasing number of complaints I am going to stay put as long as everything appears to be working.
The way it's looking, the 16.3.4 "update" was noting more than a hacked band-aid to address the new kernel, but it's looking as if the same problem will arise when the kernel is updated again. VMWare needs to address this as a generic fix (in addition to a whole host of other unresolved issues), instead of their current practice of sweeping stuff under the rug and hoping no-one will notice.
You might try rebooting your Ubuntu to the GRUB menu, and selecting the 5.13 kernel. That will allow your WS to start. Allow WS to update to 16.2.4, and then reboot to the current kernel.... and stay put (set your Ubuntu upgrades to manual, so it doesn't upgrade your kernel automatically and potentially break your WS again).
VMWare is (hopefully) bound to realize that if they don't fix their issues, someone else will step in to fill the Linux VM void and take their thunder (at least I am hoping such). Good luck!
Mongo.
Thanks for the info I'll try flipping the kernel as instructed from grub.. didn't know that was a thing.. lol. So much to learn.
Ive used setup with qemu KVM and others at different time to try and create the 'Ultimate' development platform switching seemlessly between linux desktops running a VM guest in each. Not so seemless however. Stuff always seems to break. They all have their nuances. The only thing I haven't tried is running from a Windows host.. but thats look more and more attractive.
I hope you are right about vmware pulling up there development socks.. with the sale off to Broardcom as the new parent company we'll have to see how the roadmap is redrawn.
Fingers crossed. I'll report back tomorrow. Thanks again.
I installed 16.2.4 but am still getting compile errors on Fedora 36 kernel 5.18.13-200.
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:289: /tmp/modconfig-f2fgem/vmnet-only/bridge.o] Error 1
make[1]: *** [Makefile:1842: /tmp/modconfig-f2fgem/vmnet-only] Error 2
make[1]: Leaving directory '/usr/src/kernels/5.18.13-200.fc36.x86_64'
make: *** [Makefile:117: vmnet.ko] Error 2
make: Leaving directory '/tmp/modconfig-f2fgem/vmnet-only'
Unable to install all modules. See log for details.
Mongo - your instructions worked perfectly rolling back (starting) the old kernel in Grub, updating Workstation, booting back into the lastest kernel then let the compiling vmmon vmnet - thanks for the help. Most appreciated.
Updates where set to manual but I fell pray to the nags and forgot about the dis-jointed development model which is Linux. Not a slight in anyway towards the Linux universe, just a learning difference that needs to be taken into account. No spoon feeding! Thanks again.
On Fedora 36 (5.18.13-200.fc36.x86_64); this method worked for me.
1. Download VMware WS 16.2.4; and install it.
2. I did this to fix the module problem:
mkdir /opt/vmware
cd /opt/vmware
git clone https://github.com/mkubecek/vmware-host-modules.git
cd vmware-host-modules/
git checkout workstation-16.2.4
make VM_UNAME=$(uname -r)
make install
3. Check:
systemctl restart vmware
systemctl status vmware
HTH,
Regards
running 5.14, received the following when following your instructions:
’ with type ‘void(struct net_device *, const u8 *, size_t)’ {aka ‘void(struct net_device *, const unsigned char *, long unsigned int)’}
4639 | __dev_addr_set(struct net_device *dev, const u8 *addr, size_t len)
| ^~~~~~~~~~~~~~
/opt/vmware/vmware-host-modules/vmnet-only/netif.c:95:13: error: redefinition of ‘dev_addr_set’
95 | static void dev_addr_set(struct net_device *dev, const u8 *addr)
| ^~~~~~~~~~~~
In file included from /opt/vmware/vmware-host-modules/vmnet-only/netif.c:29:
./include/linux/netdevice.h:4644:20: note: previous definition of ‘dev_addr_set’ with type ‘void(struct net_device *, const u8 *)’ {aka ‘void(struct net_device *, const unsigned char *)’}
4644 | static inline void dev_addr_set(struct net_device *dev, const u8 *addr)
| ^~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:271: /opt/vmware/vmware-host-modules/vmnet-only/netif.o] Error 1
make[2]: *** [Makefile:1862: /opt/vmware/vmware-host-modules/vmnet-only] Error 2
make[2]: Leaving directory '/usr/src/kernels/5.14.0-70.17.1.el9_0.x86_64'
make[1]: *** [Makefile:117: vmnet.ko] Error 2
make[1]: Leaving directory '/opt/vmware/vmware-host-modules/vmnet-only'
make: *** [Makefile:21: vmnet-only] Error 2
[root@BobsLinux vmware-host-modules]#
On fedora workstation 16 Kernel: 5.18.17-200.fc36.x86_64
Your solution resolved my problem! Thank you!
I just tried the above. 1 step forward, 2 steps back. This is with Pop!OS (Ubuntu based, Linux version 5.19.0-76051900-generic )
sudo CPATH=/usr/lib/gcc/x86_64-linux-gnu/11/include vmware-modconfig --console --install-all
From the very long log that was generated, the first error appeared here:
16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER)
|
/tmp/modconfig-nA1t21/vmmon-only/linux/hostif.c: In function ‘isVAReadable’:
/tmp/modconfig-nA1t21/vmmon-only/linux/hostif.c:2363:4: error: unknown type name ‘mm_segment_t’
2363 | mm_segment_t old_fs;
| ^~~~~~~~~~~~
/tmp/modconfig-nA1t21/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-nA1t21/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-nA1t21/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);
| ^~~~~~~~~
The second was here:
tmp/modconfig-nA1t21/vmnet-only/driver.c:976:4: note: here
976 | case SIOCGETAPIVERSION:
| ^~~~
/tmp/modconfig-nA1t21/vmnet-only/netif.c: In function ‘VNetNetIfReceive’:
/tmp/modconfig-nA1t21/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
Reading the other posts here, I'm getting the feeling I just wasted my money! Originally I wanted VMWare because it worked well on my WIndows 7 environments, but you can't upgrade on Windows 7 and my Win 7 machines are end of life, and I was trying to avoid Windows 10. I'd have got the bare metal version of VMWare if I could have found a vendor for it.
-Hugh Ferguson
the path in CPATH does not appear to be the path to the kernel headers. what thought have you given to trying other paths?
This solution worked for me twice (in case this gets posted out of order, I mean the solution of using this repo: https://github.com/mkubecek/vmware-host-modules.git)
The first time I tried it, I didn't restart the VM Ware server but a reboot fixed everything.
The second time, I needed to do this because I got some OS updates which required a recompile of VMWare (I sometimes forget that in the Linux world, even paid product is often DIY). Then a systemctl restart was all I needed (not even a reboot). WOOHOO!!
-Hugh
PS why is mkubecek's fix not integrated into the core product for Linux given that it's essential if you're running any Linux OS that's < 2 yrs old.
Anyone having issues with 5.19? I am running Ubuntu 22.04.1
A recent update caused compilation errors with the missing stddef.h, etc. I tried the command noted above:
CPATH=/usr/src/linux-headers-5.19.0-32-generic/include/linux vmware-modconfig --console --install-all
And I am seeing overall errors, not include errors. For example:
/tmp/modconfig-ViNjeX/vmmon-only/linux/hostif.c: In function ‘isVAReadable’:
/tmp/modconfig-ViNjeX/vmmon-only/linux/hostif.c:2363:4: error: unknown type name ‘mm_segment_t’
2363 | mm_segment_t old_fs;
| ^~~~~~~~~~~~
/tmp/modconfig-ViNjeX/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-ViNjeX/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-ViNjeX/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
I have the same problem on 5.19... When I execute the following command
sudo CPATH=/usr/src/linux-headers-5.19.0-32-generic/include/linux vmware-modconfig --console --install-all
I get the following error:
...
/tmp/modconfig-AUerGs/vmmon-only/linux/hostif.c: In function ‘isVAReadable’:
/tmp/modconfig-AUerGs/vmmon-only/linux/hostif.c:2363:4: error: unknown type name ‘mm_segment_t’
2363 | mm_segment_t old_fs;
| ^~~~~~~~~~~~
/tmp/modconfig-AUerGs/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();
...
For me the following steps solved the issue:
wget https://github.com/mkubecek/vmware-host-modules/archive/workstation-16.2.4.tar.gz
tar xzvf vmware-host-modules-workstation-16.2.4
cd vmware-host-modules-workstation-16.2.4/
make
sudo make install
sudo systemctl restart vmware.service
I ended up going back to good ol Oracle VirtualBox, runs Windows fantastic. 3D acceleration is buggy, but I'm using my VM for development and in that use case, it works great. I can't get behind a company that expects me to buy support to submit a ticket when it breaks... that's just... not right IMO. Good luck to you all though!