This Time Self-Hosted
dark mode light mode Search

VMWare, kernel and GCC 4.1

Okay this might be of help to who wants to try GCC 4.1 and uses VMWare (I’m actually running the 30 days evaluation license, as I hope to stop using Windows before it expires anyway :P), as the modules as they are won’t build with GCC 4.1 requiring the whole kernel to be built with 4.0.. well I didn’t want to rebuild everything, so I looked what’s up with that.

The cause of the problem is that the tests used to recognise if the kernel has or not some of the features VMWare modules are using failed: the tests runs with -Werror to make sure that incompatible declarations don’t leave the compilation going on. Unfortunately, 2.6.14’s headers has a warning in it while using GCC 4.1: include/asm/apic.h:47: warning: value computed is not used.

The fix at this point is trivial:

tar xf /opt/vmware/vmware-workstation/lib/modules/sources/vmmon.tar
tar xf /opt/vmware/vmware-workstation/lib/modules/sources/vmnet.tar
sed -i -e ’s:-Werror:-Wno-unused-value -Werror:g’ vm{mon,net}-only/Makefile*
tar cf /opt/vmware/vmware-workstation/lib/modules/sources/vmmon.tar vmmon-only
tar cf /opt/vmware/vmware-workstation/lib/modules/sources/vmnet.tar vmnet-only

This make sure that the warning is not thrown thus fixing the tests, at which point, the modules will build fine and will be happy to load and start VMWare up.

Comments 1
  1. the sed command above didn’t help for me. It inserted -Wno-unused-value in both Makefile.kernel. But didn’t help.It worked however, after removing -Werror manually in both makefiles.Don’t know much about sed, so I don’t know exactly what your sed command is supposed to do.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.