Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 458228 - app-emulation/vmware-modules-264.5 fails to build with Linux 3.8
Summary: app-emulation/vmware-modules-264.5 fails to build with Linux 3.8
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major with 1 vote (vote)
Assignee: Gentoo VMWare Bug Squashers [disabled]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-19 07:13 UTC by Jason A. Donenfeld
Modified: 2013-06-23 13:13 UTC (History)
17 users (show)

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


Attachments
Git formatted patch to build on linux 3.8 (0001-Add-patch-to-build-on-linux-3.8.patch,2.22 KB, patch)
2013-02-19 07:16 UTC, Jason A. Donenfeld
Details | Diff
vmware modules 264 patch for 3.8.x (264-3.8.0.patch,1.10 KB, patch)
2013-03-18 19:26 UTC, Evan Teran
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason A. Donenfeld gentoo-dev 2013-02-19 07:13:50 UTC
/var/tmp/portage/app-emulation/vmware-modules-271.1-r1/work/vmci-only/linux/driver.c:127:4: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]

Reproducible: Always
Comment 1 Jason A. Donenfeld gentoo-dev 2013-02-19 07:16:28 UTC
Created attachment 339346 [details, diff]
Git formatted patch to build on linux 3.8

This should apply over the vmware overlay.
Comment 2 Mike Auty (RETIRED) gentoo-dev 2013-02-20 00:41:56 UTC
Updating the summary, since this also affects vmware-modules-264.5.
Comment 3 Maciej Piechotka 2013-02-20 10:51:05 UTC
(In reply to comment #1)
> Created attachment 339346 [details, diff] [details, diff]
> Git formatted patch to build on linux 3.8
> 
> This should apply over the vmware overlay.

Since vmware-modules are also failing in main portage I guess it should be applied there as well (also - you have attached patch to ebuild instead of actual patch).
Comment 4 Maciej Piechotka 2013-02-20 10:54:51 UTC
(In reply to comment #3)
> (In reply to comment #1)
> > Created attachment 339346 [details, diff] [details, diff] [details, diff]
> > Git formatted patch to build on linux 3.8
> > 
> > This should apply over the vmware overlay.
> 
> Since vmware-modules are also failing in main portage I guess it should be
> applied there as well (also - you have attached patch to ebuild instead of
> actual patch).

Sorry - it was me misunderstanding the bugzilla GUI.
Comment 5 Maciej Piechotka 2013-02-24 13:05:27 UTC
If user have user namespace support enabled it still does not work:

  CC [M]  /var/tmp/portage/app-emulation/vmware-modules-271.1-r1/work/vmblock-only/linux/control.o
/var/tmp/portage/app-emulation/vmware-modules-271.1-r1/work/vmblock-only/linux/inode.c:49:4: warning: initialization from incompatible pointer type [enabled by default]
/var/tmp/portage/app-emulation/vmware-modules-271.1-r1/work/vmblock-only/linux/inode.c:49:4: warning: (near initialization for 'RootInodeOps.lookup') [enabled by default]
/var/tmp/portage/app-emulation/vmware-modules-271.1-r1/work/vmblock-only/linux/inode.c: In function 'InodeOpLookup':
/var/tmp/portage/app-emulation/vmware-modules-271.1-r1/work/vmblock-only/linux/inode.c:138:32: error: incompatible types when assigning to type 'kgid_t' from type 'int'
make[3]: *** [/var/tmp/portage/app-emulation/vmware-modules-271.1-r1/work/vmblock-only/linux/inode.o] Error 1
Comment 6 Jason A. Donenfeld gentoo-dev 2013-02-28 11:32:53 UTC
I doubt it's feasible right now to patch the module for user namespaces. Many other parts of the kernel aren't compatible with it, such as NFS and CIFS. I could be wrong, and it might be trivial, but maybe not.
Comment 7 RAPHEAD 2013-03-05 21:43:00 UTC
How about applying this patch?:

http://communities.vmware.com/thread/432897
Comment 8 Maciej Piechotka 2013-03-06 15:42:57 UTC
(In reply to comment #7)
> How about applying this patch?:
> 
> http://communities.vmware.com/thread/432897

It is the same patch as attached.
Comment 9 Evan Teran 2013-03-07 21:12:49 UTC
I was about to report a bug, but found this one. I don't think that the proposed patch is correct though.

Jason's patch will of course compile, but doesn't have the same effect as the original macro in all cases. If we look at the 3.7.x sources __devexit_p is defined like this:

/* Functions marked as __devexit may be discarded at kernel link time, depending
   on config options.  Newer versions of binutils detect references from
   retained sections to discarded sections and flag an error.  Pointers to
   __devexit functions must use __devexit_p(function_name), the wrapper will
   insert either the function_name or NULL, depending on the config options.
 */
#if defined(MODULE) || defined(CONFIG_HOTPLUG)
#define __devexit_p(x) x
#else
#define __devexit_p(x) NULL
#endif


In 3.8, it looks like the "best" match is not the simple removal of the usage, but a differently named macro. 3.8 has the following:

#ifdef MODULE
#define __exit_p(x) x
#else
#define __exit_p(x) NULL
#endif

So it looks like the "proper" solution is simply use __exit_p instead of __devexit_p. I will attach a patch as well.
Comment 10 Evan Teran 2013-03-07 21:22:02 UTC
Hmm, looking deeping, I may have been mistaken. 3.7.x also had the __exit_p macro. It seems that __devexit and related were tied to hotplug which simply doesn't have some of the macros that were used previously.

simply removing the usage of the macros seems to make sense.
Comment 11 Vadim Kuznetsov (RETIRED) gentoo-dev 2013-03-10 12:22:30 UTC
Fixed in 271.2 (ws 9.0.2).
Comment 12 Evan Teran 2013-03-18 19:26:15 UTC
Created attachment 342570 [details, diff]
vmware modules 264 patch for 3.8.x

Any chance we can have a patch applied to the version for vmware 8.x? Here's a quick and dirty patch I've cooked up. Appears to at least fix the issue for the vmci stuff.
Comment 13 Yvan Royon 2013-03-22 09:18:16 UTC
(In reply to comment #6)
> I doubt it's feasible right now to patch the module for user namespaces.
> Many other parts of the kernel aren't compatible with it, such as NFS and
> CIFS. I could be wrong, and it might be trivial, but maybe not.

Right now, if any of those incompatible kernel parts are enabled, CONFIG_USER_NS is force-disabled. I had to disable CIFS to get USER_NS in. So this problem is "fixed" this way.

See bug #462666 for the user namespace issue.
Comment 14 Andreas K. Hüttel archtester gentoo-dev 2013-06-23 13:13:28 UTC
Patch added, thanks.