VMware – Not Working with Fedora 26 – GCC 7, and Workarounds..

UPDATE:  The vmware runtime fix shown here has not worked since version 12.5.6, and the solution is in a later article:  http://rglinuxtech.com/?p=1992

I have recently updated one crash-and-burn system to Fedora 26 (alpha/testing) and have encountered two problems with VMware and the ‘bleeding edge’ version of GCC included..

The first problem sounded very familiar, and it is a repeat of one from 2015, where the vmware runtime would simply not start, with no output..   (see http://rglinuxtech.com/?p=1601 )..  The second problem was with the ‘automated’ compilation of the VMware modules, and none of the usual methods worked.   Both problems can be traced to Fedora 26’s use of GCC version 7 (currently 7.0.1)

To get the vmware runtime to execute, force it to use the Fedora 26 versions of various glib2 libraries:

As root, cd to /usr/lib/vmware/lib , then:

# cp -afv /usr/lib64/libgio-2.0.so.0.5104.0 libgio-2.0.so.0/libgio-2.0.so.0
# cp -afv /usr/lib64/libglib-2.0.so.0.5104.0 libglib-2.0.so.0/libglib-2.0.so.0
# cp -afv /usr/lib64/libgmodule-2.0.so.0.5104.0 libgmodule-2.0.so.0/libgmodule-2.0.so.0
# cp -afv /usr/lib64/libgobject-2.0.so.0.5104.0 libgobject-2.0.so.0/libgobject-2.0.so.0
# cp -afv /usr/lib64/libgthread-2.0.so.0.5104.0 libgthread-2.0.so.0/libgthread-2.0.so.0

The VMware libraries are each in their own individual directory, with the same name as that library.. Of course, the Fedora 26 library version numbers may change over time..

After that, run vmware, forcing the use of the copied libraries:

# VMWARE_USE_SHIPPED_LIBS=force vmware

The application will run, but will immediately encounter the second problem…   VMware does not ‘recognise’ GCC version 7..

The vmware runtime graphical module compiler/installer will complain that ‘GNU C Compiler (gcc) version 6.3.1 was not found’, and then ‘A compatible version of gcc was not found’..

The command-line installer fails, but with less detail:

# vmware-modconfig --console --install-all
Failed to get gcc information.

The fix is a bit messy, but does work..

The VMware 12.5.3 vmmon and vmnet modules will actually both compile OK with GCC 7.0.1, and the trick is to manually install these, and then run the vmware runtime application directly, instead of via the normal ‘complaining’ scripts..

In the /usr/lib/vmware/modules/source directory, unTAR vmmon.tar and vmnet.tar, and then enter the resulting vmmon-only and vmnet-only directories and just type # make in each. Then create a /lib/modules/<kernel version>/misc directory, and copy vmmon.ko and vmnet.ko there, then #depmod -a.

To run the vmware runtime directly, instead of /usr/bin/vmware, run /usr/lib/vmware/bin/vmware, and the runtime application should execute without any gcc checks etc….

Combining the two workarounds, the runtime command is now:

# VMWARE_USE_SHIPPED_LIBS=force /usr/lib/vmware/bin/vmware

I have tested this with Fedora 26 – with GCC 7.0.1, and VMware 12.5.3, and it works..     The current release schedule shows this version of Fedora will be released around June 2017, but – of course – this may well slip..

Robert Gadsdon.  March 12, 2017.

Thanks to Vincent Cojot for the original glib2 fix info, in 2015..


Comments

VMware – Not Working with Fedora 26 – GCC 7, and Workarounds.. — 19 Comments

  1. Hey Robert,

    Thanks a bunch for the information being shared. I was following your advice and downloaded VMware-Workstation-Full-12.5.3-5115892.x86_64.bundle from VMWare but the modules are both the same size (different sha254 hash though). Yes, both fails to compile:

    vmmon-only]# make
    Using kernel build system.
    make -C /lib/modules/4.11.0-rc5/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= modules
    make[1]: Entering directory ‘/usr/src/kernels/linux-4.11-rc5’
    CC [M] /usr/lib/vmware/modules/source/vmmon-only/linux/driver.o
    /usr/lib/vmware/modules/source/vmmon-only/linux/driver.c:121:19: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    .fault = LinuxDriverFault
    ^~~~~~~~~~~~~~~~
    /usr/lib/vmware/modules/source/vmmon-only/linux/driver.c:121:19: note: (near initialization for ‘vmuser_mops.fault’)
    /usr/lib/vmware/modules/source/vmmon-only/linux/driver.c:1283:1: warning: always_inline function might not be inlinable [-Wattributes]
    LinuxDriverSyncReadTSCs(uint64 *delta) // OUT: TSC max – TSC min
    ^~~~~~~~~~~~~~~~~~~~~~~
    cc1: some warnings being treated as errors
    make[2]: *** [scripts/Makefile.build:295: /usr/lib/vmware/modules/source/vmmon-only/linux/driver.o] Error 1
    make[1]: *** [Makefile:1492: _module_/usr/lib/vmware/modules/source/vmmon-only] Error 2
    make[1]: Leaving directory ‘/usr/src/kernels/linux-4.11-rc5’
    make: *** [Makefile:120: vmmon.ko] Error 2

    vmnet-only]# make
    Using kernel build system.
    make -C /lib/modules/4.11.0-rc5/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= modules
    make[1]: Entering directory ‘/usr/src/kernels/linux-4.11-rc5’
    CC [M] /usr/lib/vmware/modules/source/vmnet-only/driver.o
    CC [M] /usr/lib/vmware/modules/source/vmnet-only/hub.o
    CC [M] /usr/lib/vmware/modules/source/vmnet-only/userif.o
    /usr/lib/vmware/modules/source/vmnet-only/userif.c: In function ‘VNetUserIfRead’:
    /usr/lib/vmware/modules/source/vmnet-only/userif.c:746:11: error: implicit declaration of function ‘signal_pending’; did you mean ‘timer_pending’? [-Werror=implicit-function-declaration]
    if (signal_pending(current)) {
    ^~~~~~~~~~~~~~
    timer_pending
    cc1: some warnings being treated as errors
    make[2]: *** [scripts/Makefile.build:295: /usr/lib/vmware/modules/source/vmnet-only/userif.o] Error 1
    make[1]: *** [Makefile:1492: _module_/usr/lib/vmware/modules/source/vmnet-only] Error 2
    make[1]: Leaving directory ‘/usr/src/kernels/linux-4.11-rc5’
    make: *** [Makefile:120: vmnet.ko] Error 2

    12.5.3 modules:
    —————
    vmmon.tar 1310720
    vmnet.tar 880640
    4391cccd6d3faa660dc9f625ed9476b0104c8bc0b6b0e63241eb529fcfd79873 vmmon.tar
    44fac31f02582f4e83eab8db60e765962c5842f9247da739ba4e65457f5943f8 vmnet.tar

    12.5.5 modules:
    —————
    vmmon.tar.orig 1310720
    vmnet.tar.orig 880640
    dd90dfbfb770117af634d239bfbcba32cd6b33fb75c2f29cac7c9ff51d692655 vmmon.tar.orig
    c75bd5888ffd007ff15412f8af45eca4fb7478329bd9472534ad14023c5a6d26 vmnet.tar.orig

    I’ve got gcc version 7.0.1 20170309 (Red Hat 7.0.1-0.12) (GCC)

    I’m not sure if VMWare updated the modules files for 12.5.3 as well. I’d really appreciate any further information you my have for this issue.

    Thank you.

    • I changed:
      CC_WARNINGS := -Wall -Wstrict-prototypes
      to
      CC_WARNINGS := -Wall -Wstrict-prototypes -Wno-error=incompatible-pointer-types -Wno-error=implicit-function-declaration
      to make it compile, but that’s not exactly a proper fix.

  2. This doesn’t seem to be sufficient in current Fedora 26 and VMWare Workstation 12.5.6. Doing the above still results in no output…I’d appreciate some help or a way to diagnose which libraries are causing this.

    • See latest article.. I had been testing 12.5.6 with Kernel 4.12, but on reverting to 4.11.3 found the same result – that the Fedora 26 / GCC 7 ‘workaround’ no longer worked..
      RG.

    • Hi Krishan – i have the same setup as you, but I still cannot compile vmmon – When I tried to apply the patches, it looks like the patches have already been applied, so I would like to know which module patches you used with 12.5.5

      Thanks

      • If you are able, I recommend updating to 12.5.7, as this does not need any kernel module patches, and works with all kernels, including 4.12..

        RG.

        • I seem to be unable to get VMWare Workstation 12.5.7 running on Fedora 26 with
          – gcc 7.1.1
          – libg*.5200.3
          – kernel 4.11.9-300.fc26

          What steps should I still execute of the procedure above ? I already tried several times to execute the full procedure but

          VMWARE_USE_SHIPPED_LIBS=force vmware doesn’t do anything for me nor does VMWARE_USE_SHIPPED_LIBS=force /usr/lib/vmware/bin/vmware
          at the end of the procedure

  3. After a look into the log under /tmp/vmware-*/*.log

    I saw that one additional lib was needed: libfontconfig

    so I additionally did:
    cp -afv /usr/lib64/libfontconfig.so.1.9.2 libfontconfig.so.1/libfontconfig.so.1

    after that it worked on
    * Fedora 4.11.9-300.fc26.x86_64
    * VMware Player 12.5.7 build-5813279

    • It didn’t work for me.
      cat /tmp/vmware-root/vmware-20230.log:

      2017-07-17T16:17:28.682+04:30| modconfig| I125: Reading in info for the vmmon module.
      2017-07-17T16:17:28.682+04:30| modconfig| I125: Reading in info for the vmnet module.
      2017-07-17T16:17:28.682+04:30| modconfig| I125: Reading in info for the vmblock module.
      2017-07-17T16:17:28.682+04:30| modconfig| I125: Reading in info for the vmci module.
      2017-07-17T16:17:28.682+04:30| modconfig| I125: Reading in info for the vsock module.
      2017-07-17T16:17:28.682+04:30| modconfig| I125: Setting vsock to depend on vmci.
      2017-07-17T16:17:28.690+04:30| modconfig| I125: Trying to find a suitable PBM set for kernel “4.11.9-300.fc26.x86_64”.
      2017-07-17T16:17:28.690+04:30| modconfig| I125: No matching PBM set was found for kernel “4.11.9-300.fc26.x86_64”.
      2017-07-17T16:17:28.690+04:30| modconfig| I125: Found compiler at “/bin/gcc”
      2017-07-17T16:17:28.692+04:30| modconfig| I125: Got gcc version “7”.
      2017-07-17T16:17:28.692+04:30| modconfig| I125: Unable to parse gcc version
      2017-07-17T16:17:28.694+04:30| modconfig| I125: We are now shutdown. Ready to die!

Leave a Reply

Your email address will not be published. Required fields are marked *