VMWare 6 and Ubuntu Hardy: vmmon compile error

Just a quick post to documentate how I got my VMWare config to work:

Problem: include/asm/bitops_32.h:9:2: error: #error only <linux/bitops.h> can be included directly, and vmmon-only compile failes

Solution: change line 74 in vmmon-only source file to read: #include “linux/bitops.h”

Steps:

  1. cd /usr/lib/vmware/modules/source
  2. cp vmmon.tar vmmon.tar.orig
  3. sudo tar xvf vmmon.tar
  4. cd vmmon-only/include/
  5. sudo vi vcpuset.h
  6. change line 74 from: #include “asm/bitops.h” to: #include “linux/bitops.h”
  7. rm vmmon.tar
  8. sudo tar cvf vmmon.tar vmmon-only/
  9. sudo rm -rf vmmon-only/
  10. sudo vmware-config.pl

That’s it, the compile will work now and vmware should be usable as normal
eitch

84 Comments

  1. Well i did that but I’m sure I could have hosed something up. Here’s my output afterwards..
    make[1]: Entering directory `/usr/src/linux-headers-2.6.24-12-generic’
    CC [M] /tmp/vmware-config2/vmmon-only/linux/driver.o
    In file included from /tmp/vmware-config2/vmmon-only/./include/modulecall.h:23,
    from /tmp/vmware-config2/vmmon-only/./common/vmx86.h:18,
    from /tmp/vmware-config2/vmmon-only/linux/driver.h:16,
    from /tmp/vmware-config2/vmmon-only/linux/driver.c:84:
    /tmp/vmware-config2/vmmon-only/./include/vcpuset.h:74:83: error: linux #error only can be included directly/bitops.h: No such file or directory
    make[2]: *** [/tmp/vmware-config2/vmmon-only/linux/driver.o] Error 1
    make[1]: *** [_module_/tmp/vmware-config2/vmmon-only] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-12-generic’
    make: *** [vmmon.ko] Error 2
    make: Leaving directory `/tmp/vmware-config2/vmmon-only’
    Unable to build the vmmon module.

    For more information on how to troubleshoot module-related problems, please
    visit our Web site at “http://www.vmware.com/download/modules/modules.html” and
    “http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html”.

    Any help would be greatly appreciated

  2. This si what my vcpuseth file has in it now..

    #elif defined MODULE
    #include “linux #error only can be included directly/bitops.h”
    #elif defined __APPLE__ && defined KERNEL

  3. Hi, well the thing that happened is, that you messed up the lines somehow. I don’t know how you got that text “#error only can be included directly” in your file, but lines 71 through 75 should look like this:

    #define ffs(x) ffs_x86_64(x)

    #elif defined MODULE
    #include “linux/bitops.h”
    #elif defined __APPLE__ && defined KERNEL

    greets
    eitch

  4. I love you …
    I had tried to solve this problem for a week…
    you’ve saved me!!

  5. Hey eitch, nicely done. All that other nonsense about the all-all patch is nonsense. You totally understood the problem and you fixed it exactly the right way. Right on target! I was wondering how the sources were packaged and the whole vmmon.tar business makes that clear. Very useful info.

    Thanks.

  6. Wow! This is great! Without this I would have to move my vmware to another computer.
    I know everyone here knows the step after 6. However, this is the only workable fix I found after hours of searching, I might suggest steps for less sophisticated adopters:
    6.b. cd /usr/lib/vmware/modules/source
    9.b. change to vmware-player-distrib directory

  7. Thanks for posting this. I just upgraded to 8.04 tonight and really needed to get VMWare up and running. This was spot-on. Good work.

  8. A big thank you! I was having the same problem installing vmware on Fedora 8 and your instructions–which, by the way, are nice and clear and easy to follow–fixed the problem. Well done!

  9. I have some problem under debian etch with kernel 2.6.24.4. This patch works. thanks

  10. Thanks Lee for that addition. That is of course quite right, if you don’t change the directory, then you won’t be able to delete the files…

  11. I can confirm that this modification also works with Debian Lenny (Beta 1). Thanx alot!

  12. I just installed Hardy Heron (8.04) on the day of release, and had to combine your (excellent!) instructions *with* the latest any-any patch (115). Essentially I patched the vmmon.tar file that was in the any-any patch directory. Then ran the runme.pl and it went off without a hitch.

    THANK YOU for the clear, concise instructions.
    – Leon

  13. Thank you for the VMware workstation patch!
    You seved me a lot of time!

  14. Yet another person dropping by to say thanks… I just upgraded to Ubuntu 8.04, and this helped me get VMware working again 😀

  15. I’m just wondering how you troubleshot this issue. I do appreciate your publishing the resolution.

  16. Thanks, solved my problem !
    now i can continue to work…
    grrr those software only runing under windows….

  17. Thanks a lot now I have vmware server up and running,

    I also feel that, there should be a line added between no.6 and 7.. as ilustrated below, it is that critical, but it is useful for some who are newbies

    ~~~~~

    6. change line 74 from: #include “asm/bitops.h” to: #include “linux/bitops.h”

    6.5. cd /usr/lib/vmware/modules/source

    7 rm vmmon.tar
    ~~~~~~

  18. Another big THANK YOU here. Got me past this bug in just a few minutes.

  19. Thanks dude. Required for our final project in Operating Systems, saved my butt 🙂

  20. Thanks a lot man ….your tips was really effective ….living la vida linux !!!

    merci encore !!

    gracias !!

  21. You Rock! This worked for VMware Server 1.5 on Ubuntu 8.04. Thanks for the quick how-to. It was invaluable for getting my Vmware Server back online.

  22. Waou thank you you saved me a lot of time and trouble !

    (and thanks to leon because I was stupid applying this solution and using vmware-any-any-update after which erased this workaround…)

  23. Now for another question: Does anyone know the patch info to make VMware Workstation 6.0.3 modules compile successfully under kernel 2.6.25? Thanks.

  24. On my system, /usr/lib/vmware doesn’t exist, instead there’s a /usr/local/lib/vmware

  25. BTW, i like to use sed to script things (and i’m not going to explain vi to newbies…)

    sed ‘s/asm\/bitops.h/linux\/bitops.h/’

    does the trick 😉

  26. Thanks for saving me the trouble of tracking this down myself…

  27. After I did everything as discribed, I’ve got a new problem:

    Building the vmmon module.

    Unknown VMware Workstation 6.0.3 build 80004 detected. Building for Workstation 6.0.0.
    Using 2.6.x kernel build system.
    make: Gehe in Verzeichnis ‘/tmp/vmware-config4/vmmon-only’
    make -C /lib/modules/2.6.24-16-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
    make[1]: Betrete Verzeichnis ‘/usr/src/linux-headers-2.6.24-16-generic’
    CC [M] /tmp/vmware-config4/vmmon-only/linux/driver.o
    CC [M] /tmp/vmware-config4/vmmon-only/linux/driverLog.o
    CC [M] /tmp/vmware-config4/vmmon-only/linux/hostif.o
    CC [M] /tmp/vmware-config4/vmmon-only/common/comport.o
    CC [M] /tmp/vmware-config4/vmmon-only/common/cpuid.o
    CC [M] /tmp/vmware-config4/vmmon-only/common/hash.o
    CC [M] /tmp/vmware-config4/vmmon-only/common/memtrack.o
    CC [M] /tmp/vmware-config4/vmmon-only/common/phystrack.o
    CC [M] /tmp/vmware-config4/vmmon-only/common/task.o
    gcc: error trying to exec ‘cc1plus’: execvp: No such file or directory
    make[2]: *** [/tmp/vmware-config4/vmmon-only/common/task.o] Fehler 1
    make[1]: *** [_module_/tmp/vmware-config4/vmmon-only] Fehler 2
    make[1]: Verlasse Verzeichnis ‘/usr/src/linux-headers-2.6.24-16-generic’
    make: *** [vmmon.ko] Fehler 2
    make: Verlasse Verzeichnis ‘/tmp/vmware-config4/vmmon-only’
    Unable to build the vmmon module.

    For more information on how to troubleshoot module-related problems, please
    visit our Web site at “http://www.vmware.com/download/modules/modules.html” and
    “http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html”.

    Execution aborted.

    What can I do to fix it?

  28. Thanks a lot, this worked well.

    The only problem I had was that the vmmon.tar we made got overwritten when running ‘vmware-install.pl’

    I found that by starting the install in one terminal and letting it get to the point where it says:
    ——–
    Trying to find a suitable vmmon module for your running kernel.

    “None of the pre-built vmmon modules for VMware Player is suitable for your running kernel. Do you want this program to try to build the vmmon module for your system (you need to have a C compiler installed on your system)? [yes]”
    ——–

    Once it gets to that point, I followed your instructions except the step where you start the vmware-install.pl and I just continued on with the installation in the other terminal.

    Thanks again

  29. Thanks a lot ! This post was really helpful. It worked for me.

Comments are closed.