Vmware WorkStaion 6在Ubuntu Gutsy编译出错的解决方法

VirtualBox 速度是快但是不够稳定,有些应用会直接core down,正好最近Vmware WorkStation 6发布了,所以部分在VirtualBox上跑的有问题的我就转到了Vmware WorkStation6了,可在最新的2.6.22-6内核上确编译Vmnet模块时却失败了,报如下错误:

make: Entering directory `/tmp/vmware-config0/vmnet-only'
make -C /lib/modules/2.6.22-6-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.22-6-generic'

CC [M] /tmp/vmware-config0/vmnet-only/driver.o
CC [M] /tmp/vmware-config0/vmnet-only/hub.o
CC [M] /tmp/vmware-config0/vmnet-only/userif.o
/tmp/vmware-config0/vmnet-only/userif.c: 在函数 ‘VNetCopyDatagramToUser’ 中:
/tmp/vmware-config0/vmnet-only/userif.c:630: 错误: ‘const struct sk_buff’ 没有名为 ‘h’ 的成员
/tmp/vmware-config0/vmnet-only/userif.c:630: 错误: ‘const struct sk_buff’ 没有名为 ‘nh’ 的成员
/tmp/vmware-config0/vmnet-only/userif.c:636: 错误: ‘const struct sk_buff’ 没有名为 ‘h’ 的成员
make[2]: *** [/tmp/vmware-config0/vmnet-only/userif.o] 错误 1
make[1]: *** [_module_/tmp/vmware-config0/vmnet-only] 错误 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.22-6-generic'
make: *** [vmnet.ko] 错误 2
make: Leaving directory `/tmp/vmware-config0/vmnet-only'

Unable to build the vmnet module.

哎,又是一个和内核编码规范不符合的BUG,还好已经有人修复了这个问题,详见这里的讨论。

具体的修复方法如下:

cd /tmp
wget http://labs.eshangrao.com/files/vmnet.tar
cd /usr/lib/vmware/modules/source
sudo mv vmnet.tar vmnet.tar.old
cp /tmp/vmnet.tar ./

然后使用如下命令按提示重新编译Vmware模块就可以了:

sudo  vmware-config.pl

vmware WS6: kernel 2.6.22 - VMnet refuses to compile.

the problem when running vmware-config.pl so it can compile the modules:


Using 2.6.x kernel build system.

make: Entering directory `/tmp/vmware-config0/vmnet-only'

make -C /lib/modules/2.6.21-git13-SPTNK1/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules

make[1]: Entering directory `/usr/src/linux-2.6.21'

CC [M] /tmp/vmware-config0/vmnet-only/driver.o

CC [M] /tmp/vmware-config0/vmnet-only/hub.o

CC [M] /tmp/vmware-config0/vmnet-only/userif.o

/tmp/vmware-config0/vmnet-only/userif.c: In function ‘VNetCopyDatagramToUser’:

/tmp/vmware-config0/vmnet-only/userif.c:630: error: ‘const struct sk_buff’ has no member named ‘h’

/tmp/vmware-config0/vmnet-only/userif.c:630: error: ‘const struct sk_buff’ has no member named ‘nh’

/tmp/vmware-config0/vmnet-only/userif.c:636: error: ‘const struct sk_buff’ has no member named ‘h’

make[2]: *** [/tmp/vmware-config0/vmnet-only/userif.o] Error 1

make[1]: *** [_module_/tmp/vmware-config0/vmnet-only] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.21'

make: *** [vmnet.ko] Error 2

make: Leaving directory `/tmp/vmware-config0/vmnet-only'

Unable to build the vmnet module.


I have gone as far as removing the licensing restriction in
paravirt_ops.c, and patching my kernel to git13 (which has the
paravirt_ops patch aswell). This has removed the compiling error for
vmmon's "unknown symbol" and many other problems for modules that use
different licenses other than GPL.


It appears I'm unable to win having paravirt_ops enabled.
Disabling it is the last resort... althrough I don't see any relevence
between this and paravirt_ops. I have an idea what this is, but I'm at
a loss as to where to start.


edit: I forgot to include I have CONFIG_COMPAT_VDSO disabled.


"# CONFIG_COMPAT_VDSO is not set"


info:


OS - ArchLinux 0.8, self maintained kernel.


uname -a

Linux SPUTNIK1 2.6.21-git13-SPTNK1 #1 PREEMPT Fri May 11 05:59:04 CST 2007 i686 AMD Athlon(tm) AuthenticAMD GNU/Linux


glib 1.2.10-6

glib2 2.12.12-1

glibc 2.5-8

gcc version 4.1.2 20070423 (prerelease)


VMware-workstation-6.0.0-45731


Any help would be greatly appreciated.

没有评论: