With a little side of applesauce...

Monday, February 5, 2007

VMware beta 6 - problem building vmblock

After patching vmmon (compat_kernel.h), I also had a problem building vmblock:

Extracting the sources of the vmblock module.

Building the vmblock module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config4/vmblock-only'
make -C /lib/modules/2.6.20-6-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-6-generic'
CC [M] /tmp/vmware-config4/vmblock-only/linux/block.o
/tmp/vmware-config4/vmblock-only/linux/block.c:40: warning: ‘kmem_cache_t’ is deprecated
CC [M] /tmp/vmware-config4/vmblock-only/linux/control.o
CC [M] /tmp/vmware-config4/vmblock-only/linux/dentry.o
In file included from /tmp/vmware-config4/vmblock-only/linux/dentry.c:17:
/tmp/vmware-config4/vmblock-only/linux/filesystem.h:86: warning: ‘kmem_cache_t’ is deprecated
CC [M] /tmp/vmware-config4/vmblock-only/linux/file.o
In file included from /tmp/vmware-config4/vmblock-only/linux/file.c:17:
/tmp/vmware-config4/vmblock-only/linux/filesystem.h:86: warning: ‘kmem_cache_t’ is deprecated
/tmp/vmware-config4/vmblock-only/linux/file.c: In function ‘FileOpOpen’:
/tmp/vmware-config4/vmblock-only/linux/file.c:105: error: dereferencing pointer to incomplete type
/tmp/vmware-config4/vmblock-only/linux/file.c: In function ‘FileOpRelease’:
/tmp/vmware-config4/vmblock-only/linux/file.c:201: error: dereferencing pointer to incomplete type
make[2]: *** [/tmp/vmware-config4/vmblock-only/linux/file.o] Error 1
make[1]: *** [_module_/tmp/vmware-config4/vmblock-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-6-generic'
make: *** [vmblock.ko] Error 2
make: Leaving directory `/tmp/vmware-config4/vmblock-only'
Unable to build the vmblock module.

The vmblock module enables dragging or copying files from within a guest and
dropping or pasting them onto your Linux host (guest to host drag and drop and
file copy/paste). The rest of the software provided by VMware Workstation is
designed to work independently of this feature (including guest to host drag
and drop and file copy/paste).

If you would like the guest to host drag and drop and file copy/paste features,
you can install the driver by running vmware-config.pl again after making sure
that gcc, binutils, make and the kernel sources for your running kernel are
installed on your machine. These packages are available on your distribution's
installation CD.
[ Press Enter key to continue ]


The fix is to change "SLAB_KERNEL" to "GFP_KERNEL" in vmblock-only/linux/super.c:

1. cd /usr/lib/vmware/modules/source
2. tar -xvf vmblock.tar
3. sudo vi vmblock-only/linux/super.c


--- super.c.orig 2007-02-05 07:15:08.000000000 -0600
+++ super.c 2007-02-05 07:06:12.000000000 -0600
@@ -66,7 +66,7 @@
{
VMBlockInodeInfo *iinfo;

- iinfo = kmem_cache_alloc(VMBlockInodeCache, SLAB_KERNEL);
+ iinfo = kmem_cache_alloc(VMBlockInodeCache, GFP_KERNEL);
if (!iinfo) {
Warning("SuperOpAllocInode: could not allocate iinfo\n");
return NULL;


4. tar -cf vmblock.tar vmblock.tar
5. sudo vmware-config.pl

http://www.vmware.com/community/message.jspa?messageID=545590#545590

No comments: