1

I installed vmware workstation 10 on my Lubuntu 16.10 32bit with kernel version 4.8.0-22-generic. First, when I started workstation, it would request complining some modules. But this always failed. I checked the net regarding the issue and I was required to patch vmnet thing. I did, but when I run vmware-modconfig --console --install-all the build fails, here is the output of the build

root@laho-VPCEA27FX:/home/laho# 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
make: Entering directory '/tmp/modconfig-WyKnVU/vmmon-only'
Using 2.6.x kernel build system.
/usr/bin/make -C /lib/modules/4.8.0-22-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-headers-4.8.0-22-generic'
  CC [M]  /tmp/modconfig-WyKnVU/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/modconfig-WyKnVU/vmmon-only/linux/driver.o
  CC [M]  /tmp/modconfig-WyKnVU/vmmon-only/linux/hostif.o
  CC [M]  /tmp/modconfig-WyKnVU/vmmon-only/common/memtrack.o
  CC [M]  /tmp/modconfig-WyKnVU/vmmon-only/common/apic.o
In file included from /tmp/modconfig-WyKnVU/vmmon-only/linux/driverLog.h:33:0,
                 from /tmp/modconfig-WyKnVU/vmmon-only/linux/driverLog.c:31:
/tmp/modconfig-WyKnVU/vmmon-only/./include/vm_assert.h:259:0: warning: "DEPRECATED" redefined
    #define DEPRECATED(_fix) do {} while (0)

In file included from ./include/linux/kernel.h:13:0,
                 from /tmp/modconfig-WyKnVU/vmmon-only/./include/compat_kernel.h:23,
                 from /tmp/modconfig-WyKnVU/vmmon-only/linux/driverLog.c:27:
./include/linux/printk.h:110:0: note: this is the location of the previous definition
 #define DEPRECATED "[Deprecated]: "

  CC [M]  /tmp/modconfig-WyKnVU/vmmon-only/common/hashFunc.o
  CC [M]  /tmp/modconfig-WyKnVU/vmmon-only/common/vmx86.o
  CC [M]  /tmp/modconfig-WyKnVU/vmmon-only/common/cpuid.o
In file included from /tmp/modconfig-WyKnVU/vmmon-only/./include/vmware.h:39:0,
                 from /tmp/modconfig-WyKnVU/vmmon-only/linux/hostif.c:82:
/tmp/modconfig-WyKnVU/vmmon-only/./include/vm_assert.h:259:0: warning: "DEPRECATED" redefined
    #define DEPRECATED(_fix) do {} while (0)

In file included from ./include/linux/kernel.h:13:0,
                 from ./include/asm-generic/bug.h:13,
                 from ./arch/x86/include/asm/bug.h:35,
                 from ./include/linux/bug.h:4,
                 from ./include/linux/mmdebug.h:4,
                 from ./include/linux/mm.h:8,
                 from /tmp/modconfig-WyKnVU/vmmon-only/./include/compat_page.h:23,
                 from /tmp/modconfig-WyKnVU/vmmon-only/linux/hostif.c:32:
./include/linux/printk.h:110:0: note: this is the location of the previous definition
 #define DEPRECATED "[Deprecated]: "

In file included from /tmp/modconfig-WyKnVU/vmmon-only/./include/vmware.h:39:0,
                 from /tmp/modconfig-WyKnVU/vmmon-only/linux/driver.c:46:
/tmp/modconfig-WyKnVU/vmmon-only/./include/vm_assert.h:259:0: warning: "DEPRECATED" redefined
    #define DEPRECATED(_fix) do {} while (0)

In file included from ./include/linux/kernel.h:13:0,
                 from ./include/linux/list.h:8,
                 from ./include/linux/wait.h:6,
                 from ./include/linux/fs.h:5,
                 from ./include/linux/highmem.h:4,
                 from /tmp/modconfig-WyKnVU/vmmon-only/linux/driver.c:25:
./include/linux/printk.h:110:0: note: this is the location of the previous definition
 #define DEPRECATED "[Deprecated]: "

/tmp/modconfig-WyKnVU/vmmon-only/linux/driver.c: In function ‘cleanup_module’:
/tmp/modconfig-WyKnVU/vmmon-only/linux/driver.c:409:8: error: void value not ignored as it ought to be
    if (misc_deregister(&linuxState.misc)) {
        ^~~~~~~~~~~~~~~
At top level:
/tmp/modconfig-WyKnVU/vmmon-only/linux/driver.c:1342:1: warning: always_inline function might not be inlinable [-Wattributes]
 LinuxDriverSyncReadTSCs(uint64 *delta) // OUT: TSC max - TSC min
 ^~~~~~~~~~~~~~~~~~~~~~~
  CC [M]  /tmp/modconfig-WyKnVU/vmmon-only/common/task.o
In file included from ./arch/x86/include/asm/processor.h:15:0,
                 from ./arch/x86/include/asm/cpufeature.h:4,
                 from ./arch/x86/include/asm/thread_info.h:52,
                 from ./include/linux/thread_info.h:54,
                 from ./arch/x86/include/asm/preempt.h:6,
                 from ./include/linux/preempt.h:59,
                 from ./include/linux/spinlock.h:50,
                 from ./include/linux/mmzone.h:7,
                 from ./include/linux/gfp.h:5,
                 from ./include/linux/mm.h:9,
                 from /tmp/modconfig-WyKnVU/vmmon-only/./include/compat_page.h:23,
                 from /tmp/modconfig-WyKnVU/vmmon-only/linux/hostif.c:32:
/tmp/modconfig-WyKnVU/vmmon-only/linux/hostif.c: In function ‘HostIFGetUserPages’:
./arch/x86/include/asm/current.h:17:17: warning: passing argument 1 of ‘get_user_pages’ makes integer from pointer without a cast [-Wint-conversion]
 #define current get_current()
                 ^
/tmp/modconfig-WyKnVU/vmmon-only/linux/hostif.c:1127:28: note: in expansion of macro ‘current’
    retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
                            ^~~~~~~
In file included from /tmp/modconfig-WyKnVU/vmmon-only/./include/compat_page.h:23:0,
                 from /tmp/modconfig-WyKnVU/vmmon-only/linux/hostif.c:32:
./include/linux/mm.h:1315:6: note: expected ‘long unsigned int’ but argument is of type ‘struct task_struct *’
 long get_user_pages(unsigned long start, unsigned long nr_pages,
      ^~~~~~~~~~~~~~
In file included from ./arch/x86/include/asm/processor.h:15:0,
                 from ./arch/x86/include/asm/cpufeature.h:4,
                 from ./arch/x86/include/asm/thread_info.h:52,
                 from ./include/linux/thread_info.h:54,
                 from ./arch/x86/include/asm/preempt.h:6,
                 from ./include/linux/preempt.h:59,
                 from ./include/linux/spinlock.h:50,
                 from ./include/linux/mmzone.h:7,
                 from ./include/linux/gfp.h:5,
                 from ./include/linux/mm.h:9,
                 from /tmp/modconfig-WyKnVU/vmmon-only/./include/compat_page.h:23,
                 from /tmp/modconfig-WyKnVU/vmmon-only/linux/hostif.c:32:
./arch/x86/include/asm/current.h:17:17: warning: passing argument 2 of ‘get_user_pages’ makes integer from pointer without a cast [-Wint-conversion]
 #define current get_current()
                 ^
/tmp/modconfig-WyKnVU/vmmon-only/linux/hostif.c:1127:37: note: in expansion of macro ‘current’
    retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
                                     ^~~~~~~
In file included from /tmp/modconfig-WyKnVU/vmmon-only/./include/compat_page.h:23:0,
                 from /tmp/modconfig-WyKnVU/vmmon-only/linux/hostif.c:32:
./include/linux/mm.h:1315:6: note: expected ‘long unsigned int’ but argument is of type ‘struct mm_struct *’
 long get_user_pages(unsigned long start, unsigned long nr_pages,
      ^~~~~~~~~~~~~~
/tmp/modconfig-WyKnVU/vmmon-only/linux/hostif.c:1127:13: error: too many arguments to function ‘get_user_pages’
    retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
             ^~~~~~~~~~~~~~
In file included from /tmp/modconfig-WyKnVU/vmmon-only/./include/compat_page.h:23:0,
                 from /tmp/modconfig-WyKnVU/vmmon-only/linux/hostif.c:32:
./include/linux/mm.h:1315:6: note: declared here
 long get_user_pages(unsigned long start, unsigned long nr_pages,
      ^~~~~~~~~~~~~~
scripts/Makefile.build:289: recipe for target '/tmp/modconfig-WyKnVU/vmmon-only/linux/driver.o' failed
make[2]: *** [/tmp/modconfig-WyKnVU/vmmon-only/linux/driver.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/modconfig-WyKnVU/vmmon-only/linux/hostif.c: In function ‘HostIF_EstimateLockedPageLimit’:
/tmp/modconfig-WyKnVU/vmmon-only/linux/hostif.c:1620:47: error: ‘NR_ANON_PAGES’ undeclared (first use in this function)
    unsigned int anonPages = global_page_state(NR_ANON_PAGES);
                                               ^~~~~~~~~~~~~
/tmp/modconfig-WyKnVU/vmmon-only/linux/hostif.c:1620:47: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:289: recipe for target '/tmp/modconfig-WyKnVU/vmmon-only/linux/hostif.o' failed
make[2]: *** [/tmp/modconfig-WyKnVU/vmmon-only/linux/hostif.o] Error 1
In file included from /tmp/modconfig-WyKnVU/vmmon-only/./include/vmware.h:39:0,
                 from /tmp/modconfig-WyKnVU/vmmon-only/common/vmx86.c:40:
/tmp/modconfig-WyKnVU/vmmon-only/./include/vm_assert.h:259:0: warning: "DEPRECATED" redefined
    #define DEPRECATED(_fix) do {} while (0)

In file included from ./include/linux/kernel.h:13:0,
                 from ./include/linux/sched.h:17,
                 from /tmp/modconfig-WyKnVU/vmmon-only/common/vmx86.c:31:
./include/linux/printk.h:110:0: note: this is the location of the previous definition
 #define DEPRECATED "[Deprecated]: "

Makefile:1489: recipe for target '_module_/tmp/modconfig-WyKnVU/vmmon-only' failed
make[1]: *** [_module_/tmp/modconfig-WyKnVU/vmmon-only] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.8.0-22-generic'
Makefile:130: recipe for target 'vmmon.ko' failed
make: *** [vmmon.ko] Error 2
make: Leaving directory '/tmp/modconfig-WyKnVU/vmmon-only'
make: Entering directory '/tmp/modconfig-WyKnVU/vmnet-only'
Using 2.6.x kernel build system.
/usr/bin/make -C /lib/modules/4.8.0-22-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-headers-4.8.0-22-generic'
  CC [M]  /tmp/modconfig-WyKnVU/vmnet-only/driver.o
  CC [M]  /tmp/modconfig-WyKnVU/vmnet-only/hub.o
  CC [M]  /tmp/modconfig-WyKnVU/vmnet-only/userif.o
  CC [M]  /tmp/modconfig-WyKnVU/vmnet-only/netif.o
In file included from /tmp/modconfig-WyKnVU/vmnet-only/vm_assert.h:45:0,
                 from /tmp/modconfig-WyKnVU/vmnet-only/monitorAction_exported.h:31,
                 from /tmp/modconfig-WyKnVU/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-WyKnVU/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-WyKnVU/vmnet-only/driver.c:51:
/tmp/modconfig-WyKnVU/vmnet-only/vm_basic_defs.h:696:0: warning: "DO_ONCE" redefined
 #define DO_ONCE(code)                                                   \

In file included from ./include/linux/random.h:10:0,
                 from ./include/linux/net.h:22,
                 from ./include/linux/skbuff.h:29,
                 from ./include/linux/if_ether.h:23,
                 from ./include/uapi/linux/ethtool.h:18,
                 from ./include/linux/ethtool.h:17,
                 from ./include/linux/netdevice.h:42,
                 from /tmp/modconfig-WyKnVU/vmnet-only/driver.c:32:
./include/linux/once.h:37:0: note: this is the location of the previous definition
 #define DO_ONCE(func, ...)           \

In file included from /tmp/modconfig-WyKnVU/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-WyKnVU/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-WyKnVU/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-WyKnVU/vmnet-only/driver.c:51:
/tmp/modconfig-WyKnVU/vmnet-only/vm_assert.h:259:0: warning: "DEPRECATED" redefined
    #define DEPRECATED(_fix) do {} while (0)

In file included from ./include/linux/kernel.h:13:0,
                 from /tmp/modconfig-WyKnVU/vmnet-only/driver.c:23:
./include/linux/printk.h:110:0: note: this is the location of the previous definition
 #define DEPRECATED "[Deprecated]: "

In file included from /tmp/modconfig-WyKnVU/vmnet-only/vm_assert.h:45:0,
                 from /tmp/modconfig-WyKnVU/vmnet-only/monitorAction_exported.h:31,
                 from /tmp/modconfig-WyKnVU/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-WyKnVU/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-WyKnVU/vmnet-only/hub.c:43:
/tmp/modconfig-WyKnVU/vmnet-only/vm_basic_defs.h:696:0: warning: "DO_ONCE" redefined
 #define DO_ONCE(code)                                                   \

In file included from ./include/linux/random.h:10:0,
                 from ./include/linux/net.h:22,
                 from ./include/linux/skbuff.h:29,
                 from ./include/linux/if_ether.h:23,
                 from ./include/uapi/linux/ethtool.h:18,
                 from ./include/linux/ethtool.h:17,
                 from ./include/linux/netdevice.h:42,
                 from /tmp/modconfig-WyKnVU/vmnet-only/hub.c:29:
./include/linux/once.h:37:0: note: this is the location of the previous definition
 #define DO_ONCE(func, ...)           \

In file included from /tmp/modconfig-WyKnVU/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-WyKnVU/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-WyKnVU/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-WyKnVU/vmnet-only/hub.c:43:
/tmp/modconfig-WyKnVU/vmnet-only/vm_assert.h:259:0: warning: "DEPRECATED" redefined
    #define DEPRECATED(_fix) do {} while (0)

In file included from ./include/linux/kernel.h:13:0,
                 from /tmp/modconfig-WyKnVU/vmnet-only/hub.c:23:
./include/linux/printk.h:110:0: note: this is the location of the previous definition
 #define DEPRECATED "[Deprecated]: "

In file included from /tmp/modconfig-WyKnVU/vmnet-only/vm_assert.h:45:0,
                 from /tmp/modconfig-WyKnVU/vmnet-only/monitorAction_exported.h:31,
                 from /tmp/modconfig-WyKnVU/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-WyKnVU/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-WyKnVU/vmnet-only/netif.c:42:
/tmp/modconfig-WyKnVU/vmnet-only/vm_basic_defs.h:696:0: warning: "DO_ONCE" redefined
 #define DO_ONCE(code)                                                   \

In file included from ./include/linux/random.h:10:0,
                 from ./include/linux/net.h:22,
                 from ./include/linux/skbuff.h:29,
                 from ./include/linux/if_ether.h:23,
                 from ./include/uapi/linux/ethtool.h:18,
                 from ./include/linux/ethtool.h:17,
                 from ./include/linux/netdevice.h:42,
                 from /tmp/modconfig-WyKnVU/vmnet-only/netif.c:29:
./include/linux/once.h:37:0: note: this is the location of the previous definition
 #define DO_ONCE(func, ...)           \

In file included from /tmp/modconfig-WyKnVU/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-WyKnVU/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-WyKnVU/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-WyKnVU/vmnet-only/netif.c:42:
/tmp/modconfig-WyKnVU/vmnet-only/vm_assert.h:259:0: warning: "DEPRECATED" redefined
    #define DEPRECATED(_fix) do {} while (0)

In file included from ./include/linux/kernel.h:13:0,
                 from /tmp/modconfig-WyKnVU/vmnet-only/netif.c:23:
./include/linux/printk.h:110:0: note: this is the location of the previous definition
 #define DEPRECATED "[Deprecated]: "

/tmp/modconfig-WyKnVU/vmnet-only/hub.c: In function ‘VNetHubFindHubByID’:
/tmp/modconfig-WyKnVU/vmnet-only/hub.c:132:49: warning: ‘sizeof’ on array function parameter ‘idNum’ will return size of ‘uint8 * {aka unsigned char *}’ [-Wsizeof-array-argument]
         memcmp(idNum, currHub->id.pvnID, sizeof idNum))) {
                                                 ^~~~~
/tmp/modconfig-WyKnVU/vmnet-only/hub.c:128:26: note: declared here
 VNetHubFindHubByID(uint8 idNum[VNET_PVN_ID_LEN]) // IN: PVN id to find
                          ^~~~~
/tmp/modconfig-WyKnVU/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 ./arch/x86/include/asm/string.h:2:0,
                 from ./include/linux/string.h:18,
                 from ./arch/x86/include/asm/page_32.h:34,
                 from ./arch/x86/include/asm/page.h:13,
                 from ./arch/x86/include/asm/thread_info.h:11,
                 from ./include/linux/thread_info.h:54,
                 from ./arch/x86/include/asm/preempt.h:6,
                 from ./include/linux/preempt.h:59,
                 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:19,
                 from /tmp/modconfig-WyKnVU/vmnet-only/hub.c:25:
/tmp/modconfig-WyKnVU/vmnet-only/hub.c: In function ‘VNetHubAlloc’:
/tmp/modconfig-WyKnVU/vmnet-only/hub.c:315:36: warning: ‘sizeof’ on array function parameter ‘id’ will return size of ‘uint8 * {aka unsigned char *}’ [-Wsizeof-array-argument]
   memcpy(hub->id.pvnID, id, sizeof id);
                                    ^
./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)
                                                ^
/tmp/modconfig-WyKnVU/vmnet-only/hub.c:260:13: note: declared here
       uint8 id[])    // IN: PVN ID to use (NULL if allocPvn == FALSE)
             ^~
In file included from ./arch/x86/include/asm/string.h:2:0,
                 from ./include/linux/string.h:18,
                 from ./arch/x86/include/asm/page_32.h:34,
                 from ./arch/x86/include/asm/page.h:13,
                 from ./arch/x86/include/asm/thread_info.h:11,
                 from ./include/linux/thread_info.h:54,
                 from ./arch/x86/include/asm/preempt.h:6,
                 from ./include/linux/preempt.h:59,
                 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:19,
                 from /tmp/modconfig-WyKnVU/vmnet-only/hub.c:25:
/tmp/modconfig-WyKnVU/vmnet-only/hub.c:315:36: warning: argument to ‘sizeof’ in ‘__builtin_memcpy’ call is the same pointer type ‘uint8 * {aka unsigned char *}’ as the destination; expected ‘uint8 {aka unsigned char}’ or an explicit length [-Wsizeof-pointer-memaccess]
   memcpy(hub->id.pvnID, id, sizeof id);
                                    ^
./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-WyKnVU/vmnet-only/vm_assert.h:45:0,
                 from /tmp/modconfig-WyKnVU/vmnet-only/monitorAction_exported.h:31,
                 from /tmp/modconfig-WyKnVU/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-WyKnVU/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-WyKnVU/vmnet-only/userif.c:45:
/tmp/modconfig-WyKnVU/vmnet-only/vm_basic_defs.h:696:0: warning: "DO_ONCE" redefined
 #define DO_ONCE(code)                                                   \

In file included from ./include/linux/random.h:10:0,
                 from ./include/linux/net.h:22,
                 from ./include/linux/skbuff.h:29,
                 from ./include/linux/if_ether.h:23,
                 from /tmp/modconfig-WyKnVU/vmnet-only/userif.c:27:
./include/linux/once.h:37:0: note: this is the location of the previous definition
 #define DO_ONCE(func, ...)           \

In file included from /tmp/modconfig-WyKnVU/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-WyKnVU/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-WyKnVU/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-WyKnVU/vmnet-only/userif.c:45:
/tmp/modconfig-WyKnVU/vmnet-only/vm_assert.h:259:0: warning: "DEPRECATED" redefined
    #define DEPRECATED(_fix) do {} while (0)

In file included from ./include/linux/kernel.h:13:0,
                 from ./include/linux/list.h:8,
                 from ./include/linux/wait.h:6,
                 from ./include/linux/fs.h:5,
                 from ./include/linux/highmem.h:4,
                 from /tmp/modconfig-WyKnVU/vmnet-only/userif.c:26:
./include/linux/printk.h:110:0: note: this is the location of the previous definition
 #define DEPRECATED "[Deprecated]: "

In file included from ./arch/x86/include/asm/processor.h:15:0,
                 from ./arch/x86/include/asm/cpufeature.h:4,
                 from ./arch/x86/include/asm/thread_info.h:52,
                 from ./include/linux/thread_info.h:54,
                 from ./arch/x86/include/asm/preempt.h:6,
                 from ./include/linux/preempt.h:59,
                 from ./include/linux/spinlock.h:50,
                 from ./include/linux/wait.h:8,
                 from ./include/linux/fs.h:5,
                 from ./include/linux/highmem.h:4,
                 from /tmp/modconfig-WyKnVU/vmnet-only/userif.c:26:
/tmp/modconfig-WyKnVU/vmnet-only/userif.c: In function ‘UserifLockPage’:
./arch/x86/include/asm/current.h:17:17: warning: passing argument 1 of ‘get_user_pages’ makes integer from pointer without a cast [-Wint-conversion]
 #define current get_current()
                 ^
/tmp/modconfig-WyKnVU/vmnet-only/userif.c:116:28: note: in expansion of macro ‘current’
    retval = get_user_pages(current, current->mm, addr,
                            ^~~~~~~
In file included from ./include/linux/highmem.h:7:0,
                 from /tmp/modconfig-WyKnVU/vmnet-only/userif.c:26:
./include/linux/mm.h:1315:6: note: expected ‘long unsigned int’ but argument is of type ‘struct task_struct *’
 long get_user_pages(unsigned long start, unsigned long nr_pages,
      ^~~~~~~~~~~~~~
In file included from ./arch/x86/include/asm/processor.h:15:0,
                 from ./arch/x86/include/asm/cpufeature.h:4,
                 from ./arch/x86/include/asm/thread_info.h:52,
                 from ./include/linux/thread_info.h:54,
                 from ./arch/x86/include/asm/preempt.h:6,
                 from ./include/linux/preempt.h:59,
                 from ./include/linux/spinlock.h:50,
                 from ./include/linux/wait.h:8,
                 from ./include/linux/fs.h:5,
                 from ./include/linux/highmem.h:4,
                 from /tmp/modconfig-WyKnVU/vmnet-only/userif.c:26:
./arch/x86/include/asm/current.h:17:17: warning: passing argument 2 of ‘get_user_pages’ makes integer from pointer without a cast [-Wint-conversion]
 #define current get_current()
                 ^
/tmp/modconfig-WyKnVU/vmnet-only/userif.c:116:37: note: in expansion of macro ‘current’
    retval = get_user_pages(current, current->mm, addr,
                                     ^~~~~~~
In file included from ./include/linux/highmem.h:7:0,
                 from /tmp/modconfig-WyKnVU/vmnet-only/userif.c:26:
./include/linux/mm.h:1315:6: note: expected ‘long unsigned int’ but argument is of type ‘struct mm_struct *’
 long get_user_pages(unsigned long start, unsigned long nr_pages,
      ^~~~~~~~~~~~~~
/tmp/modconfig-WyKnVU/vmnet-only/userif.c:117:10: warning: passing argument 5 of ‘get_user_pages’ makes pointer from integer without a cast [-Wint-conversion]
       1, 1, 0, &page, NULL);
          ^
In file included from ./include/linux/highmem.h:7:0,
                 from /tmp/modconfig-WyKnVU/vmnet-only/userif.c:26:
./include/linux/mm.h:1315:6: note: expected ‘struct page **’ but argument is of type ‘int’
 long get_user_pages(unsigned long start, unsigned long nr_pages,
      ^~~~~~~~~~~~~~
/tmp/modconfig-WyKnVU/vmnet-only/userif.c:116:13: error: too many arguments to function ‘get_user_pages’
    retval = get_user_pages(current, current->mm, addr,
             ^~~~~~~~~~~~~~
In file included from ./include/linux/highmem.h:7:0,
                 from /tmp/modconfig-WyKnVU/vmnet-only/userif.c:26:
./include/linux/mm.h:1315:6: note: declared here
 long get_user_pages(unsigned long start, unsigned long nr_pages,
      ^~~~~~~~~~~~~~
In file included from ./include/linux/pci.h:35:0,
                 from /tmp/modconfig-WyKnVU/vmnet-only/compat_netdevice.h:27,
                 from /tmp/modconfig-WyKnVU/vmnet-only/netif.c:43:
./include/linux/pci_ids.h:2253:0: warning: "PCI_VENDOR_ID_VMWARE" redefined
 #define PCI_VENDOR_ID_VMWARE  0x15ad

In file included from /tmp/modconfig-WyKnVU/vmnet-only/net.h:38:0,
                 from /tmp/modconfig-WyKnVU/vmnet-only/vnetInt.h:26,
                 from /tmp/modconfig-WyKnVU/vmnet-only/netif.c:42:
/tmp/modconfig-WyKnVU/vmnet-only/vm_device_version.h:56:0: note: this is the location of the previous definition
 #define PCI_VENDOR_ID_VMWARE                    0x15AD

/tmp/modconfig-WyKnVU/vmnet-only/netif.c: In function ‘VNetNetIf_Create’:
/tmp/modconfig-WyKnVU/vmnet-only/netif.c:152:64: error: macro "alloc_netdev" requires 4 arguments, but only 3 given
    dev = alloc_netdev(sizeof *netIf, deviceName, VNetNetIfSetup);
                                                                ^
/tmp/modconfig-WyKnVU/vmnet-only/netif.c:152:10: error: ‘alloc_netdev’ undeclared (first use in this function)
    dev = alloc_netdev(sizeof *netIf, deviceName, VNetNetIfSetup);
          ^~~~~~~~~~~~
/tmp/modconfig-WyKnVU/vmnet-only/netif.c:152:10: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:289: recipe for target '/tmp/modconfig-WyKnVU/vmnet-only/userif.o' failed
make[2]: *** [/tmp/modconfig-WyKnVU/vmnet-only/userif.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/modconfig-WyKnVU/vmnet-only/netif.c: In function ‘VNetNetifStartXmit’:
/tmp/modconfig-WyKnVU/vmnet-only/netif.c:464:7: error: ‘struct net_device’ has no member named ‘trans_start’; did you mean ‘mem_start’?
    dev->trans_start = jiffies;
       ^~
At top level:
/tmp/modconfig-WyKnVU/vmnet-only/netif.c:85:1: warning: ‘VNetNetIfSetup’ defined but not used [-Wunused-function]
 VNetNetIfSetup(struct net_device *dev)  // IN:
 ^~~~~~~~~~~~~~
scripts/Makefile.build:289: recipe for target '/tmp/modconfig-WyKnVU/vmnet-only/netif.o' failed
make[2]: *** [/tmp/modconfig-WyKnVU/vmnet-only/netif.o] Error 1
Makefile:1489: recipe for target '_module_/tmp/modconfig-WyKnVU/vmnet-only' failed
make[1]: *** [_module_/tmp/modconfig-WyKnVU/vmnet-only] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.8.0-22-generic'
Makefile:130: recipe for target 'vmnet.ko' failed
make: *** [vmnet.ko] Error 2
make: Leaving directory '/tmp/modconfig-WyKnVU/vmnet-only'
Unable to install all modules.  See log for details.

I know this is because of a too new kernel version for vmware 10. Can anyone please show me the work around this? How to make it compatible with the new kernel?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.