Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VMmon compilation failure on Kernel 5.3.0-18-generic #19-Ubuntu #41

Closed
defjamuk opened this issue Oct 17, 2019 · 5 comments
Closed

VMmon compilation failure on Kernel 5.3.0-18-generic #19-Ubuntu #41

defjamuk opened this issue Oct 17, 2019 · 5 comments

Comments

@defjamuk
Copy link

Ubuntu 19.10
Kernel 5.3.0-18-generic #19-Ubuntu

Managed to to get a successful compilation against tmp/workstation-15.0.0-k5.4 using "make" and "make install".
running "sudo /etc/init.d/vmware restart" gives:

Starting VMware services:
Virtual machine monitor failed
Virtual machine communication interface done
VM communication interface socket family done
Blocking file system done
Virtual ethernet failed
VMware Authentication Daemon done

dmesg output:

[ 8503.629518] vmnet: version magic '5.0.0-25-generic SMP mod_unload ' should be '5.3.0-18-generic SMP mod_unload '
[ 8689.002384] NET: Unregistered protocol family 40
[ 8689.301000] vmmon: version magic '5.0.0-25-generic SMP mod_unload ' should be '5.3.0-18-generic SMP mod_unload '

@mkubecek
Copy link
Owner

The log message is telling you clearly what happened: the module was built against kernel 5.0.0-25-generic but you are trying to load it into version 5.3.0-18-generic. Don't forget to use VM_UNAME if you want to build modules for different kernel than you are currently running (and with the same value for make and make install).

@defjamuk
Copy link
Author

That is the problem -- I have built it against the current kernel (5.3). I am not sure why it is saying it has built against another kernel. I will try and force it to build against a named kernel.

@defjamuk
Copy link
Author

tried the compilation against the new kernel using make VM_UNAME='5.3.0-18-generic'
*-----------------------------------------------------------------------------

  • Branch workstation-15.0.0 has been retired on 2018-12-26 and has not been
  • receiving any updates since. Please switch to latest 15.0.x version
  • available.
  • Latest kernel version this branch is intended to work with is 4.19.
    -----------------------------------------------------------------------------
    make -C vmmon-only
    make[1]: Entering directory '/home/andrew/vmware-build/git/vmware-host-modules/vmmon-only'
    Using kernel build system.
    make -C /lib/modules/5.3.0-18-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/.
    MODULEBUILDDIR= modules
    make[2]: Entering directory '/usr/src/linux-headers-5.3.0-18-generic'
    Makefile:227: ================= WARNING ================
    Makefile:228: 'SUBDIRS' will be removed after Linux 5.3
    Makefile:229:
    Makefile:230: If you are building an individual subdirectory
    Makefile:231: in the kernel tree, you can do like this:
    Makefile:232: $ make path/to/dir/you/want/to/build/
    Makefile:233: (Do not forget the trailing slash)
    Makefile:234:
    Makefile:235: If you are building an external module,
    Makefile:236: Please use 'M=' or 'KBUILD_EXTMOD' instead
    Makefile:237: ==========================================
    CC [M] /home/andrew/vmware-build/git/vmware-host-modules/vmmon-only/linux/driver.o
    /home/andrew/vmware-build/git/vmware-host-modules/vmmon-only/linux/driver.c:109:19: error: initialization of ‘vm_fault_t (
    )(struct vm_fault )’ {aka ‘unsigned int ()(struct vm_fault )’} from incompatible pointer type ‘int ()(struct vm_fault *)’ [-Werror=incompatible-pointer-types]
    109 | .fault = LinuxDriverFault
    | ^~~~~~~~~~~~~~~~
    /home/andrew/vmware-build/git/vmware-host-modules/vmmon-only/linux/driver.c:109:19: note: (near initialization for ‘vmuser_mops.fault’)
    cc1: some warnings being treated as errors
    make[3]: *** [scripts/Makefile.build:290: /home/andrew/vmware-build/git/vmware-host-modules/vmmon-only/linux/driver.o] Error 1
    make[2]: *** [Makefile:1653: module/home/andrew/vmware-build/git/vmware-host-modules/vmmon-only] Error 2
    make[2]: Leaving directory '/usr/src/linux-headers-5.3.0-18-generic'
    make[1]: *** [Makefile:110: vmmon.ko] Error 2
    make[1]: Leaving directory '/home/andrew/vmware-build/git/vmware-host-modules/vmmon-only'
    make: *** [Makefile:21: vmmon-only] Error 2

@defjamuk
Copy link
Author

OK -- Found the problem(s) --

  1. need to build against 'tmp/workstation-15.5.0-k5.4' (not workstation-15.5.0)
  2. "make install" seems to have copied the files to /lib/modules/5.3.0-18-generic/misc/
  3. sudo cp /lib/modules/5.3.0-18-generic/misc/* /lib/modules/5.3.0-18-generic/. fixes this

The earlier errors I had about the magic number was because the old files were not being overwritten in the modules folder.

Thanks for all your help and contributions to this repo :) -- I now have workstation 15.5.0 working again...

@mkubecek
Copy link
Owner

The most interesting question would be who put the old modules to the top directory. Standard vmware tools (vmware-modconfig or the GUI) install them into the misc subdirectory. Also, modules should be always installed under the directory for version they are built against (and built for) so whatever tool installed 5.0.0-25-generic modules into the directory 5.3.0-18-generic is seriously broken.

In any case, it is not an issue of the contents of this repository so let's close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants