Try to get vmware workstation pro 15 running on 15.2 after updating it today. was working smoothly on 15.1 and while during the re-compilation of the module, it failed and by going to the log this is shown,
/tmp/modconfig-14eJFk/vmnet-only/hub.o: warning: objtool: .text.__x86_indirect_thunk_rax+0x0: unsupported intra-function call
2020-07-03T14:18:00.456+08:00| host-6799| I005: /tmp/modconfig-14eJFk/vmnet-only/hub.o: warning: objtool: If this is a retpoline, please patch it in with alternatives and annotate it with ANNOTATE_NOSPEC_ALTERNATIVE.
2020-07-03T14:18:00.456+08:00| host-6799| I005: /tmp/modconfig-14eJFk/vmnet-only/driver.o: warning: objtool: .text.__x86_indirect_thunk_r8+0x0: unsupported intra-function call
2020-07-03T14:18:00.456+08:00| host-6799| I005: /tmp/modconfig-14eJFk/vmnet-only/driver.o: warning: objtool: If this is a retpoline, please patch it in with alternatives and annotate it with ANNOTATE_NOSPEC_ALTERNATIVE.
2020-07-03T14:18:00.456+08:00| host-6799| I005: make[2]: *** [/usr/src/linux-5.3.18-lp152.19/Makefile:1644: module/tmp/modconfig-14eJFk/vmnet-only] Error 2
2020-07-03T14:18:00.456+08:00| host-6799| I005: make[1]: *** …/…/…/linux-5.3.18-lp152.19/Makefile:179: sub-make] Error 2
2020-07-03T14:18:00.456+08:00| host-6799| I005: make: *** [Makefile:117: vmnet.ko] Error 2
2020-07-03T14:18:00.456+08:00| host-6799| I005: Unable to install all modules. See log for details.
After upgrading yesterday, I had to solve the same problem (only with the player).
As usual Michal Kubeček provides working modules in his Github repository.
TL;DR:
wget https://github.com/mkubecek/vmware-host-modules/archive/player-15.5.6.tar.gz
tar -xvzf player-15.5.6.tar.gz
cd vmware-host-modules-player-15.5.6/
tar --create --file vmmon.tar vmmon-only
tar --create --file vmnet.tar vmnet-only
cp vm*.tar /usr/lib/vmware/modules/source/
vmware-modconfig --console --install-all
Note that modules have to precisely match the kernel.
It’s nice when modules are ready made but the only certain solution is to have the VMware installer build the kernels on demand which only requires using an older gcc as described in the link to the other thread.
It’s not difficult to do, takes only a minute or so and once you’ve set up the switch between different gcc, it’ll be ready to use the next time you run into a similar need (install something that requires kernel modules).
Note that once the kernel modules have been built, it shouldn’t matter which gcc you leave your system configured… Using gcc to compile something is normally a one shot need and shouldn’t affect normal operation until your next one-shot need.