为 VMWare Player 3.13.0-27-generic 编译 vmnet 时出错

为 VMWare Player 3.13.0-27-generic 编译 vmnet 时出错

更新:在 3.13.0-29-generic 中重新启动后该问题消失。


我正在尝试在 Ubuntu 14.04、内核 3.13.0-27-generic 上安装并运行 VMWare Player。我下载并执行了最新的官方软件包 VMware-Player-6.0.2-1744117.x86_64.bundle 。但它无法构建运行所需的“vmnet”内核模块。

我已经安装了软件包linux-headers-3.13.0-27, linux-headers-3.13.0-27-generic, linux-image-3.13.0-27-generic, linux-image-extra-3.13.0-27-generic

我尝试应用答案中描述的补丁https://askubuntu.com/a/444375/285902。这也许会改善情况,但并不能解决所有问题。

每次尝试都会创建一个文件/tmp/vmware-root/vmware-modconfig-*.log。这些文件中重复出现的一个可能问题如下:

2014-06-01T10:41:33.896-05:00| vthread-3| I120: Failed to find /lib/modules/3.13.0-27-generic/build/include/linux/version.h
2014-06-01T10:41:33.896-05:00| vthread-3| I120: /lib/modules/3.13.0-27-generic/build/include/linux/version.h not found, looking for generated/uapi/linux/version.h instead.

但这可能并不严重,因为/lib/modules/3.13.0-27-generic/build/include/generated/uapi/linux/version.h确实存在。除此之外,唯一引人注目的是最后两行:

2014-06-01T10:41:34.570-05:00| vthread-3| I120: Building module with command "/usr/bin/make -j6 -C /tmp/modconfig-vzryEa/vmnet-only auto-build HEADER_DIR=/lib/modules/3.13.0-27-generic/build/include CC=/usr/bin/gcc IS_GCC_3=no"
2014-06-01T10:41:36.174-05:00| vthread-3| W110: Failed to build vmnet.  Failed to execute the build command.

手动命令sudo vmware-modconfig --console --install-all输出以下内容:

Stopping VMware services:
   VMware Authentication Daemon                                        done
   VM communication interface socket family                            done
   Virtual machine communication interface                             done
   Virtual machine monitor                                             done
   Blocking file system                                                done
Using 2.6.x kernel build system.
make: Entering directory `/tmp/modconfig-oZb2a1/vmmon-only'
/usr/bin/make -C /lib/modules/3.13.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
      MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.13.0-27-generic'
  CC [M]  /tmp/modconfig-oZb2a1/vmmon-only/linux/driver.o
  CC [M]  /tmp/modconfig-oZb2a1/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/modconfig-oZb2a1/vmmon-only/linux/hostif.o
  CC [M]  /tmp/modconfig-oZb2a1/vmmon-only/common/apic.o
  CC [M]  /tmp/modconfig-oZb2a1/vmmon-only/common/comport.o
  CC [M]  /tmp/modconfig-oZb2a1/vmmon-only/common/cpuid.o
  CC [M]  /tmp/modconfig-oZb2a1/vmmon-only/common/hashFunc.o
  CC [M]  /tmp/modconfig-oZb2a1/vmmon-only/common/memtrack.o
  CC [M]  /tmp/modconfig-oZb2a1/vmmon-only/common/phystrack.o
  CC [M]  /tmp/modconfig-oZb2a1/vmmon-only/common/task.o
In file included from include/linux/rtc.h:28:0,
                 from include/linux/mc146818rtc.h:15,
                 from /tmp/modconfig-oZb2a1/vmmon-only/linux/hostif.c:76:
include/linux/device.h:601:6: error: unknown type name ‘dv_match_t’
      dv_match_t match, void *match_data);
      ^
  CC [M]  /tmp/modconfig-oZb2a1/vmmon-only/common/vmx86.o
  CC [M]  /tmp/modconfig-oZb2a1/vmmon-only/vmcore/moduleloop.o
make[2]: *** [/tmp/modconfig-oZb2a1/vmmon-only/linux/hostif.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/modconfig-oZb2a1/vmmon-only/linux/driver.c:1342:1: warning: always_inline function might not be inlinable [-Wattributes]
 LinuxDriverSyncReadTSCs(uint64 *delta) // OUT: TSC max - TSC min
 ^
make[1]: *** [_module_/tmp/modconfig-oZb2a1/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-27-generic'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/modconfig-oZb2a1/vmmon-only'
Using 2.6.x kernel build system.
make: Entering directory `/tmp/modconfig-oZb2a1/vmnet-only'
/usr/bin/make -C /lib/modules/3.13.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
      MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.13.0-27-generic'
  CC [M]  /tmp/modconfig-oZb2a1/vmnet-only/driver.o
  CC [M]  /tmp/modconfig-oZb2a1/vmnet-only/hub.o
  CC [M]  /tmp/modconfig-oZb2a1/vmnet-only/userif.o
  CC [M]  /tmp/modconfig-oZb2a1/vmnet-only/netif.o
  CC [M]  /tmp/modconfig-oZb2a1/vmnet-only/bridge.o
  CC [M]  /tmp/modconfig-oZb2a1/vmnet-only/filter.o
In file included from include/linux/dmaengine.h:24:0,
                 from include/linux/skbuff.h:31,
                 from include/linux/if_ether.h:23,
                 from /tmp/modconfig-oZb2a1/vmnet-only/filter.c:23:
include/linux/device.h:601:6: error: unknown type name ‘dv_match_t’
      dv_match_t match, void *match_data);
      ^
In file included from include/linux/pm_qos.h:10:0,
                 from include/linux/netdevice.h:28,
                 from /tmp/modconfig-oZb2a1/vmnet-only/driver.c:32:
include/linux/device.h:601:6: error: unknown type name ‘dv_match_t’
      dv_match_t match, void *match_data);
      ^
In file included from include/linux/pm_qos.h:10:0,
                 from include/linux/netdevice.h:28,
                 from /tmp/modconfig-oZb2a1/vmnet-only/hub.c:29:
include/linux/device.h:601:6: error: unknown type name ‘dv_match_t’
      dv_match_t match, void *match_data);
      ^
In file included from include/linux/pm_qos.h:10:0,
                 from include/linux/netdevice.h:28,
                 from /tmp/modconfig-oZb2a1/vmnet-only/bridge.c:29:
include/linux/device.h:601:6: error: unknown type name ‘dv_match_t’
      dv_match_t match, void *match_data);
      ^
In file included from include/linux/dmaengine.h:24:0,
                 from include/linux/skbuff.h:31,
                 from include/linux/if_ether.h:23,
                 from /tmp/modconfig-oZb2a1/vmnet-only/userif.c:27:
include/linux/device.h:601:6: error: unknown type name ‘dv_match_t’
      dv_match_t match, void *match_data);
      ^
In file included from include/linux/pm_qos.h:10:0,
                 from include/linux/netdevice.h:28,
                 from /tmp/modconfig-oZb2a1/vmnet-only/netif.c:29:
include/linux/device.h:601:6: error: unknown type name ‘dv_match_t’
      dv_match_t match, void *match_data);
      ^
/tmp/modconfig-oZb2a1/vmnet-only/filter.c:213:1: error: conflicting types for ‘VNetFilterHookFn’
 VNetFilterHookFn(unsigned int hooknum,                 // IN:
 ^
/tmp/modconfig-oZb2a1/vmnet-only/filter.c:64:18: note: previous declaration of ‘VNetFilterHookFn’ was here
 static nf_hookfn VNetFilterHookFn;
                  ^
/tmp/modconfig-oZb2a1/vmnet-only/filter.c: In function ‘VNetFilterHookFn’:
/tmp/modconfig-oZb2a1/vmnet-only/filter.c:264:16: error: ‘ops’ undeclared (first use in this function)
    transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING);
                ^
/tmp/modconfig-oZb2a1/vmnet-only/filter.c:264:16: note: each undeclared identifier is reported only once for each function it appears in
/tmp/modconfig-oZb2a1/vmnet-only/filter.c: At top level:
/tmp/modconfig-oZb2a1/vmnet-only/filter.c:64:18: warning: ‘VNetFilterHookFn’ used but never defined [enabled by default]
 static nf_hookfn VNetFilterHookFn;
                  ^
/tmp/modconfig-oZb2a1/vmnet-only/filter.c:213:1: warning: ‘VNetFilterHookFn’ defined but not used [-Wunused-function]
 VNetFilterHookFn(unsigned int hooknum,                 // IN:
 ^
make[2]: *** [/tmp/modconfig-oZb2a1/vmnet-only/hub.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [/tmp/modconfig-oZb2a1/vmnet-only/driver.o] Error 1
make[2]: *** [/tmp/modconfig-oZb2a1/vmnet-only/filter.o] Error 1
make[2]: *** [/tmp/modconfig-oZb2a1/vmnet-only/userif.o] Error 1
make[2]: *** [/tmp/modconfig-oZb2a1/vmnet-only/netif.o] Error 1
make[2]: *** [/tmp/modconfig-oZb2a1/vmnet-only/bridge.o] Error 1
make[1]: *** [_module_/tmp/modconfig-oZb2a1/vmnet-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-27-generic'
make: *** [vmnet.ko] Error 2
make: Leaving directory `/tmp/modconfig-oZb2a1/vmnet-only'
Unable to install all modules.  See log for details.

使用 Google 搜索其中一些编译器消息,结果一无所获。

下一步我可以尝试什么?如果有帮助的话,我愿意切换内核版本。

答案1

您是否按照以下说明操作:这个链接? 有一组核心实用程序默认情况下不会加载,但是却是必需的。

答案2

安装较新的内核版本并重新启动。

对我来说,使用内核 3.13.0-29-generic 时问题就消失了。

相关内容