Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 335456 - app-emulation/vmware-modules-1.0.0.2[4-6] doesn't compile with kernel >=2.6.36
Summary: app-emulation/vmware-modules-1.0.0.2[4-6] doesn't compile with kernel >=2.6.36
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Vadim Kuznetsov (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-31 20:54 UTC by Fabio Rossi
Modified: 2011-02-07 19:13 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
1.0.0.24-ioctl.patch (1.0.0.24-ioctl.patch,1.84 KB, patch)
2010-08-31 20:57 UTC, Fabio Rossi
Details | Diff
1.0.0.26-ioctl.patch (1.0.0.26-ioctl.patch,1.87 KB, patch)
2010-08-31 20:57 UTC, Fabio Rossi
Details | Diff
Fabio Rossi`s patch modified to work with vmware-modules-1.0.0.25-r1 (1.0.0.25-ioctl.patch,2.82 KB, patch)
2010-10-08 13:19 UTC, Oliver Kleinecke
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Rossi 2010-08-31 20:54:50 UTC
Here is the error:

In file included from /var/tmp/portage/app-emulation/vmware-modules-1.0.0.24-r1/work/vmmon-only/linux/driver.c:119:
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.24-r1/work/vmmon-only/./common/hostif.h:53:7: warning: "WINNT_DDK" is not defined
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.24-r1/work/vmmon-only/linux/driver.c: In function ‘init_module’:
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.24-r1/work/vmmon-only/linux/driver.c:426: error: ‘struct file_operations’ has no member named ‘ioctl’
make[3]: *** [/var/tmp/portage/app-emulation/vmware-modules-1.0.0.24-r1/work/vmmon-only/linux/driver.o] Error 1
make[2]: *** [_module_/var/tmp/portage/app-emulation/vmware-modules-1.0.0.24-r1/work/vmmon-only] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/usr/src/wireless-testing'
make: *** [vmmon.ko] Error 2
 * ERROR: app-emulation/vmware-modules-1.0.0.24-r1 failed:
 *   Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS=   auto-build VMWARE_VER=VME_V65 KERNEL_DIR=/usr/src/linux KBUILD_OUTPUT=/usr/src/linux
 * 
 * Call stack:
 *     ebuild.sh, line   54:  Called src_compile
 *   environment, line 4089:  Called linux-mod_src_compile
 *   environment, line 3058:  Called die
 * The specific snippet of code:
 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\"                                               CROSS_COMPILE=${CHOST}-     LDFLAGS=\"$(get_abi_LDFLAGS)\"                                           ${BUILD_FIXES}                                          ${BUILD_PARAMS}                                              ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";
 * 
 * If you need support, post the output of 'emerge --info =app-emulation/vmware-modules-1.0.0.24-r1',
 * the complete build log and the output of 'emerge -pqv =app-emulation/vmware-modules-1.0.0.24-r1'.
 * This ebuild is from an overlay: '/var/lib/layman/__mine__/'
 * The complete build log is located at '/var/log/portage/app-emulation:vmware-modules-1.0.0.24-r1:20100831-205354.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/vmware-modules-1.0.0.24-r1/temp/environment'.
 * S: '/var/tmp/portage/app-emulation/vmware-modules-1.0.0.24-r1/work'
Comment 1 Fabio Rossi 2010-08-31 20:55:58 UTC
With the 2.6.36 release it has been removed the ioctl() method from the file_operations structure. All the drivers should now call unlocked_ioctl()
which doesn't run under the Big Kernel Lock (BKL). Vmware-modules provides this function (ok it's a weird hack producing because it still run under the BKL...). 

Starting from 2.6.36 HAVE_UNLOCKED_IOCTL should always be defined. The patches, as they are, should only applied with kernels >=2.6.36 so something like    

  kernel_is -ge 2 6 36 && epatch "${FILESDIR}/${PV}-ioctl.patch"

should be inserted in src_prepare().
Comment 2 Fabio Rossi 2010-08-31 20:57:17 UTC
Created attachment 245540 [details, diff]
1.0.0.24-ioctl.patch

patch for vmware-modules-1.0.0.24 and vmware-modules-1.0.0.25
Comment 3 Fabio Rossi 2010-08-31 20:57:46 UTC
Created attachment 245542 [details, diff]
1.0.0.26-ioctl.patch

patch for vmware-modules-1.0.0.26
Comment 4 slyzer 2010-10-08 10:43:26 UTC
Works fine. Only had to modify the 238.2 ebuild to apply patches since 2.6.35:

kernel_is -ge 2 6 35 && epatch "${FILESDIR}/iommu_map.patch"
kernel_is -ge 2 6 35 && epatch "${FILESDIR}/sk_sleep.patch"
kernel_is -ge 2 6 36 && epatch "${FILESDIR}/1.0.0.26-ioctl.patch"
Comment 5 Oliver Kleinecke 2010-10-08 13:19:12 UTC
Created attachment 249930 [details, diff]
Fabio Rossi`s patch modified to work with vmware-modules-1.0.0.25-r1

Since VMWare-Workstation-6.5.4 requires vmware-modules-1.0.0.25-r, I modified Fabio Rossi`s patch to match the correct line-numbers for 1.0.0.25-r1
Comment 6 renato gallo 2010-10-22 09:06:42 UTC
 CC [M]  /var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.o
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c:312: warning: initialization from incompatible pointer type
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c:359: warning: initialization from incompatible pointer type
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c: In function 'VSockVmciStreamConnect':
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c:3224: error: 'struct sock' has no member named 'sk_sleep'
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c:3247: error: 'struct sock' has no member named 'sk_sleep'
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c:3259: error: 'struct sock' has no member named 'sk_sleep'
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c: In function 'VSockVmciAccept':
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c:3319: error: 'struct sock' has no member named 'sk_sleep'
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c:3335: error: 'struct sock' has no member named 'sk_sleep'
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c:3369: error: 'struct sock' has no member named 'sk_sleep'
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c: In function 'VSockVmciPoll':
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c:3467: error: 'struct sock' has no member named 'sk_sleep'
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c: In function 'VSockVmciStreamSendmsg':
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c:4107: error: 'struct sock' has no member named 'sk_sleep'
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c:4144: error: 'struct sock' has no member named 'sk_sleep'
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c:4197: error: 'struct sock' has no member named 'sk_sleep'
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c: In function 'VSockVmciStreamRecvmsg':
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c:4431: error: 'struct sock' has no member named 'sk_sleep'
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c:4471: error: 'struct sock' has no member named 'sk_sleep'
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.c:4537: error: 'struct sock' has no member named 'sk_sleep'
make[3]: *** [/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only/linux/af_vsock.o] Error 1
make[2]: *** [_module_/var/tmp/portage/app-emulation/vmware-modules-1.0.0.26/work/vsock-only] Error 2
Comment 8 Safak Oekmen 2010-11-07 20:09:54 UTC
1.0.0.26-ioctl.patch compiles with vmware-modules-1.0.0.28. For an ad hoc solution:

# export EB="/usr/portage/local/layman/pentoo/app-emulation/vmware-modules/vmware-modules-1.0.0.28.ebuild" 
# ebuild ${EB} unpack 
# cd /var/tmp/portage/app-emulation/vmware-modules-1.0.0.28/work/
# wget http://bugs.gentoo.org/attachment.cgi?id=245542
# patch -p0 < attachment.cgi\?id\=245542 
# ebuild ${EB} merge
Comment 9 Stefan G. Weichinger 2010-11-07 22:24:47 UTC
(In reply to comment #8)
> 1.0.0.26-ioctl.patch compiles with vmware-modules-1.0.0.28.

It builds and merges, yes.
But app-emulation/vmware-server-2.0.2.203138-r1 does not start with these modules.
Tried that on sys-kernel/tuxonice-sources-2.6.35-r6 ...
Comment 10 Stefan G. Weichinger 2010-11-07 22:43:41 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > 1.0.0.26-ioctl.patch compiles with vmware-modules-1.0.0.28.
> 
> It builds and merges, yes.
> But app-emulation/vmware-server-2.0.2.203138-r1 does not start with these
> modules.
> Tried that on sys-kernel/tuxonice-sources-2.6.35-r6 ...

Correction: had a mistake in my way of doing things, vmware-server now starts on tuxonice-2.6.36. But the VM itself does not start, it fails with "Failed to initialize monitor device."
Comment 11 Evan Teran 2010-11-09 16:24:18 UTC
I see that the patch is in the tree for 1.0.0.26, any chance of the patch for 1.0.0.25 getting in there too?
Comment 12 Stefan G. Weichinger 2010-11-09 18:30:38 UTC
Additional question: is it really necessary to use vmware-modules-1.0.0.24-r1 with app-emulation/vmware-server-2.0.2.203138-r1 ? I never got any other combo working here and I wonder if more recent vmware-modules might be better in terms of performance and/or bugs ...

Thanks, Stefan
Comment 13 Stefan G. Weichinger 2010-11-09 21:33:25 UTC
(In reply to comment #12)
> Additional question: is it really necessary to use vmware-modules-1.0.0.24-r1
> with app-emulation/vmware-server-2.0.2.203138-r1 ? I never got any other combo
> working here and I wonder if more recent vmware-modules might be better in
> terms of performance and/or bugs ...

I assume I should use vmware-player, correct?
Comment 14 Vadim Kuznetsov (RETIRED) gentoo-dev 2010-11-21 16:00:45 UTC
patches are in the portage. please test. thanks.
Comment 15 Lubos Kolouch 2010-11-22 08:28:56 UTC
Hi Vadim, seems to work here, thank you
Comment 16 aditsu 2011-01-21 15:34:55 UTC
vmware-modules-1.0.0.25-r1 (latest stable) doesn't compile
vmware-modules-1.0.0.25-r3 (unstable) compiles
Comment 17 Sven Müller 2011-02-07 19:13:13 UTC
Kernel 2.6.37
BKL was deactivated from kernel config.

/var/tmp/portage/app-emulation/vmware-modules-1.0.0.25-r3/work/vmmon-only/./include/vm_atomic.h:1536:7: Warnung: »_MSC_VER« ist nicht definiert
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.25-r3/work/vmmon-only/./include/vm_atomic.h:1663:7: Warnung: »_MSC_VER« ist nicht definiert
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.25-r3/work/vmmon-only/./include/vm_atomic.h: In Funktion »Atomic_ReadWrite64«:
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.25-r3/work/vmmon-only/./include/vm_atomic.h:1796:7: Warnung: »_MSC_VER« ist nicht definiert
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.25-r3/work/vmmon-only/linux/hostif.c: In Funktion »HostIFReadUptimeWork«:
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.25-r3/work/vmmon-only/linux/hostif.c:1864:37: Warnung: »newUpBase« may be used uninitialized in this function
In file included from /var/tmp/portage/app-emulation/vmware-modules-1.0.0.25-r3/work/vmmon-only/common/memtrack.c:44:0:
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.25-r3/work/vmmon-only/common/hostif.h: Auf höchster Ebene:
/var/tmp/portage/app-emulation/vmware-modules-1.0.0.25-r3/work/vmmon-only/common/hostif.h:53:7: Warnung: »WINNT_DDK« ist nicht definiert
make[2]: *** [_module_/var/tmp/portage/app-emulation/vmware-modules-1.0.0.25-r3/work/vmmon-only] Fehler 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.37-gentoo'
make: *** [vmmon.ko] Error 2
emake failed
 * ERROR: app-emulation/vmware-modules-1.0.0.25-r3 failed (compile phase):
 *   Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS=   auto-build VMWARE_VER=VME_V65 KERNEL_DIR=/usr/src/linux KBUILD_OUTPUT=/lib/modules/2.6.37-gentoo/build
 * 
 * Call stack:
 *     ebuild.sh, line   56:  Called src_compile
 *   environment, line 3940:  Called linux-mod_src_compile
 *   environment, line 3014:  Called die
 * The specific snippet of code:
 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" 			CROSS_COMPILE=${CHOST}- 						LDFLAGS=\"$(get_abi_LDFLAGS)\" 						${BUILD_FIXES} 		${BUILD_PARAMS} 						${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";
 * 
 * If you need support, post the output of 'emerge --info =app-emulation/vmware-modules-1.0.0.25-r3',
 * the complete build log and the output of 'emerge -pqv =app-emulation/vmware-modules-1.0.0.25-r3'.
 * The complete build log is located at '/var/tmp/portage/app-emulation/vmware-modules-1.0.0.25-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/vmware-modules-1.0.0.25-r3/temp/environment'.
 * S: '/var/tmp/portage/app-emulation/vmware-modules-1.0.0.25-r3/work'