2015年7月10日 星期五

VMware Workstation 9.0.4 Installation on Ubuntu 14.04.1 LTS

After installation and configuration completed, vmware would compile its modules and the following error occurred:


Using 2.6.x kernel build system.
make: Entering directory `/tmp/modconfig-GQ2cZR/vmnet-only'
/usr/bin/make -C /lib/modules/3.13.0-39-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
          MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.13.0-39-generic'
  CC [M]  /tmp/modconfig-GQ2cZR/vmnet-only/driver.o
  CC [M]  /tmp/modconfig-GQ2cZR/vmnet-only/hub.o
  CC [M]  /tmp/modconfig-GQ2cZR/vmnet-only/userif.o
  CC [M]  /tmp/modconfig-GQ2cZR/vmnet-only/netif.o
In file included from /tmp/modconfig-GQ2cZR/vmnet-only/vnet.h:28:0,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/hub.c:43:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h: In function ‘AtomicAssertOnCompilePtr’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2397:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused];             \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2560:1: note: in expansion of macro ‘MAKE_ATOMIC_TYPE’
 MAKE_ATOMIC_TYPE(Ptr, 32, void const *, void *, uintptr_t)
 ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h: In function ‘AtomicAssertOnCompileInt’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2397:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused];             \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2562:1: note: in expansion of macro ‘MAKE_ATOMIC_TYPE’
 MAKE_ATOMIC_TYPE(Int, 32, int, int, int)
 ^
In file included from /tmp/modconfig-GQ2cZR/vmnet-only/vnet.h:28:0,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/driver.c:51:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h: In function ‘AtomicAssertOnCompilePtr’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2397:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused];             \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2560:1: note: in expansion of macro ‘MAKE_ATOMIC_TYPE’
 MAKE_ATOMIC_TYPE(Ptr, 32, void const *, void *, uintptr_t)
 ^
In file included from /tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/hub.c:43:
/tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h: In function ‘MonitorActionSet_AtomicInclude’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h: In function ‘AtomicAssertOnCompileInt’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_assert.h:320:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h:91:4: note: in expansion of macro ‘ASSERT_ON_COMPILE’
    ASSERT_ON_COMPILE((ACTION_WORD_SIZE & (ACTION_WORD_SIZE - 1)) == 0);
    ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2397:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused];             \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2562:1: note: in expansion of macro ‘MAKE_ATOMIC_TYPE’
 MAKE_ATOMIC_TYPE(Int, 32, int, int, int)
 ^
In file included from /tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/driver.c:51:
/tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h: In function ‘MonitorActionSet_AtomicInclude’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_assert.h:320:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h:91:4: note: in expansion of macro ‘ASSERT_ON_COMPILE’
    ASSERT_ON_COMPILE((ACTION_WORD_SIZE & (ACTION_WORD_SIZE - 1)) == 0);
    ^
/tmp/modconfig-GQ2cZR/vmnet-only/hub.c: In function ‘VNetHubFindHubByID’:
/tmp/modconfig-GQ2cZR/vmnet-only/hub.c:132:49: warning: argument to ‘sizeof’ in ‘__builtin_memcmp’ call is the same expression as the first source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
         memcmp(idNum, currHub->id.pvnID, sizeof idNum))) {
                                                 ^
In file included from /usr/src/linux-headers-3.13.0-39-generic/arch/x86/include/asm/string.h:2:0,
                 from include/linux/string.h:17,
                 from /usr/src/linux-headers-3.13.0-39-generic/arch/x86/include/asm/page_32.h:38,
                 from /usr/src/linux-headers-3.13.0-39-generic/arch/x86/include/asm/page.h:13,
                 from /usr/src/linux-headers-3.13.0-39-generic/arch/x86/include/asm/thread_info.h:11,
                 from include/linux/thread_info.h:54,
                 from /usr/src/linux-headers-3.13.0-39-generic/arch/x86/include/asm/preempt.h:6,
                 from include/linux/preempt.h:18,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:35,
                 from include/linux/time.h:5,
                 from include/uapi/linux/timex.h:56,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:17,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/hub.c:25:
/tmp/modconfig-GQ2cZR/vmnet-only/hub.c: In function ‘VNetHubAlloc’:
/tmp/modconfig-GQ2cZR/vmnet-only/hub.c:315:36: warning: argument to ‘sizeof’ in ‘__builtin_memcpy’ call is the same pointer type ‘uint8 *’ as the destination; expected ‘uint8’ or an explicit length [-Wsizeof-pointer-memaccess]
   memcpy(hub->id.pvnID, id, sizeof id);
                                    ^
/usr/src/linux-headers-3.13.0-39-generic/arch/x86/include/asm/string_32.h:182:48: note: in definition of macro ‘memcpy’
 #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
                                                ^
In file included from /tmp/modconfig-GQ2cZR/vmnet-only/vnet.h:28:0,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/userif.c:45:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h: In function ‘AtomicAssertOnCompilePtr’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2397:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused];             \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2560:1: note: in expansion of macro ‘MAKE_ATOMIC_TYPE’
 MAKE_ATOMIC_TYPE(Ptr, 32, void const *, void *, uintptr_t)
 ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h: In function ‘AtomicAssertOnCompileInt’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2397:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused];             \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2562:1: note: in expansion of macro ‘MAKE_ATOMIC_TYPE’
 MAKE_ATOMIC_TYPE(Int, 32, int, int, int)
 ^
In file included from /tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/userif.c:45:
/tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h: In function ‘MonitorActionSet_AtomicInclude’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_assert.h:320:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h:91:4: note: in expansion of macro ‘ASSERT_ON_COMPILE’
    ASSERT_ON_COMPILE((ACTION_WORD_SIZE & (ACTION_WORD_SIZE - 1)) == 0);
    ^
/tmp/modconfig-GQ2cZR/vmnet-only/userif.c: In function ‘VNetUserIfIoctl’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_assert.h:320:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/userif.c:809:7: note: in expansion of macro ‘ASSERT_ON_COMPILE’
       ASSERT_ON_COMPILE(VNET_NOTIFY_VERSION == 5);
       ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_assert.h:320:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/userif.c:810:7: note: in expansion of macro ‘ASSERT_ON_COMPILE’
       ASSERT_ON_COMPILE(ACTION_EXPORTED_VERSION == 2);
       ^
In file included from /tmp/modconfig-GQ2cZR/vmnet-only/vnet.h:28:0,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/netif.c:42:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h: In function ‘AtomicAssertOnCompilePtr’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2397:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused];             \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2560:1: note: in expansion of macro ‘MAKE_ATOMIC_TYPE’
 MAKE_ATOMIC_TYPE(Ptr, 32, void const *, void *, uintptr_t)
 ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h: In function ‘AtomicAssertOnCompileInt’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2397:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused];             \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2562:1: note: in expansion of macro ‘MAKE_ATOMIC_TYPE’
 MAKE_ATOMIC_TYPE(Int, 32, int, int, int)
 ^
In file included from /tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/netif.c:42:
/tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h: In function ‘MonitorActionSet_AtomicInclude’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_assert.h:320:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h:91:4: note: in expansion of macro ‘ASSERT_ON_COMPILE’
    ASSERT_ON_COMPILE((ACTION_WORD_SIZE & (ACTION_WORD_SIZE - 1)) == 0);
    ^
  CC [M]  /tmp/modconfig-GQ2cZR/vmnet-only/bridge.o
  CC [M]  /tmp/modconfig-GQ2cZR/vmnet-only/procfs.o
  CC [M]  /tmp/modconfig-GQ2cZR/vmnet-only/filter.o
  CC [M]  /tmp/modconfig-GQ2cZR/vmnet-only/smac_compat.o
In file included from /tmp/modconfig-GQ2cZR/vmnet-only/vnet.h:28:0,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/filter.c:48:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h: In function ‘AtomicAssertOnCompilePtr’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2397:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused];             \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2560:1: note: in expansion of macro ‘MAKE_ATOMIC_TYPE’
 MAKE_ATOMIC_TYPE(Ptr, 32, void const *, void *, uintptr_t)
 ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h: In function ‘AtomicAssertOnCompileInt’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2397:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused];             \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2562:1: note: in expansion of macro ‘MAKE_ATOMIC_TYPE’
 MAKE_ATOMIC_TYPE(Int, 32, int, int, int)
 ^
In file included from /tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/filter.c:48:
/tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h: In function ‘MonitorActionSet_AtomicInclude’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_assert.h:320:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h:91:4: note: in expansion of macro ‘ASSERT_ON_COMPILE’
    ASSERT_ON_COMPILE((ACTION_WORD_SIZE & (ACTION_WORD_SIZE - 1)) == 0);
    ^
/tmp/modconfig-GQ2cZR/vmnet-only/filter.c: At top level:
/tmp/modconfig-GQ2cZR/vmnet-only/filter.c:206:1: error: conflicting types for ‘VNetFilterHookFn’
 VNetFilterHookFn(unsigned int hooknum,                 // IN:
 ^
/tmp/modconfig-GQ2cZR/vmnet-only/filter.c:64:18: note: previous declaration of ‘VNetFilterHookFn’ was here
 static nf_hookfn VNetFilterHookFn;
                  ^

In file included from /tmp/modconfig-GQ2cZR/vmnet-only/vnet.h:28:0,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/procfs.c:43:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h: In function ‘AtomicAssertOnCompilePtr’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2397:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused];             \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2560:1: note: in expansion of macro ‘MAKE_ATOMIC_TYPE’
 MAKE_ATOMIC_TYPE(Ptr, 32, void const *, void *, uintptr_t)
 ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h: In function ‘AtomicAssertOnCompileInt’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2397:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused];             \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2562:1: note: in expansion of macro ‘MAKE_ATOMIC_TYPE’
 MAKE_ATOMIC_TYPE(Int, 32, int, int, int)
 ^
In file included from /tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/procfs.c:43:
/tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h: In function ‘MonitorActionSet_AtomicInclude’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_assert.h:320:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h:91:4: note: in expansion of macro ‘ASSERT_ON_COMPILE’
    ASSERT_ON_COMPILE((ACTION_WORD_SIZE & (ACTION_WORD_SIZE - 1)) == 0);
    ^
/tmp/modconfig-GQ2cZR/vmnet-only/filter.c:64:18: warning: ‘VNetFilterHookFn’ used but never defined [enabled by default]
/tmp/modconfig-GQ2cZR/vmnet-only/filter.c:206:1: warning: ‘VNetFilterHookFn’ defined but not used [-Wunused-function]
 VNetFilterHookFn(unsigned int hooknum,                 // IN:
 ^
In file included from /tmp/modconfig-GQ2cZR/vmnet-only/vnet.h:28:0,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/bridge.c:52:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h: In function ‘AtomicAssertOnCompilePtr’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2397:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused];             \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2560:1: note: in expansion of macro ‘MAKE_ATOMIC_TYPE’
 MAKE_ATOMIC_TYPE(Ptr, 32, void const *, void *, uintptr_t)
 ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h: In function ‘AtomicAssertOnCompileInt’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2397:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused];             \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2562:1: note: in expansion of macro ‘MAKE_ATOMIC_TYPE’
 MAKE_ATOMIC_TYPE(Int, 32, int, int, int)
 ^
In file included from /tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/bridge.c:52:
/tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h: In function ‘MonitorActionSet_AtomicInclude’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_assert.h:320:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h:91:4: note: in expansion of macro ‘ASSERT_ON_COMPILE’
    ASSERT_ON_COMPILE((ACTION_WORD_SIZE & (ACTION_WORD_SIZE - 1)) == 0);
    ^
▽ake[2]: *** [/tmp/modconfig-GQ2cZR/vmnet-only/filter.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /tmp/modconfig-GQ2cZR/vmnet-only/vnet.h:28:0,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/smac_compat.c:53:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h: In function ‘AtomicAssertOnCompilePtr’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2397:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused];             \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2560:1: note: in expansion of macro ‘MAKE_ATOMIC_TYPE’
 MAKE_ATOMIC_TYPE(Ptr, 32, void const *, void *, uintptr_t)
 ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h: In function ‘AtomicAssertOnCompileInt’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2397:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused];             \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/vm_atomic.h:2562:1: note: in expansion of macro ‘MAKE_ATOMIC_TYPE’
 MAKE_ATOMIC_TYPE(Int, 32, int, int, int)
 ^
In file included from /tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-GQ2cZR/vmnet-only/smac_compat.c:53:
/tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h: In function ‘MonitorActionSet_AtomicInclude’:
/tmp/modconfig-GQ2cZR/vmnet-only/vm_assert.h:320:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]
       typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
                    ^
/tmp/modconfig-GQ2cZR/vmnet-only/monitorAction_exported.h:91:4: note: in expansion of macro ‘ASSERT_ON_COMPILE’
    ASSERT_ON_COMPILE((ACTION_WORD_SIZE & (ACTION_WORD_SIZE - 1)) == 0);
    ^
make[1]: *** [_module_/tmp/modconfig-GQ2cZR/vmnet-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-39-generic'
make: *** [vmnet.ko] Error 2
make: Leaving directory `/tmp/modconfig-GQ2cZR/vmnet-only'
Failed to build vmnet.  Failed to execute the build command.
Starting VMware services:
   Virtual machine monitor                                             done
   Virtual machine communication interface                             done
   VM communication interface socket family                            done
   Blocking file system                                                done
   Virtual ethernet                                                   failed
   VMware Authentication Daemon                                        done

Root Cause:

After kernel version 3.13.x, the definition of netfilter hook function (nf_hookfn) has been changed.

 40 /* Largest hook number + 1 */
 41 #define NF_MAX_HOOKS 8
 42 
 43 struct sk_buff;
 44 
 45 struct nf_hook_ops;
 46 typedef unsigned int nf_hookfn(const struct nf_hook_ops *ops,
 47                                struct sk_buff *skb,
 48                                const struct net_device *in,
 49                                const struct net_device *out,
 50                                int (*okfn)(struct sk_buff *));
 51 
 52 struct nf_hook_ops {
 53         struct list_head list;
 54 
 55         /* User fills in from here down. */
 56         nf_hookfn       *hook;
 57         struct module   *owner;
 58         void            *priv;
 59         u_int8_t        pf;
 60         unsigned int    hooknum;
 61         /* Hooks are ordered in ascending priority. */
 62         int             priority;
 63 };
 64 

Solution:

 Use the following patch to correct this error:
--- /usr/lib/vmware/modules/source/vmnet-only/filter.c 2013-10-18 23:11:55.000000000 +0400
+++ /usr/lib/vmware/modules/source/vmnet-only/filter.c 2013-12-03 04:16:31.751352170 +0400
@@ -27,6 +27,7 @@
 #include "compat_module.h"
 #include <linux/mutex.h>
 #include <linux/netdevice.h>
+#include <linux/version.h>
 #if COMPAT_LINUX_VERSION_CHECK_LT(3, 2, 0)
 #   include <linux/module.h>
 #else
@@ -203,7 +204,11 @@
 #endif

 static unsigned int
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
 VNetFilterHookFn(unsigned int hooknum,                 // IN:
+#else
+VNetFilterHookFn(const struct nf_hook_ops *ops,        // IN:
+#endif
 #ifdef VMW_NFHOOK_USES_SKB
                  struct sk_buff *skb,                  // IN:
 #else
@@ -252,7 +257,12 @@

    /* When the host transmits, hooknum is VMW_NF_INET_POST_ROUTING. */
    /* When the host receives, hooknum is VMW_NF_INET_LOCAL_IN. */
-   transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
+    transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
+#else
+    transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING);
+#endif

    packetHeader = compat_skb_network_header(skb);
    ip = (struct iphdr*)packetHeader;

 Reference:

http://lxr.free-electrons.com/source/include/linux/netfilter.h?v=3.13
http://pastebin.com/p3bkbAMu
http://davejingtian.org/2014/03/04/hack-make-vmware-player-6-0-1-start-on-linux-kernel-3-13-x/

沒有留言:

張貼留言