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

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.. — 2 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.

Leave a Reply

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