VMware Communities
gruna
Enthusiast
Enthusiast
Jump to solution

Workstation 12.1 does not compile on kernel 4.6.0-1

Please help.

Using kernel build system.                                                                                                       
make -C /lib/modules/4.6.0-1.gaf7ce24-default/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \                                     
  MODULEBUILDDIR= modules                                                                                                        
make[1]: Verzeichnis „/usr/src/linux-4.6.0-1.gaf7ce24-obj/x86_64/default“ wird betreten                                          
  CC [M]  /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.o                                                               

In file included from /usr/src/linux-4.6.0-1.gaf7ce24/arch/x86/include/asm/processor.h:15:0,

             from /usr/src/linux-4.6.0-1.gaf7ce24/arch/x86/include/asm/cpufeature.h:4,
             from /usr/src/linux-4.6.0-1.gaf7ce24/arch/x86/include/asm/thread_info.h:52,
             from /usr/src/linux-4.6.0-1.gaf7ce24/include/linux/thread_info.h:54,
             from /usr/src/linux-4.6.0-1.gaf7ce24/arch/x86/include/asm/preempt.h:6,
             from /usr/src/linux-4.6.0-1.gaf7ce24/include/linux/preempt.h:59,
             from /usr/src/linux-4.6.0-1.gaf7ce24/include/linux/spinlock.h:50,
             from /usr/src/linux-4.6.0-1.gaf7ce24/include/linux/mmzone.h:7,
             from /usr/src/linux-4.6.0-1.gaf7ce24/include/linux/gfp.h:5,
             from /usr/src/linux-4.6.0-1.gaf7ce24/include/linux/mm.h:9,
             from /usr/lib/vmware/modules/source/vmmon-only/./include/compat_page.h:23,
             from /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:32:

/usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c: In function ‘HostIFGetUserPages’:

/usr/src/linux-4.6.0-1.gaf7ce24/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()

             ^

/usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:1165:28: note: in expansion of macro ‘current’

retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
                        ^

In file included from /usr/lib/vmware/modules/source/vmmon-only/./include/compat_page.h:23:0,

             from /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:32:

/usr/src/linux-4.6.0-1.gaf7ce24/include/linux/mm.h:1266: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 /usr/src/linux-4.6.0-1.gaf7ce24/arch/x86/include/asm/processor.h:15:0,

             from /usr/src/linux-4.6.0-1.gaf7ce24/arch/x86/include/asm/cpufeature.h:4,
             from /usr/src/linux-4.6.0-1.gaf7ce24/arch/x86/include/asm/thread_info.h:52,
             from /usr/src/linux-4.6.0-1.gaf7ce24/include/linux/thread_info.h:54,
             from /usr/src/linux-4.6.0-1.gaf7ce24/arch/x86/include/asm/preempt.h:6,
             from /usr/src/linux-4.6.0-1.gaf7ce24/include/linux/preempt.h:59,
             from /usr/src/linux-4.6.0-1.gaf7ce24/include/linux/spinlock.h:50,
             from /usr/src/linux-4.6.0-1.gaf7ce24/include/linux/mmzone.h:7,
             from /usr/src/linux-4.6.0-1.gaf7ce24/include/linux/gfp.h:5,
             from /usr/src/linux-4.6.0-1.gaf7ce24/include/linux/mm.h:9,
             from /usr/lib/vmware/modules/source/vmmon-only/./include/compat_page.h:23,
             from /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:32:

/usr/src/linux-4.6.0-1.gaf7ce24/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()

             ^

/usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:1165:37: note: in expansion of macro ‘current’

retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
                                 ^

In file included from /usr/lib/vmware/modules/source/vmmon-only/./include/compat_page.h:23:0,

             from /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:32:

/usr/src/linux-4.6.0-1.gaf7ce24/include/linux/mm.h:1266: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,

  ^

/usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:1165:13: error: too many arguments to function ‘get_user_pages’

retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
         ^

In file included from /usr/lib/vmware/modules/source/vmmon-only/./include/compat_page.h:23:0,

             from /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:32:

/usr/src/linux-4.6.0-1.gaf7ce24/include/linux/mm.h:1266:6: note: declared here

long get_user_pages(unsigned long start, unsigned long nr_pages,

  ^

/usr/src/linux-4.6.0-1.gaf7ce24/scripts/Makefile.build:292: die Regel für Ziel „/usr/lib/vmware/modules/source/vmmon-only/linux/hostif.o“ scheiterte

make[4]: *** [/usr/lib/vmware/modules/source/vmmon-only/linux/hostif.o] Fehler 1

/usr/src/linux-4.6.0-1.gaf7ce24/Makefile:1454: die Regel für Ziel „_module_/usr/lib/vmware/modules/source/vmmon-only“ scheiterte

make[3]: *** [_module_/usr/lib/vmware/modules/source/vmmon-only] Fehler 2

Makefile:146: die Regel für Ziel „sub-make“ scheiterte

make[2]: *** [sub-make] Fehler 2

Makefile:24: die Regel für Ziel „__sub-make“ scheiterte

make[1]: *** [__sub-make] Fehler 2

make[1]: Verzeichnis „/usr/src/linux-4.6.0-1.gaf7ce24-obj/x86_64/default“ wird verlassen

Makefile:120: die Regel für Ziel „vmmon.ko“ scheiterte

make: *** [vmmon.ko] Fehler 2

1 Solution

Accepted Solutions
alexsandr1981
Contributor
Contributor
Jump to solution

Bug 1278896 – VMware Workstation 12 not starting On Fedora 23

REPL:

after kernel 4.4 (VMWare Workstation 12) need some changes in c code:

/usr/lib/vmware/modules/source

1) vmmon.tar

  - untar

  - change ./vmmon-only/linux/hostif.c

  - replace all:

  "get_user_pages" to "get_user_pages_remote"

  - tar and replace original

2) vmnet.tar

  - untar

  - change ./vmnet-only/userif.c

  - replace all:

  "get_user_pages" to "get_user_pages_remote"

  - tar and replace original

Successful compiled on FC23 FC24, FC25 (kernel 4.7)

View solution in original post

17 Replies
alexsandr1981
Contributor
Contributor
Jump to solution

Bug 1278896 – VMware Workstation 12 not starting On Fedora 23

REPL:

after kernel 4.4 (VMWare Workstation 12) need some changes in c code:

/usr/lib/vmware/modules/source

1) vmmon.tar

  - untar

  - change ./vmmon-only/linux/hostif.c

  - replace all:

  "get_user_pages" to "get_user_pages_remote"

  - tar and replace original

2) vmnet.tar

  - untar

  - change ./vmnet-only/userif.c

  - replace all:

  "get_user_pages" to "get_user_pages_remote"

  - tar and replace original

Successful compiled on FC23 FC24, FC25 (kernel 4.7)

gruna
Enthusiast
Enthusiast
Jump to solution

Thank you Alex.

Your hint works as expected.

The only thing, which wonders me is - i went with each kernel version 4.4 and 4.5 and didn't need this code change till now with 4.6.

I use opensuse vanilla kernel, but maybe they still add something.

Reply
0 Kudos
vjorge
Contributor
Contributor
Jump to solution

Hi,

Have the same issue with debian kernel 4.6.0, had to apply the patch to vmnet and vmmon, but the vmci does not compile, returns the error bellow.

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 kernel build system.

make: Entering directory `/tmp/modconfig-qXsjHB/vmci-only'

/usr/bin/make -C /lib/modules/4.6.0/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \

      MODULEBUILDDIR= modules

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

  CC [M]  /tmp/modconfig-qXsjHB/vmci-only/linux/driver.o

  CC [M]  /tmp/modconfig-qXsjHB/vmci-only/linux/vmciKernelIf.o

  CC [M]  /tmp/modconfig-qXsjHB/vmci-only/common/vmciContext.o

  CC [M]  /tmp/modconfig-qXsjHB/vmci-only/common/vmciDatagram.o

In file included from /tmp/modconfig-qXsjHB/vmci-only/linux/driver.c:61:0:

/tmp/modconfig-qXsjHB/vmci-only/./shared/vm_device_version.h:56:0: warning: "PCI_VENDOR_ID_VMWARE" redefined [enabled by default]

#define PCI_VENDOR_ID_VMWARE                    0x15AD

^

In file included from include/linux/pci.h:35:0,

                 from /tmp/modconfig-qXsjHB/vmci-only/./shared/compat_pci.h:27,

                 from /tmp/modconfig-qXsjHB/vmci-only/linux/driver.c:50:

include/linux/pci_ids.h:2253:0: note: this is the location of the previous definition

#define PCI_VENDOR_ID_VMWARE  0x15ad

^

/tmp/modconfig-qXsjHB/vmci-only/linux/vmciKernelIf.c: In function ‘__VMCIMemcpyToQueue’:

/tmp/modconfig-qXsjHB/vmci-only/linux/vmciKernelIf.c:1205:10: error: implicit declaration of function ‘memcpy_fromiovec’ [-Werror=implicit-function-declaration]

          err = memcpy_fromiovec((uint8 *)va + pageOffset, iov, toCopy);

          ^

/tmp/modconfig-qXsjHB/vmci-only/linux/vmciKernelIf.c: In function ‘__VMCIMemcpyFromQueue’:

/tmp/modconfig-qXsjHB/vmci-only/linux/driver.c: In function ‘vmci_exit’:

/tmp/modconfig-qXsjHB/vmci-only/linux/vmciKernelIf.c:1280:10: error: implicit declaration of function ‘memcpy_toiovec’ [-Werror=implicit-function-declaration]

          err = memcpy_toiovec(iov, (uint8 *)va + pageOffset, toCopy);

          ^

/tmp/modconfig-qXsjHB/vmci-only/linux/driver.c:2483:14: error: void value not ignored as it ought to be

       retval = misc_deregister(&linuxState.misc);

              ^

/tmp/modconfig-qXsjHB/vmci-only/linux/vmciKernelIf.c: In function ‘VMCIReleasePages’:

/tmp/modconfig-qXsjHB/vmci-only/linux/vmciKernelIf.c:1837:7: error: implicit declaration of function ‘page_cache_release’ [-Werror=implicit-function-declaration]

       page_cache_release(pages[i]);

       ^

cc1: some warnings being treated as errors

make[2]: *** [/tmp/modconfig-qXsjHB/vmci-only/linux/vmciKernelIf.o] Error 1

make[2]: *** Waiting for unfinished jobs....

make[2]: *** [/tmp/modconfig-qXsjHB/vmci-only/linux/driver.o] Error 1

make[1]: *** [_module_/tmp/modconfig-qXsjHB/vmci-only] Error 2

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

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

make: Leaving directory `/tmp/modconfig-qXsjHB/vmci-only'

Starting VMware services:

   Virtual machine monitor                                             done

   Virtual machine communication interface                            failed

   VM communication interface socket family                            done

   Blocking file system                                                done

   Virtual ethernet                                                    done

   VMware Authentication Daemon                                        done

Reply
0 Kudos
zwierbel
Enthusiast
Enthusiast
Jump to solution

Hello vjorge,

have you solved the issue? I'm also on Debian with 4.6......

Thanks!

Reply
0 Kudos
alexsandr1981
Contributor
Contributor
Jump to solution

haven't such errors but try in

/vmci-only/linux/driver.c:2483:14


retval = misc_deregister(&linuxState.misc);

      if (retval) {

         Warning(LGPFX "Module %s: error unregistering\n", VMCI_MODULE_NAME);

      } else {

         Log(LGPFX"Module %s: unloaded\n", VMCI_MODULE_NAME);

      }

TO:

  misc_deregister(&linuxState.misc);

  //    if (retval) {

  //       Warning(LGPFX "Module %s: error unregistering\n", VMCI_MODULE_NAME);

  //    } else {

  //       Log(LGPFX"Module %s: unloaded\n", VMCI_MODULE_NAME);

  //    }

Reply
0 Kudos
alexsandr1981
Contributor
Contributor
Jump to solution

install  kernel-headers package

Reply
0 Kudos
avs234
Contributor
Contributor
Jump to solution

4.6.1/ runs OK with everywhere replaced as

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,1)

   retval = get_user_pages(addr, 1, 0, 0, &page, NULL);

#else

   retval = get_user_pages(current, current->mm, addr, 1, 1, 0, &page, NULL);

#endif

#if LINUX_VERSION_CODE < KERNEL_VERSION(4,6,1)

        page_cache_release(pages[i]);

#else

        put_page(pages[i]);

#endif

Reply
0 Kudos
billzq
Contributor
Contributor
Jump to solution

I wrote a fixing script to help solving the problem, which is in the attachment

Reply
0 Kudos
loungehostmaste
Enthusiast
Enthusiast
Jump to solution

no success after apply the replacements on Fedora 23 with the 4.6.3 kernel from koji

why in the world can't vmware maintain that two tar files properly and publish them independent of new vmware releases given that new kernels are *months* before in testing and after 3 minor update sof a new kernel version it's REALLY TIME to get the house clean

Using kernel build system.

make -C /lib/modules/4.6.3-200.fc23.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \

  MODULEBUILDDIR= modules

make[1]: Entering directory '/usr/src/kernels/4.6.3-200.fc23.x86_64'

make[2]: *** No rule to make target '/tmp/vmware-modules-build/vmmon-only/linux/driverLog.o', needed by '/tmp/vmware-modules-build/vmmon-only/vmmon.o'.  Schluss.

Makefile:1433: recipe for target '_module_/tmp/vmware-modules-build/vmmon-only' failed

Reply
0 Kudos
loungehostmaste
Enthusiast
Enthusiast
Jump to solution

Trying implicit prerequisite '/tmp/vmware-modules-build/vmnet-only/driver.c'.
Trying rule prerequisite 'scripts/recordmcount.c'.
Trying rule prerequisite 'scripts/recordmcount.h'.
Trying rule prerequisite 'tools/objtool/objtool'.
Trying pattern rule with stem 'driver'.
Trying implicit prerequisite '/tmp/vmware-modules-build/vmnet-only/driver.S'.
Trying pattern rule with stem 'driver.o'.
Trying implicit prerequisite '/tmp/vmware-modules-build/vmnet-only/driver.o_shipped'.
Trying pattern rule with stem 'driver'.
Trying implicit prerequisite '/tmp/vmware-modules-build/vmnet-only/driver.c'.
Trying rule prerequisite 'scripts/recordmcount.c'.
Trying rule prerequisite 'scripts/recordmcount.h'.
Trying rule prerequisite 'tools/objtool/objtool'.
Looking for a rule with intermediate file 'tools/objtool/objtool'.
  Avoiding implicit rule recursion.
Trying pattern rule with stem 'driver'.
Trying implicit prerequisite '/tmp/vmware-modules-build/vmnet-only/driver.S'.
Looking for a rule with intermediate file '/tmp/vmware-modules-build/vmnet-only/driver.S'.
  Avoiding implicit rule recursion.
  Trying pattern rule with stem 'driver.S'.
  Trying implicit prerequisite '/tmp/vmware-modules-build/vmnet-only/driver.S_shipped'.
  Trying pattern rule with stem 'driver.S'.
  Trying implicit prerequisite '/tmp/vmware-modules-build/vmnet-only/driver.S_shipped'.
  Looking for a rule with intermediate file '/tmp/vmware-modules-build/vmnet-only/driver.S_shipped'.
   Avoiding implicit rule recursion.
   Avoiding implicit rule recursion.
Trying pattern rule with stem 'driver.o'.
Trying implicit prerequisite '/tmp/vmware-modules-build/vmnet-only/driver.o_shipped'.
Looking for a rule with intermediate file '/tmp/vmware-modules-build/vmnet-only/driver.o_shipped'.
  Avoiding implicit rule recursion.
No implicit rule found for '/tmp/vmware-modules-build/vmnet-only/driver.o'.
Finished prerequisites of target file '/tmp/vmware-modules-build/vmnet-only/driver.o'.
Must remake target '/tmp/vmware-modules-build/vmnet-only/driver.o'.

make[2]: *** No rule to make target '/tmp/vmware-modules-build/vmnet-only/driver.o', needed by '/tmp/vmware-modules-build/vmnet-only/vmnet.o'.  Stop.

Reaping losing child 0x55c1131a1700 PID 17708

Makefile:1433: recipe for target '_module_/tmp/vmware-modules-build/vmnet-only' failed

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

Removing child 0x55c1131a1700 PID 17708 from chain.

make[1]: Leaving directory '/usr/src/kernels/4.6.3-200.fc23.x86_64'

Reaping losing child 0x55ab13a4d780 PID 17432

Makefile:120: recipe for target 'vmnet.ko' failed

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

Removing child 0x55ab13a4d780 PID 17432 from chain.

[root@rh:/usr/lib/vmware/modules/source]$ rpm -qa | grep 4.6.3-200

kernel-modules-4.6.3-200.fc23.x86_64

kernel-core-4.6.3-200.fc23.x86_64

kernel-headers-4.6.3-200.fc23.x86_64

kernel-devel-4.6.3-200.fc23.x86_64

Reply
0 Kudos
RonanM
VMware Employee
VMware Employee
Jump to solution

The accepted answer appears to be missing removing the original .tar files, or the changes aren't accepted.

The Archwiki has the best method:

Kernel modules fail to build after Linux 4.6

As of VMware Workstation Pro 12.1, the module source needs to be modified to be successfully compiled [2].

https://wiki.archlinux.org/index.php/VMware#Kernel_modules_fail_to_build_after_Linux_4.6

sudo -i

cd /usr/lib/vmware/modules/source

tar xf vmmon.tar

mv vmmon.tar vmmon.old.tar

sed -i -e 's/get_user_pages/get_user_pages_remote/g' vmmon-only/linux/hostif.c

tar cf vmmon.tar vmmon-only

rm -r vmmon-only

tar xf vmnet.tar

mv vmnet.tar vmnet.old.tar

sed -i -e 's/get_user_pages/get_user_pages_remote/g' vmnet-only/userif.c

tar cf vmnet.tar vmnet-only

rm -r vmnet-only

Reply
0 Kudos
PhilAd
Contributor
Contributor
Jump to solution

Hi,

I'm using Arch Linux with Kernel 4.7.0-1 ... using the arch wiki to compile with new linux kernels worked till 4.6 perfectly.

But this time I get the following after following the Arch Wiki:

...

/tmp/modconfig-BrNPML/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Free() falls through to next function PhysTrack_Add()

/tmp/modconfig-BrNPML/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Add() falls through to next function PhysTrack_Remove()

/tmp/modconfig-BrNPML/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Remove() falls through to next function PhysTrack_Test()

/tmp/modconfig-BrNPML/vmmon-only/linux/hostif.c: In Funktion »HostIFGetUserPages«:

/tmp/modconfig-BrNPML/vmmon-only/linux/hostif.c:1165:13: Fehler: Implizite Deklaration der Funktion »get_user_pages_remote_remote_remote« [-Werror=implicit-function-declaration]

    retval = get_user_pages_remote_remote_remote(current, current->mm, (unsigned long)uvAddr,

             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/tmp/modconfig-BrNPML/vmmon-only/linux/driver.c:1283:1: Warnung: always_inline könnte nicht als inline erzeugt werden [-Wattributes]

LinuxDriverSyncReadTSCs(uint64 *delta) // OUT: TSC max - TSC min

^~~~~~~~~~~~~~~~~~~~~~~

/tmp/modconfig-BrNPML/vmmon-only/common/task.o: warning: objtool: .text: unexpected end of section

cc1: Einige Warnungen werden als Fehler behandelt

make[2]: *** [scripts/Makefile.build:289: /tmp/modconfig-BrNPML/vmmon-only/linux/hostif.o] Fehler 1

make[1]: *** [Makefile:1457: _module_/tmp/modconfig-BrNPML/vmmon-only] Fehler 2

make[1]: Verzeichnis „/usr/lib/modules/4.7.0-1-ARCH/build“ wird verlassen

make: *** [Makefile:120: vmmon.ko] Fehler 2

make: Verzeichnis „/tmp/modconfig-BrNPML/vmmon-only“ wird verlassen

make: Verzeichnis „/tmp/modconfig-BrNPML/vmnet-only“ wird betreten

...

/tmp/modconfig-BrNPML/vmnet-only/userif.c:116:13: Fehler: Implizite Deklaration der Funktion »get_user_pages_remote_remote_remote« [-Werror=implicit-function-declaration]

    retval = get_user_pages_remote_remote_remote(current, current->mm, addr,

             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  CC [M]  /tmp/modconfig-BrNPML/vmnet-only/vnetUserListener.o

In file included from /tmp/modconfig-BrNPML/vmnet-only/net.h:38:0,

                 from /tmp/modconfig-BrNPML/vmnet-only/vnetInt.h:26,

                 from /tmp/modconfig-BrNPML/vmnet-only/bridge.c:52:

/tmp/modconfig-BrNPML/vmnet-only/vm_device_version.h:56:0: Warnung: »PCI_VENDOR_ID_VMWARE« redefiniert

#define PCI_VENDOR_ID_VMWARE                    0x15AD

In file included from include/linux/pci.h:35:0,

                 from /tmp/modconfig-BrNPML/vmnet-only/compat_netdevice.h:27,

                 from /tmp/modconfig-BrNPML/vmnet-only/bridge.c:51:

include/linux/pci_ids.h:2253:0: Anmerkung: dies ist die Stelle der vorherigen Definition

#define PCI_VENDOR_ID_VMWARE  0x15ad

cc1: Einige Warnungen werden als Fehler behandelt

make[2]: *** [scripts/Makefile.build:289: /tmp/modconfig-BrNPML/vmnet-only/userif.o] Fehler 1

make[2]: *** Es wird auf noch nicht beendete Prozesse gewartet....

make[1]: *** [Makefile:1457: _module_/tmp/modconfig-BrNPML/vmnet-only] Fehler 2

make[1]: Verzeichnis „/usr/lib/modules/4.7.0-1-ARCH/build“ wird verlassen

make: *** [Makefile:120: vmnet.ko] Fehler 2

make: Verzeichnis „/tmp/modconfig-BrNPML/vmnet-only“ wird verlassen

Unable to install all modules.  See log for details.

...

/tmp/modconfig-yPbZDW/vmmon-only/linux/hostif.c:1165:13: Fehler: Implizite Deklaration der Funktion »get_user_pages_remote_remote_remote« [-Werror=implicit-function-declaration]

    retval = get_user_pages_remote_remote_remote(current, current->mm, (unsigned long)uvAddr,

             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cc1: Einige Warnungen werden als Fehler behandelt

make[2]: *** [scripts/Makefile.build:289: /tmp/modconfig-yPbZDW/vmmon-only/linux/hostif.o] Fehler 1

make[1]: *** [Makefile:1457: _module_/tmp/modconfig-yPbZDW/vmmon-only] Fehler 2

make[1]: Verzeichnis „/usr/lib/modules/4.7.0-1-ARCH/build“ wird verlassen

make: *** [Makefile:120: vmmon.ko] Fehler 2

make: Verzeichnis „/tmp/modconfig-yPbZDW/vmmon-only“ wird verlassen

make: Verzeichnis „/tmp/modconfig-yPbZDW/vmnet-only“ wird betreten

...

/tmp/modconfig-yPbZDW/vmnet-only/userif.c:116:13: Fehler: Implizite Deklaration der Funktion »get_user_pages_remote_remote_remote« [-Werror=implicit-function-declaration]

    retval = get_user_pages_remote_remote_remote(current, current->mm, addr,

             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from /tmp/modconfig-yPbZDW/vmnet-only/net.h:38:0,

                 from /tmp/modconfig-yPbZDW/vmnet-only/vnetInt.h:26,

                 from /tmp/modconfig-yPbZDW/vmnet-only/bridge.c:52:

/tmp/modconfig-yPbZDW/vmnet-only/vm_device_version.h:56:0: Warnung: »PCI_VENDOR_ID_VMWARE« redefiniert

#define PCI_VENDOR_ID_VMWARE                    0x15AD

In file included from include/linux/pci.h:35:0,

                 from /tmp/modconfig-yPbZDW/vmnet-only/compat_netdevice.h:27,

                 from /tmp/modconfig-yPbZDW/vmnet-only/bridge.c:51:

include/linux/pci_ids.h:2253:0: Anmerkung: dies ist die Stelle der vorherigen Definition

#define PCI_VENDOR_ID_VMWARE  0x15ad

cc1: Einige Warnungen werden als Fehler behandelt

make[2]: *** [scripts/Makefile.build:289: /tmp/modconfig-yPbZDW/vmnet-only/userif.o] Fehler 1

make[2]: *** Es wird auf noch nicht beendete Prozesse gewartet....

make[1]: *** [Makefile:1457: _module_/tmp/modconfig-yPbZDW/vmnet-only] Fehler 2

make[1]: Verzeichnis „/usr/lib/modules/4.7.0-1-ARCH/build“ wird verlassen

make: *** [Makefile:120: vmnet.ko] Fehler 2

make: Verzeichnis „/tmp/modconfig-yPbZDW/vmnet-only“ wird verlassen

It seems that he is not applying my changes?

# sudo -

# cd /usr/lib/vmware/modules/source

# tar xf vmmon.tar

# mv vmmon.tar vmmon.old.tar

# sed -i -e 's/get_user_pages/get_user_pages_remote/g' vmmon-only/linux/hostif.c

# tar cf vmmon.tar vmmon-only

# rm -r vmmon-only

# tar xf vmnet.tar
# mv vmnet.tar vmnet.old.tar
# sed -i -e 's/get_user_pages/get_user_pages_remote/g' vmnet-only/userif.c
# sed -i -e 's/dev->trans_start = jiffies/netif_trans_update\(dev\)/g' vmnet-only/netif.c
# tar cf vmnet.tar vmnet-only
# rm -r vmnet-only
Reply
0 Kudos
antnythr
Contributor
Contributor
Jump to solution

Hey PhilAd,

I had the same problem and fixed it by uninstalling VMWare Player, then re-installing it, then following the commands as listed on the Arch Wiki.

Reply
0 Kudos
dariusd
VMware Employee
VMware Employee
Jump to solution

The problem is that you've made the same change three times now.  Each time you run the command

   sed -i -e 's/get_user_pages/get_user_pages_remote/g' vmmon-only/linux/hostif.c

it adds a "_remote" to the end of every occurrence of "get_user_pages".  But if you run the same command again, "get_user_pages_remote" also contains the text "get_user_pages" that we're searching for, which means that "get_user_pages_remote" becomes "get_user_pages_remote_remote", and so on.  If you do that three times, you get "get_user_pages_remote_remote_remote", which is what is showing up in the error message you posted.

You could either simply reinstall Workstation to get a fresh vmmon.tar, or you could try running:

sed -i -e 's/get_user_pages\(_remote\)*/get_user_pages_remote/g' vmmon-only/linux/hostif.c

to undo the damage.

Cheers,

--

Darius

PhilAd
Contributor
Contributor
Jump to solution

thanks dariusd ...

sed -i -e 's/get_user_pages\(_remote\)*/get_user_pages_remote/g' vmmon-only/linux/hostif.c

and

sed -i -e 's/get_user_pages\(_remote\)*/get_user_pages_remote/g' vmnet-only/netif.c


did correct the changes and it worked for me.


Reply
0 Kudos
sinclairj
Contributor
Contributor
Jump to solution

it did not work for me with linux kernel 4.4.0-144-generic and workstation pro 12.5.7. I am getting below error

make: Entering directory `/tmp/modconfig-omDv5m/vmnet-only'

/usr/bin/make -C /lib/modules/4.4.0-144-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \

  MODULEBUILDDIR= modules

make[1]: Entering directory `/usr/src/linux-headers-4.4.0-144-generic'

  CC [M]  /tmp/modconfig-omDv5m/vmnet-only/driver.o

  CC [M]  /tmp/modconfig-omDv5m/vmnet-only/hub.o

  CC [M]  /tmp/modconfig-omDv5m/vmnet-only/userif.o

  CC [M]  /tmp/modconfig-omDv5m/vmnet-only/netif.o

/tmp/modconfig-omDv5m/vmnet-only/userif.c: In function ‘UserifLockPage’:

/tmp/modconfig-omDv5m/vmnet-only/userif.c:124:4: error: implicit declaration of function ‘get_user_pages_remote’ [-Werror=implicit-function-declaration]

    retval = get_user_pages_remote(current, current->mm, addr,

    ^

In file included from include/linux/pci.h:35:0,

                 from /tmp/modconfig-omDv5m/vmnet-only/compat_netdevice.h:27,

                 from /tmp/modconfig-omDv5m/vmnet-only/netif.c:43:

include/linux/pci_ids.h:2253:0: warning: "PCI_VENDOR_ID_VMWARE" redefined [enabled by default]

#define PCI_VENDOR_ID_VMWARE  0x15ad

^

In file included from /tmp/modconfig-omDv5m/vmnet-only/net.h:38:0,

                 from /tmp/modconfig-omDv5m/vmnet-only/vnetInt.h:26,

                 from /tmp/modconfig-omDv5m/vmnet-only/netif.c:42:

/tmp/modconfig-omDv5m/vmnet-only/vm_device_version.h:56:0: note: this is the location of the previous definition

#define PCI_VENDOR_ID_VMWARE                    0x15AD

^

cc1: some warnings being treated as errors

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

make[2]: *** Waiting for unfinished jobs....

make[1]: *** [_module_/tmp/modconfig-omDv5m/vmnet-only] Error 2

make[1]: Leaving directory `/usr/src/linux-headers-4.4.0-144-generic'

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

make: Leaving directory `/tmp/modconfig-omDv5m/vmnet-only'

Unable to install all modules.  See log for details.

Reply
0 Kudos
sinclairj
Contributor
Contributor
Jump to solution

Wanted to informed I am able to fix above error with below changes.

replace  in vmnet-only/userif.c

---------

retval = get_user_pages(current, current->mm, addr,

                           1, 1, 0, &page, NULL);

-----------

to

----------

retval = get_user_pages(current, current->mm, addr,

                           1, 1, &page, NULL);

-------------------------

Similarly

replace vmmon-only/linux/hostif.c

-------------

retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,

                           numPages, 0, 0, ppages, NULL);

----------------

to

-----------

retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,

                           numPages, 0, ppages, NULL);

---------

Note : do the changes depend on your kernel version in mentioned block of get_user_pages

Reply
0 Kudos