Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 483410 - app-emulation/vmware-modules with kernel 3.11 - .../work/vmblock-only/linux/file.c:240:4: error: unknown field 'readdir' specified in initializer
Summary: app-emulation/vmware-modules with kernel 3.11 - .../work/vmblock-only/linux/f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal with 3 votes (vote)
Assignee: Gentoo VMWare Bug Squashers [disabled]
URL: http://mysticalzero.blogspot.it/2013/...
Whiteboard:
Keywords: PATCH
: 484082 490120 493080 503390 504188 508204 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-09-02 16:37 UTC by Paolo Barile
Modified: 2014-06-07 22:10 UTC (History)
26 users (show)

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


Attachments
Patch to fix the bug (271-3.11.0.patch,2.43 KB, patch)
2013-09-02 16:40 UTC, Paolo Barile
Details | Diff
Updated ebuild to apply patch (vmware-modules-271.2-r1.ebuild,2.19 KB, text/plain)
2013-09-02 16:42 UTC, Paolo Barile
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Barile 2013-09-02 16:37:06 UTC
When compiling vmware-modules on linux kernel >= 3.11.0-rc1 it ends with "/var/tmp/portage/app-emulation/vmware-modules-271.2/work/vmblock-only/linux/file.c:240:4: error: unknown field 'readdir' specified in initializer"

Reproducible: Always

Steps to Reproduce:
1. Install latest kernel of the 3.11 branch
2. Reinstall vmware modules
3.
Actual Results:  
/var/tmp/portage/app-emulation/vmware-modules-271.2/work/vmblock-only/linux/file.c:240:4: error: unknown field 'readdir' specified in initialize

Expected Results:  
It should compile fine
Comment 1 Paolo Barile 2013-09-02 16:40:48 UTC
Created attachment 357692 [details, diff]
Patch to fix the bug

This is the patch that can fix it. It need the previous 271-3.10.0.patch
Comment 2 Paolo Barile 2013-09-02 16:42:52 UTC
Created attachment 357694 [details]
Updated ebuild to apply patch

This is the updated ebuild needed to apply the patch
Comment 3 Paolo Barile 2013-09-02 16:47:44 UTC
Comment on attachment 357694 [details]
Updated ebuild to apply patch

># Copyright 1999-2013 Gentoo Foundation
># Distributed under the terms of the GNU General Public License v2
># $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/vmware-modules-271.2.ebuild,v 1.3 2013/08/11 17:24:06 dilfridge Exp $
>
>EAPI="4"
>
>inherit eutils flag-o-matic linux-info linux-mod user versionator udev
>
>PV_MAJOR=$(get_major_version)
>PV_MINOR=$(get_version_component_range 2)
>
>DESCRIPTION="VMware kernel modules"
>HOMEPAGE="http://www.vmware.com/"
>
>SRC_URI=""
>
>LICENSE="GPL-2"
>SLOT="0"
>KEYWORDS="~amd64 ~x86"
>IUSE="pax_kernel"
>
>RDEPEND=""
>DEPEND="${RDEPEND}
>	|| ( =app-emulation/vmware-player-5.0.${PV_MINOR}*
>	=app-emulation/vmware-workstation-9.0.${PV_MINOR}* )"
>
>S=${WORKDIR}
>
>pkg_setup() {
>	CONFIG_CHECK="~HIGH_RES_TIMERS"
>	if kernel_is ge 2 6 37 && kernel_is lt 2 6 39; then
>		CONFIG_CHECK="${CONFIG_CHECK} BKL"
>	fi
>
>	linux-info_pkg_setup
>
>	linux-mod_pkg_setup
>
>	VMWARE_GROUP=${VMWARE_GROUP:-vmware}
>
>	VMWARE_MODULE_LIST="vmblock vmci vmmon vmnet vsock"
>	VMWARE_MOD_DIR="${PN}-${PVR}"
>
>	BUILD_TARGETS="auto-build KERNEL_DIR=${KERNEL_DIR} KBUILD_OUTPUT=${KV_OUT_DIR}"
>
>	enewgroup "${VMWARE_GROUP}"
>	filter-flags -mfpmath=sse
>
>	for mod in ${VMWARE_MODULE_LIST}; do
>		MODULE_NAMES="${MODULE_NAMES} ${mod}(misc:${S}/${mod}-only)"
>	done
>}
>
>src_unpack() {
>	cd "${S}"
>	for mod in ${VMWARE_MODULE_LIST}; do
>		tar -xf /opt/vmware/lib/vmware/modules/source/${mod}.tar
>	done
>}
>
>src_prepare() {
>	epatch "${FILESDIR}/${PV_MAJOR}-makefile-kernel-dir.patch"
>	epatch "${FILESDIR}/${PV_MAJOR}-makefile-include.patch"
>	epatch "${FILESDIR}/${PV_MAJOR}-netdevice.patch"
>	use pax_kernel && epatch "${FILESDIR}/hardened.patch"
>	epatch "${FILESDIR}/${PV_MAJOR}-apic.patch"
>	kernel_is ge 3 7 0 && epatch "${FILESDIR}/${PV_MAJOR}-putname.patch"
>	kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10.0.patch"
>	kernel_is ge 3 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.11.0.patch"
>	# Allow user patches so they can support RC kernels and whatever else
>	epatch_user
>}
>
>src_install() {
>	linux-mod_src_install
>	local udevrules="${T}/60-vmware.rules"
>	cat > "${udevrules}" <<-EOF
>		KERNEL=="vmci",  GROUP="vmware", MODE=660
>		KERNEL=="vmmon", GROUP="vmware", MODE=660
>		KERNEL=="vsock", GROUP="vmware", MODE=660
>	EOF
>	udev_dorules "${udevrules}"
>}
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2013-09-04 12:43:48 UTC
Comment on attachment 357694 [details]
Updated ebuild to apply patch

--- vmware-modules-271.2.ebuild 2013-08-14 16:53:58.266845188 +0200
+++ -   2013-09-04 14:43:36.383709971 +0200
@@ -66,7 +66,7 @@
        epatch "${FILESDIR}/${PV_MAJOR}-apic.patch"
        kernel_is ge 3 7 0 && epatch "${FILESDIR}/${PV_MAJOR}-putname.patch"
        kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10.0.patch"
-
+       kernel_is ge 3 11 0 && epatch "${FILESDIR}/vmblock.3.11.patch"
        # Allow user patches so they can support RC kernels and whatever else
        epatch_user
 }
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2013-09-07 15:00:36 UTC
*** Bug 484082 has been marked as a duplicate of this bug. ***
Comment 6 László Szalma 2013-09-22 06:35:06 UTC
I confirm the patch works with gentoo-sources-3.11.1
Comment 7 Hubert Mercier 2013-10-04 18:48:43 UTC
Problem confirmed, and patch perfectly working.

Thanks.
Comment 8 Kalin KOZHUHAROV 2013-10-15 07:11:19 UTC
Compiles fine with the patch (as forced epatch_user) on vanilla-sources-3.11.5, hopefully it goes in the tree.
Comment 9 Michael Hampicke 2013-10-15 18:06:33 UTC
The patch works fine and solved my problem.
Comment 10 Adam Carter 2013-11-04 06:56:04 UTC
vmware-modules-279.0 has gone ~amd64. Would any kind soul be able to update this patch to work with 279?

Error looks to be the same:
/var/tmp/portage/app-emulation/vmware-modules-279.0/work/vmblock-only/linux/file.c:240:4: error: unknown field ‘readdir’ specified in initializer
Comment 11 Sven 2013-11-04 20:11:32 UTC
(In reply to Adam Carter from comment #10)
> vmware-modules-279.0 has gone ~amd64. Would any kind soul be able to update
> this patch to work with 279?
> 
> Error looks to be the same:
> /var/tmp/portage/app-emulation/vmware-modules-279.0/work/vmblock-only/linux/
> file.c:240:4: error: unknown field ‘readdir’ specified in initializer

There's no need to update the patch. Download the patch, rename it to "3.11.patch" and move the file to the directory /etc/portage/patches/app-emulation/vmware-modules

It will then be applied by the ebuild.
Comment 12 Ferry 2013-11-18 13:09:43 UTC
3.12 has issues too, even with the above patch applied.

https://github.com/elitak/ports-2012/commit/d602a321a1e53379a6e674302b9b77f3df924a28

Save the first 2 diff files (no need to apply the ebuild patch, digest it, etc.) in /etc/portage/patches/app-emulation/vmware-modules and it should work.

This is just a shameless copy - credits to Eric Litak.
https://github.com/funtoo/ports-2012/pull/5
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2013-12-02 12:25:53 UTC
*** Bug 493080 has been marked as a duplicate of this bug. ***
Comment 14 Jeroen Roovers (RETIRED) gentoo-dev 2013-12-02 12:26:11 UTC
*** Bug 490120 has been marked as a duplicate of this bug. ***
Comment 15 Jeroen Roovers (RETIRED) gentoo-dev 2014-03-04 14:06:11 UTC
*** Bug 503390 has been marked as a duplicate of this bug. ***
Comment 16 Alexander Stein 2014-03-08 11:02:41 UTC
(In reply to Ferry from comment #12)
> 3.12 has issues too, even with the above patch applied.
> 
> https://github.com/elitak/ports-2012/commit/
> d602a321a1e53379a6e674302b9b77f3df924a28

Those patches can even be used for app-emulation/vmware-modules-264.5
Comment 17 Jeroen Roovers (RETIRED) gentoo-dev 2014-03-11 16:59:18 UTC
*** Bug 504188 has been marked as a duplicate of this bug. ***
Comment 18 urcindalo 2014-03-12 10:40:26 UTC
(In reply to Ferry from comment #12)
> 3.12 has issues too, even with the above patch applied.
> 
> https://github.com/elitak/ports-2012/commit/
> d602a321a1e53379a6e674302b9b77f3df924a28
> 
> Save the first 2 diff files (no need to apply the ebuild patch, digest it,
> etc.) in /etc/portage/patches/app-emulation/vmware-modules and it should
> work.
> 
> This is just a shameless copy - credits to Eric Litak.
> https://github.com/funtoo/ports-2012/pull/5

How am I supposed to patch ~amd64 vmware-modules-279.1 to make it build with amd64 gentoo-sources-3.12.13?

I have followed the cited instructions above and I get this:
------------------------------------
 * Applying 279-vmblock.patch ...                                                                                                                 [ ok ]
 * Applying 279-vmblock-3.11.patch ...

 * Failed Patch: 279-vmblock-3.11.patch !
 *  ( /usr/portage/local/app-emulation/vmware-modules/files/279-vmblock-3.11.patch )
 * 
 * Include in your bugreport the contents of:
 * 
 *   /var/tmp/portage/app-emulation/vmware-modules-279.1/temp/279-vmblock-3.11.patch.out
------------------------------------

This is the content of /var/tmp/portage/app-emulation/vmware-modules-279.1/temp/279-vmblock-3.11.patch.out

$ cat /var/tmp/portage/app-emulation/vmware-modules-279.1/temp/279-vmblock-3.11.patch.out
***** 279-vmblock-3.11.patch *****
PWD: /var/tmp/portage/app-emulation/vmware-modules-279.1/work

==================================

PATCH COMMAND:  patch -p0 -g0 -E --no-backup-if-mismatch  < '/usr/portage/local/app-emulation/vmware-modules/files/279-vmblock-3.11.patch'

==================================
patch: **** Only garbage was found in the patch input.

patch program exited with status 2
==================================

PATCH COMMAND:  patch -p1 -g0 -E --no-backup-if-mismatch  < '/usr/portage/local/app-emulation/vmware-modules/files/279-vmblock-3.11.patch'

==================================
patch: **** Only garbage was found in the patch input.

patch program exited with status 2
==================================

PATCH COMMAND:  patch -p2 -g0 -E --no-backup-if-mismatch  < '/usr/portage/local/app-emulation/vmware-modules/files/279-vmblock-3.11.patch'

==================================
patch: **** Only garbage was found in the patch input.

patch program exited with status 2
==================================

PATCH COMMAND:  patch -p3 -g0 -E --no-backup-if-mismatch  < '/usr/portage/local/app-emulation/vmware-modules/files/279-vmblock-3.11.patch'

==================================
patch: **** Only garbage was found in the patch input.

patch program exited with status 2
==================================

PATCH COMMAND:  patch -p4 -g0 -E --no-backup-if-mismatch  < '/usr/portage/local/app-emulation/vmware-modules/files/279-vmblock-3.11.patch'

==================================                                                                                                                       
patch: **** Only garbage was found in the patch input.                                                                                                   
                                                                                                                                                         
patch program exited with status 2
Comment 19 mephinet 2014-04-17 14:56:36 UTC
Issue still present in app-emulation/vmware-modules-279.1-r1 when compiling against Linux-3.10.25 :-/
Comment 20 Richard Morrisey 2014-04-19 23:51:52 UTC
Reporting that this exists for Kernel 3.12.13 and vmware-modules 279.2, I was hoping the bump in the minor version of vmware-modules would take care of things. I'll include my build data if you think it would help at this point.
Comment 21 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-25 12:10:49 UTC
*** Bug 508204 has been marked as a duplicate of this bug. ***
Comment 22 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-25 12:11:09 UTC
*** Bug 507664 has been marked as a duplicate of this bug. ***
Comment 23 Alex Turbov 2014-05-06 10:46:30 UTC
kernel 3.14.2 and mvware-modules 279.2 w/ current patch:
---
/storage/tmp/paludis/app-emulation-vmware-modules-279.2/work/vmblock-only/linux/inode.c: In function 'InodeOpLookup':
/storage/tmp/paludis/app-emulation-vmware-modules-279.2/work/vmblock-only/linux/inode.c:138:32: error: incompatible types when assigning to type 'kgid_t' from type 'int'
    inode->i_uid = inode->i_gid = 0;
                                ^
/storage/tmp/paludis/app-emulation-vmware-modules-279.2/work/vmblock-only/linux/inode.c: In function 'InodeOpFollowlink':
/storage/tmp/paludis/app-emulation-vmware-modules-279.2/work/vmblock-only/linux/inode.c:224:4: error: implicit declaration of function 'vfs_follow_link' [-Werror=implicit-function-declaration]
    ret = vfs_follow_link(nd, iinfo->name);
    ^
---
Comment 24 Andreas K. Hüttel archtester gentoo-dev 2014-06-07 22:10:17 UTC
Added this patch to all in-tree versions of the modules, starting with Kernel 3.10.25. 

I'm closing this bug, failures with 3.12 and later (different error) should be tracked separately.