Mailinglist Archive: opensuse-factory (1324 mails)

< Previous Next >
[opensuse-factory] Getting VMware Workstation to compile and run again on Tumbleweed using kernel-source-4.2.1
  • From: James PEARSON <pearson45j@xxxxxxxxx>
  • Date: Tue, 6 Oct 2015 20:23:11 +0200
  • Message-id: <20151006202311.348844d1@Sabertooth>
Hello all

VMware has been working great but running "zypper dup" last night (the 5th of
Oct) installed kernel 4.2.1-1. As a result I was no longer able to manually
recompile the VMware Workstation "vmnet" module without errors:
Ex. Error 1: No Internet connection
Ex. Error 2: The status of the "Virtual ethernet" was "failed"
Ex. Error 3: Virtual ethernet  failed kernel-source-4.2.1
/usr/lib/vmware/modules/source/vmnet-only/bridge.o' failed
For more info concerning the exact error messages when compiling, see "ORIGINAL
ERROR MESSAGES" at the end of this email

Note : Before the update I was on kernel 4.1.6-3.2

# my current installation of tumbleweed follows
cat version
Linux version 4.2.1-1-desktop (geeko@buildhost) (gcc version 5.1.1 20150713
[gcc-5-branch revision 225736] (SUSE Linux) ) #1 SMP PREEMPT Fri Sep 25
08:21:54 UTC 2015 (6996a42)
# note : this was a fresh installation some 5 or 6 weeks ago

# A list of the versions of installed support packages follows...
kernel-source-4.2.1-1.2.noarch
kernel-desktop-4.2.1-1.2.x86_64
kernel-desktop-devel-4.2.1-1.2.x86_64
gcc-5-1.24.x86_64
make-4.1-3.1.x86_64
gcc-c++-5-1.24.x86_64

# A list of the installed ***kernel*** packages...
kernel-desktop-4.2.1-1.2.x86_64
kernel-desktop-devel-4.2.1-1.2.x86_64
kernel-devel-4.2.1-1.2.noarch
kernel-macros-4.2.1-1.2.noarch
kernel-source-4.2.1-1.2.noarch

My notes on how to solve the problem and get VMware up and running again are
below.
The follwing works on VMware Workstatin e.x.p build-2882284 (the experential
release before version 12)
I believe that it will also work on version 11

# A few related sites that I found while googling today follow
- https://communities.vmware.com/thread/516196
- http://rglinuxtech.com/?p=1528

# START
########################################################
# make working directory
########################################################

rm -r /tmp/vmware
mkdir /tmp/vmware && cd /tmp/vmware

# copy VMware source files
cp -R /usr/lib/vmware/modules/source/ .
cd /tmp/vmware/source

for i in ./*.tar; do tar -xf $i; done

for i in ./*.tar; do mv $i $i.orginal; done

cd tmp/vmware/source/vmnet-only #

########################################################
# Modify vmnetInt.h
########################################################

cp ./vmnetInt.h vmnetInt.h.old
vi vmnetInt.h

# in vmnetInt.h, I found
xtern struct proto vmnet_proto;
#ifdef VMW_NETDEV_HAS_NET
# define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \
PF_NETLINK, _pri, &vmnet_proto)
#else
# define compat_sk_alloc(_bri, _pri) sk_alloc(PF_NETLINK, _pri, &vmnet_proto,
1)
#endif


# In vmnet-only/vmnetInt.h..
# Around line 79, the instructions state to change:

#ifdef VMW_NETDEV_HAS_NET
# define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \
PF_NETLINK, _pri, &vmnet_proto,)
#else
# define compat_sk_alloc(_bri, _pri) sk_alloc(PF_NETLINK, _pri, &vmnet_proto, 1)
#endif

to:

#ifdef VMW_NETDEV_HAS_NET
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 00)
# define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \
PF_NETLINK, _pri, &vmnet_proto, 1)
#else
# define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \
PF_NETLINK, _pri, &vmnet_proto)
#endif
#else
# define compat_sk_alloc(_bri, _pri) sk_alloc(PF_NETLINK, _pri, &vmnet_proto, 1)
#endif

# Now exit saving your changes and run make
make
cd ..

########################################################
# Results
########################################################

-rw-r--r-- 1 root root 3268 Oct 6 19:09 vmnetInt.h.old
-rw-r--r-- 1 root root 3422 Oct 6 19:17 vmnetInt.h
Sabertooth:/tmp/vmware/source/vmnet-only # make
Using kernel build system.
make -C /lib/modules/4.2.1-1-desktop/build/include/.. SUBDIRS=$PWD
SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-4.2.1-1-obj/x86_64/desktop'
CC [M] /tmp/vmware/source/vmnet-only/driver.o
CC [M] /tmp/vmware/source/vmnet-only/hub.o
CC [M] /tmp/vmware/source/vmnet-only/userif.o
CC [M] /tmp/vmware/source/vmnet-only/netif.o
In file included from /usr/src/linux-4.2.1-1/include/linux/pci.h:35:0,
from /tmp/vmware/source/vmnet-only/compat_netdevice.h:27,
from /tmp/vmware/source/vmnet-only/netif.c:43:
/usr/src/linux-4.2.1-1/include/linux/pci_ids.h:2253:0: warning:
"PCI_VENDOR_ID_VMWARE" redefined
#define PCI_VENDOR_ID_VMWARE 0x15ad
^
In file included from /tmp/vmware/source/vmnet-only/net.h:38:0,
from /tmp/vmware/source/vmnet-only/vnetInt.h:26,
from /tmp/vmware/source/vmnet-only/netif.c:42:
/tmp/vmware/source/vmnet-only/vm_device_version.h:56:0: note: this is the
location of the previous definition
#define PCI_VENDOR_ID_VMWARE 0x15AD
^
CC [M] /tmp/vmware/source/vmnet-only/bridge.o
In file included from /tmp/vmware/source/vmnet-only/net.h:38:0,
from /tmp/vmware/source/vmnet-only/vnetInt.h:26,
from /tmp/vmware/source/vmnet-only/bridge.c:52:
/tmp/vmware/source/vmnet-only/vm_device_version.h:56:0: warning:
"PCI_VENDOR_ID_VMWARE" redefined
#define PCI_VENDOR_ID_VMWARE 0x15AD
^
In file included from /usr/src/linux-4.2.1-1/include/linux/pci.h:35:0,
from /tmp/vmware/source/vmnet-only/compat_netdevice.h:27,
from /tmp/vmware/source/vmnet-only/bridge.c:51:
/usr/src/linux-4.2.1-1/include/linux/pci_ids.h:2253:0: note: this is the
location of the previous definition
#define PCI_VENDOR_ID_VMWARE 0x15ad
^
CC [M] /tmp/vmware/source/vmnet-only/procfs.o
CC [M] /tmp/vmware/source/vmnet-only/smac_compat.o
CC [M] /tmp/vmware/source/vmnet-only/smac.o
CC [M] /tmp/vmware/source/vmnet-only/vnetEvent.o
CC [M] /tmp/vmware/source/vmnet-only/vnetUserListener.o
LD [M] /tmp/vmware/source/vmnet-only/vmnet.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/vmware/source/vmnet-only/vmnet.mod.o
LD [M] /tmp/vmware/source/vmnet-only/vmnet.ko
make[1]: Leaving directory '/usr/src/linux-4.2.1-1-obj/x86_64/desktop'
make -C $PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= postbuild
make[1]: Entering directory '/tmp/vmware/source/vmnet-only'
make[1]: 'postbuild' is up to date.
make[1]: Leaving directory '/tmp/vmware/source/vmnet-only'
cp -f vmnet.ko ./../vmnet.o


########################################################
# Control if the vmnet.o module was just compiled
########################################################
Sabertooth:/tmp/vmware/source # ls -trl
total 9716
drwxr-xr-x 8 root root 440 Jul 9 00:47 vmmon-only
drwxr-xr-x 4 root root 160 Jul 9 00:47 vsock-only
drwxr-xr-x 5 root root 180 Jul 9 00:47 vmci-only
-rw-r--r-- 1 root root 839680 Oct 6 18:40 vmblock.tar.orginal
-rw-r--r-- 1 root root 1310720 Oct 6 18:40 vmmon.tar.orginal
-rw-r--r-- 1 root root 880640 Oct 6 18:40 vmnet.tar.orginal
-rw-r--r-- 1 root root 1095680 Oct 6 18:40 vsock.tar.orginal
-rw-r--r-- 1 root root 1300480 Oct 6 18:40 vmci.tar.orginal
-rw-r--r-- 1 root root 2026304 Oct 6 18:40 vmmon.o
drwxr-xr-x 4 root root 180 Oct 6 18:48 vmblock-only
drwxr-xr-x 3 root root 1720 Oct 6 19:18 vmnet-only
-rw-r--r-- 1 root root 2490120 Oct 6 19:18 vmnet.o
Sabertooth:/tmp/vmware/source #


########################################################
# Copy the vmnet module to proper openSUSE directory
########################################################
ls vmnet.o
echo "Copying the vmnet module to /lib/modules/`uname
-r`/kernel/drivers/misc/... "
cp ./vmnet.o /lib/modules/`uname -r`/kernel/drivers/misc/vmnet.ko



########################################################
# Load modules and bounce VMware
########################################################

Sabertooth:/tmp/vmware/source # depmod -a
Sabertooth:/tmp/vmware/source # #
Sabertooth:/tmp/vmware/source # echo "Restarting vmware... "
Restarting vmware...
Sabertooth:/tmp/vmware/source # /etc/init.d/vmware restart
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
Starting VMware services:
Virtual machine monitor done
Virtual machine communication interface done
VM communication interface socket family done
Blocking file system done
Virtual ethernet done #
********* everything is now OK
VMware Authentication Daemon done
Shared Memory Available done

# END

########################################################
# ORIGINAL ERROR MESSAGES
########################################################
In file included from
/usr/lib/vmware/modules/source/vmnet-only/bridge.c:50:0:
/usr/lib/vmware/modules/source/vmnet-only/bridge.c: In function ‘VNetBridgeUp’:
/usr/lib/vmware/modules/source/vmnet-only/vmnetInt.h:81:40: error: too few
arguments to function ‘sk_alloc’
#   define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \
                                        ^
/usr/lib/vmware/modules/source/vmnet-only/bridge.c:952:17: note: in expansion
of macro ‘compat_sk_alloc’
    bridge->sk = compat_sk_alloc(bridge, GFP_ATOMIC);
                 ^
In file included from
/usr/lib/vmware/modules/source/vmnet-only/compat_sock.h:23:0,
                 from /usr/lib/vmware/modules/source/vmnet-only/bridge.c:35:
/usr/src/linux-4.2.1-1/include/net/sock.h:1515:14: note: declared here
struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
              ^
/usr/src/linux-4.2.1-1/scripts/Makefile.build:274: recipe for target
'/usr/lib/vmware/modules/source/vmnet-only/bridge.o' failed
make[4]: *** [/usr/lib/vmware/modules/source/vmnet-only/bridge.o] Error 1
/usr/src/linux-4.2.1-1/Makefile:1412: recipe for target
'_module_/usr/lib/vmware/modules/source/vmnet-only' failed
make[3]: *** [_module_/usr/lib/vmware/modules/source/vmnet-only] Error 2
Makefile:146: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:24: recipe for target '__sub-make' failed


Hope this helps someone !

Regards
James
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups