Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Built vmware-modules on gentoo-sources 3.1.0 kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Krellan
n00b
n00b


Joined: 27 Aug 2010
Posts: 31

PostPosted: Mon Oct 31, 2011 12:09 am    Post subject: Built vmware-modules on gentoo-sources 3.1.0 kernel Reply with quote

Bad news, gentoo-sources 3.1.0 broke the existing compilation of vmware-modules 238.5, causing the emerge to fail.

Good news, the patch is easy, somebody else made a patch that seems to work perfectly.

Here's where the patch comes from:

http://weltall.heliohost.org/wordpress/2011/09/29/vmware-workstationplayer-fix-for-linux-3-1/

Download the tarball there, extract the "vmware3.1.0.patch" file. Or, here it is, cut and paste:

Code:

diff -u -r source30/vmnet-only/compat_netdevice.h source/vmnet-only/compat_netdevice.h
--- source30/vmnet-only/compat_netdevice.h   2011-08-23 02:11:46.000000000 +0200
+++ source/vmnet-only/compat_netdevice.h   2011-09-17 09:38:03.000000000 +0200
@@ -47,6 +47,19 @@
 #   define net_device device
 #endif
 
+/* it looks like these have been removed from the kernel 3.1
+ * probably because the "transition" is considered complete.
+ * so to keep this source compatible we just redefine them like they were
+ * previously
+ */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
+#define HAVE_ALLOC_NETDEV      /* feature macro: alloc_xxxdev
+                  functions are available. */
+#define HAVE_FREE_NETDEV      /* free_netdev() */
+#define HAVE_NETDEV_PRIV      /* netdev_priv() */
+#define HAVE_NETIF_QUEUE
+#define HAVE_NET_DEVICE_OPS
+#endif
 
 /*
  * SET_MODULE_OWNER appeared sometime during 2.3.x. It was setting


Save that in the "files" directory underneath vmware-modules.

Now, edit the vmware-modules-238.5.ebuild file, to add this line:

Code:

--- vmware-modules-238.5.ebuild~   2011-10-08 11:04:57.000000000 -0700
+++ vmware-modules-238.5.ebuild   2011-10-30 16:56:50.000000000 -0700
@@ -64,6 +64,7 @@
    epatch "${FILESDIR}/${PV_MAJOR}-jobserver.patch"
    kernel_is ge 2 6 37 && epatch "${FILESDIR}/${PV_MAJOR}-sema.patch"
    kernel_is ge 2 6 39 && epatch "${FILESDIR}/${PV_MAJOR}-2.6.39.patch"
+   kernel_is ge 3 1 0 && EPATCH_OPTS=-p1 epatch "${FILESDIR}/vmware3.1.0.patch"
 }
 
 src_install() {


After doing this, run "ebuild vmware-modules-238.5.ebuild digest" so it will digest the changes you made without spitting up an error.

Then, the emerge should run to completion, and it worked for me! Posting this here, so that others can find it as well.
Back to top
View user's profile Send private message
platojones
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1602
Location: Just over the horizon

PostPosted: Mon Oct 31, 2011 12:47 am    Post subject: Reply with quote

I did this yesterday as well. Works great. You can actually apply the full patch set from that site...but you have to remove the 2.6.39 patch from the ebuild, since it conflicts with the new patch.
Back to top
View user's profile Send private message
nlsa8z6zoz7lyih3ap
Guru
Guru


Joined: 25 Sep 2007
Posts: 388
Location: Canada

PostPosted: Mon Oct 31, 2011 8:30 pm    Post subject: Reply with quote

I know that the following doesn't pertain to your exact module,
but app-emulation/vmware-modules-264.0-r1 (from the vmware overlay)
does compile with gentoo-sources-3.1.0
Back to top
View user's profile Send private message
Krellan
n00b
n00b


Joined: 27 Aug 2010
Posts: 31

PostPosted: Tue Nov 01, 2011 3:20 am    Post subject: Reply with quote

nlsa8z6zoz7lyih3ap wrote:
I know that the following doesn't pertain to your exact module,
but app-emulation/vmware-modules-264.0-r1 (from the vmware overlay)
does compile with gentoo-sources-3.1.0


Nice! Any chance of that overlay making it into the main Portage tree, since it's obviously useful?
Back to top
View user's profile Send private message
nlsa8z6zoz7lyih3ap
Guru
Guru


Joined: 25 Sep 2007
Posts: 388
Location: Canada

PostPosted: Tue Nov 01, 2011 5:40 am    Post subject: Reply with quote

Quote:
Nice! Any chance of that overlay making it into the main Portage tree, since it's obviously useful?


That I wouldn't know as I am just a user. But I find it to be a very useful overlay. In fact currently, it is the only one that I use.
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Fri Nov 04, 2011 1:57 am    Post subject: Reply with quote

nlsa8z6zoz7lyih3ap wrote:
I know that the following doesn't pertain to your exact module,
but app-emulation/vmware-modules-264.0-r1 (from the vmware overlay)
does compile with gentoo-sources-3.1.0


Are you sure that it compiles? It doesn't compile for me.

It fails complaining that Makefile.normal is missing.
Back to top
View user's profile Send private message
nlsa8z6zoz7lyih3ap
Guru
Guru


Joined: 25 Sep 2007
Posts: 388
Location: Canada

PostPosted: Fri Nov 04, 2011 2:48 pm    Post subject: Reply with quote

I just checked again with vanilla-sources-3.1.0 and app-emulation/vmware-modules-264.0-r1

it compiled without problems and the following shows that the modules were created:


Quote:
find /lib/modules|grep 3.1.0|grep vm
/lib/modules/3.1.0-vanilla-a/misc/vmblock.ko
/lib/modules/3.1.0-vanilla-a/misc/vmnet.ko
/lib/modules/3.1.0-vanilla-a/misc/vmci.ko
/lib/modules/3.1.0-vanilla-a/misc/vmmon.ko


I am at a loss for suggestions.
Back to top
View user's profile Send private message
SigHunter
n00b
n00b


Joined: 24 Mar 2010
Posts: 41
Location: Nürnberg, Germany

PostPosted: Mon Nov 07, 2011 9:53 pm    Post subject: Reply with quote

nlsa8z6zoz7lyih3ap wrote:
I just checked again with vanilla-sources-3.1.0 and app-emulation/vmware-modules-264.0-r1

it compiled without problems and the following shows that the modules were created:


Quote:
find /lib/modules|grep 3.1.0|grep vm
/lib/modules/3.1.0-vanilla-a/misc/vmblock.ko
/lib/modules/3.1.0-vanilla-a/misc/vmnet.ko
/lib/modules/3.1.0-vanilla-a/misc/vmci.ko
/lib/modules/3.1.0-vanilla-a/misc/vmmon.ko


I am at a loss for suggestions.


i dont know about vanilla sources, but doesn't compile for me either with gentoo-sources-3.1.0
Back to top
View user's profile Send private message
nlsa8z6zoz7lyih3ap
Guru
Guru


Joined: 25 Sep 2007
Posts: 388
Location: Canada

PostPosted: Mon Nov 07, 2011 11:06 pm    Post subject: Reply with quote

Quote:
i dont know about vanilla sources, but doesn't compile for me either with gentoo-sources-3.1.0




Added in Edit: Google revealed the following about others who had a similar bug
in 2009. http://www.mail-archive.com/open-vm-tools-devel@lists.sourceforge.net/msg00525.html

I am out of my depth on this one. All I can do is to confirm that due to nothing more that my own good luck, it does compile on my system with both the gentoo and vanilla 3.1.0 kernels.

Good luck.
Back to top
View user's profile Send private message
SigHunter
n00b
n00b


Joined: 24 Mar 2010
Posts: 41
Location: Nürnberg, Germany

PostPosted: Tue Nov 08, 2011 9:40 am    Post subject: Reply with quote

nlsa8z6zoz7lyih3ap wrote:
Quote:
i dont know about vanilla sources, but doesn't compile for me either with gentoo-sources-3.1.0




Added in Edit: Google revealed the following about others who had a similar bug
in 2009. http://www.mail-archive.com/open-vm-tools-devel@lists.sourceforge.net/msg00525.html

I am out of my depth on this one. All I can do is to confirm that due to nothing more that my own good luck, it does compile on my system with both the gentoo and vanilla 3.1.0 kernels.

Good luck.


thx, but its not about the open-vm-tools (which are for virtual guests) but vmware-modules which make it able to use vmware workstation/player
Back to top
View user's profile Send private message
SigHunter
n00b
n00b


Joined: 24 Mar 2010
Posts: 41
Location: Nürnberg, Germany

PostPosted: Tue Nov 08, 2011 10:08 am    Post subject: Reply with quote

app-emulation/vmware-modules-264.0-r1 is now in vmware overlay and compiles fine with 3.1.0 gentoo-sources for me

(since i use eix-sync i didnt notice that vmware overlay didnt update for unknown time,
error: svn: E155036: Working copy '/var/lib/layman/vmware' is too old (format 10, created by Subversion 1.6),
to fix that i had to navigate to /var/lib/layman/vmware/ and do "svn upgrade" and "svn up"
maybe that helps someone)
Back to top
View user's profile Send private message
nlsa8z6zoz7lyih3ap
Guru
Guru


Joined: 25 Sep 2007
Posts: 388
Location: Canada

PostPosted: Tue Nov 08, 2011 3:38 pm    Post subject: Reply with quote

Quote:
(since i use eix-sync i didnt notice that vmware overlay didnt update for unknown time,
error: svn: E155036: Working copy '/var/lib/layman/vmware' is too old (format 10, created by Subversion 1.6),
to fix that i had to navigate to /var/lib/layman/vmware/ and do "svn upgrade" and "svn up"


Interesting point. I am sure that it will be helpful to someone.
Since I handle overlays with layman, all I have to do to update is

Code:
layman -S; eix-sync


In fact I have a little bash script consisting of this that I use for updates, as I used
to forget to update overlays.
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Tue Nov 08, 2011 4:45 pm    Post subject: Reply with quote

nlsa8z6zoz7lyih3ap wrote:
Quote:
i dont know about vanilla sources, but doesn't compile for me either with gentoo-sources-3.1.0




Added in Edit: Google revealed the following about others who had a similar bug
in 2009. http://www.mail-archive.com/open-vm-tools-devel@lists.sourceforge.net/msg00525.html

I am out of my depth on this one. All I can do is to confirm that due to nothing more that my own good luck, it does compile on my system with both the gentoo and vanilla 3.1.0 kernels.

Good luck.


I found the problem. I modified my system's umask to be 077 after reading the following:

http://blogs.gentoo.org/mgorny/2011/10/18/027-umask-a-compromise-between-security-and-simplicity/

Since app-emulation/vmware-modules is being compiled as the portage user while the kernel sources require root privileges, things fail badly, starting with "ifeq ($(call vm_check_file,$(BUILD_DIR)/Makefile), yes)" in the Makefile. Doing chmod 700 /lib/modules/3.1.0 lets things get further along, but they will still fail.

Doing FEATURES="-userpriv -usersandbox" emerge -1v =app-emulation/vmware-modules-264.0-r1 works around the problem.
Back to top
View user's profile Send private message
katfish
Tux's lil' helper
Tux's lil' helper


Joined: 14 Nov 2011
Posts: 147

PostPosted: Mon Nov 14, 2011 1:18 am    Post subject: Reply with quote

vmware-modules-264.0-r1 from the overlay fails here too.
Quote:
* Failed Patch: 264-makefile-include.patch !
* ( /var/tmp/layman/vmware/app-emulation/vmware-modules/files/264-makefile-include.patch )
*
* Include in your bugreport the contents of:
*
* /var/tmp/portage/app-emulation/vmware-modules-264.0-r1/temp/264-makefile-include.patch.out

* ERROR: app-emulation/vmware-modules-264.0-r1 failed (prepare phase):
* Failed Patch: 264-makefile-include.patch!
*
* Call stack:
* ebuild.sh, line 84: Called src_prepare
* environment, line 3764: Called epatch '/var/tmp/layman/vmware/app-emulation/vmware-modules/files/264-makefile-include.patch'
* environment, line 1678: Called die
* The specific snippet of code:
* die "Failed Patch: ${patchname}!";
*


any ideas whats going wrong?

cheers
katfish


Last edited by katfish on Mon Nov 14, 2011 1:45 am; edited 1 time in total
Back to top
View user's profile Send private message
nlsa8z6zoz7lyih3ap
Guru
Guru


Joined: 25 Sep 2007
Posts: 388
Location: Canada

PostPosted: Mon Nov 14, 2011 1:44 am    Post subject: Reply with quote

Quote:
any ideas whats going wrong?


Sorry, I don't. When I suggested using the vmware overlay I thought that I was offering an easy solution for everyone, but it is now clear to me that that was not the case, although it works well for me and some others. I guess this shows that you take your chances with things that are not stable and have to be prepared to roll back to something which is stable. Unstable packages usually are quite fine by themselves but have not yet withstood the test to see whether over time they interact well with other packages. Hopefully you can find a vmware-modules that works with the current stable kernel.

Comment: I recently had a similar problem with an entirely unrelated package.
The problem in this case was that my active version of python was 3.1.
I switched to 2.7 by giving the commands using giving the commands:
Code:
eselect python set python2.7; python-updater

After that my package installed without error. Perhaps this is your problem perhaps it is not.
The easiest fix is probably to drop back to stable.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Mon Nov 14, 2011 7:42 am    Post subject: Reply with quote

got vmware-modules-264.0-r1 with kernel 3.1.1 and it compiled without any problems.
I'm pretty sure that it worked with 3.1 and 3.1-r1

are you sure you are synced with the vmware overlay?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
katfish
Tux's lil' helper
Tux's lil' helper


Joined: 14 Nov 2011
Posts: 147

PostPosted: Tue Nov 15, 2011 9:56 pm    Post subject: Reply with quote

It compiled here too after I merged the workstation first :)
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Tue Nov 15, 2011 10:03 pm    Post subject: Reply with quote

katfish wrote:
It compiled here too after I merged the workstation first :)


no workstation installed here.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
katfish
Tux's lil' helper
Tux's lil' helper


Joined: 14 Nov 2011
Posts: 147

PostPosted: Wed Nov 16, 2011 12:03 pm    Post subject: Reply with quote

but the player?
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Wed Nov 16, 2011 1:10 pm    Post subject: Reply with quote

katfish wrote:
but the player?


yup
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
katfish
Tux's lil' helper
Tux's lil' helper


Joined: 14 Nov 2011
Posts: 147

PostPosted: Thu Nov 17, 2011 12:46 pm    Post subject: Reply with quote

it seems that one of them is required to build the modules.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum