Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 267310 - app-emulation/virtualbox-modules-1.6.6-r1 fails to compile on kernel 2.6.29
Summary: app-emulation/virtualbox-modules-1.6.6-r1 fails to compile on kernel 2.6.29
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal with 1 vote (vote)
Assignee: Markus Ullmann (RETIRED)
URL:
Whiteboard:
Keywords:
: 272965 283350 (view as bug list)
Depends on: 267267
Blocks:
  Show dependency tree
 
Reported: 2009-04-24 09:23 UTC by Marco Wirz
Modified: 2009-11-10 01:40 UTC (History)
14 users (show)

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


Attachments
paths that solves the compilation error (virtualbox-modules-1.6.6_2.6.29.patch,566 bytes, text/plain)
2009-05-04 20:24 UTC, Matt Farmer
Details
This ebuild applies the patch and compiles cleanly (virtualbox-modules-1.6.6-r2.ebuild,1.17 KB, text/plain)
2009-05-04 20:25 UTC, Matt Farmer
Details
New ebuild for kernels >= 2.6.29 (see comment #11) (virtualbox-modules-1.6.6-r3.ebuild,1.17 KB, text/plain)
2009-09-04 09:11 UTC, Stefan Kiesler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Wirz 2009-04-24 09:23:02 UTC
There are two issues with virtualbox-modules when compiling on kernel 2.6.29:

1) Change in kernel internal data structure. This patch fixes it:
diff -ruN a/vboxdrv/linux/SUPDrv-linux.c b/vboxdrv/linux/SUPDrv-linux.c
--- a/vboxdrv/linux/SUPDrv-linux.c      2008-08-26 11:47:58.000000000 +0200
+++ b/vboxdrv/linux/SUPDrv-linux.c      2009-04-24 11:08:07.000000000 +0200
@@ -769,8 +769,8 @@
     rc = supdrvCreateSession(&g_DevExt, (PSUPDRVSESSION *)&pSession);
     if (!rc)
     {
-        pSession->Uid       = current->euid;
-        pSession->Gid       = current->egid;
+        pSession->Uid       = current->cred->euid;
+        pSession->Gid       = current->cred->egid;
         pSession->Process   = RTProcSelf();
         pSession->R0Process = RTR0ProcHandleSelf();
     }

2) Missing patch in the ebuild:
When compiling for 2.6.27, a patch is applied in the ebuild. This patch also has to be applied for 2.6.29:
src_unpack() {
	unpack ${A}
	cd "${S}"
	if kernel_is 2 6 27 ; then
		epatch "${FILESDIR}"/${P}_2.6.27.patch
	fi
}
I assume this also applies for kernel 2.6.28, but I have skipped this kernel, so I don't actually know.


With these two corrections, I could build the package.



Reproducible: Always

Steps to Reproduce:
1. Build virtualbox-modules-1.6.6-r1 with running kernel 2.6.29




# emerge --info
Portage 2.1.6.7 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.29-gentoo-r1 i686)
=================================================================
System uname: Linux-2.6.29-gentoo-r1-i686-Intel-R-_Core-TM-2_Duo_CPU_T7500_@_2.20GHz-with-glibc2.0
Timestamp of tree: Wed, 22 Apr 2009 19:15:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.4.4-r14, 2.5.4-r2
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.3-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo/ http://gentoo.mneisen.org/"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X accessibility acl alsa apache2 arts avi berkdb bzip2 cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread emacs encode gcrypt gd gdbm gif glib gpm gstreamer gtk hal iconv imagemagick imap imlib ipod ipv6 ipw4965 isdnlog java jpeg kde latin1 ldap logitech-mouse logrotate midi mng motif mp3 mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin odbc ogg oggvorbis opengl openmp pam pcmcia pcre pdf pdflib perl php png povray pppd python qt3 qt3support qt4 quicktime readline reflection samba scanner session spell spl sse ssl svg sysfs tcpd tetex tiff truetype unicode usb vorbis wifi win32codecs x86 xine xinerama xml xorg xv xvid zip zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Patrick Lauer gentoo-dev 2009-04-24 20:02:48 UTC
1.6 is oooooold. 2.1.4 will be stable soon enough, so we'll just wait (see bug 267267 ) and then close this one, eh? :)
Comment 2 Marco Wirz 2009-04-25 11:17:54 UTC
Well, as far as I can see, despite being old it is still the latest stable version.

But now the case is documented, in case someone else finds this problem.
Maybe somebody could post the correct fix for the ebuild here. I just modified the condition in the if clause to 
if kernel_is 2 6 29 ; then
since I don't know the correct solution. (I assume there are people here who need as much as a couple of seconds for that. I don't belong to this group :-)
The patch itself applies fine, so only the condition has to be modified.

For all those less experienced gentoo users:
You have to do "ebuild virtualbox-modules-1.6.6-r1.ebuild digest" after modifying the ebuid file.

If there will be a newer stable version soon, I'm fine with sitting it out.
Comment 3 Matt Farmer 2009-05-04 20:24:30 UTC
Created attachment 190346 [details]
paths that solves the compilation error 

Ported from patch provided in: http://bugs.gentoo.org/256809
Comment 4 Matt Farmer 2009-05-04 20:25:27 UTC
Created attachment 190348 [details]
This ebuild applies the patch and compiles cleanly 

Ported from ebuild provided in: http://bugs.gentoo.org/256809
Comment 5 Michael Duelli 2009-05-28 19:07:28 UTC
After updating to gentoo-source 2.6.29r5 I am also getting the error messages about missing euid and egid when building app-emulation/virtualbox-modules-1.6.6-r1.

Please integrate this patch!
Comment 6 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-06-06 19:52:50 UTC
*** Bug 272965 has been marked as a duplicate of this bug. ***
Comment 7 Jeff 2009-06-27 00:14:24 UTC
this also applies to the 2.6.30 kernel
Comment 8 Peter Sliepenbeek 2009-07-06 16:58:28 UTC
I am one of those inexperienced users (at least concerning patching ebuilds) and did not succeed in patching the build of virtualbox-modules-1.6.6-r1 in order to run on gentoo 2.6.29.

Can anyone point me to proper directions for patching the ebuild? Or better yet, incorporate the patches in gentoo and issue an intermediate patch virtualbox-modules-1.6.6-r2!
Comment 9 Sebastián Treu 2009-07-14 21:33:29 UTC
(In reply to comment #8)
> I am one of those inexperienced users (at least concerning patching ebuilds)
> and did not succeed in patching the build of virtualbox-modules-1.6.6-r1 in
> order to run on gentoo 2.6.29.
> 
> Can anyone point me to proper directions for patching the ebuild? Or better
> yet, incorporate the patches in gentoo and issue an intermediate patch
> virtualbox-modules-1.6.6-r2!
> 

1. Download the ebuild attachment and replace it with the old ebuild
2. Download the patch and save it under 'files' directory naming it depending on your kernel.
3. issue: ebuild /usr/portage/app-emulation/virtualbox-modules/virtualbox-modules-1.6.6-r1.ebuild manifest.
4. Emerge the package.

Regards,



Comment 10 GM 2009-08-13 15:51:14 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > I am one of those inexperienced users (at least concerning patching ebuilds)
> > and did not succeed in patching the build of virtualbox-modules-1.6.6-r1 in
> > order to run on gentoo 2.6.29.
> > 
> > Can anyone point me to proper directions for patching the ebuild? Or better
> > yet, incorporate the patches in gentoo and issue an intermediate patch
> > virtualbox-modules-1.6.6-r2!
> > 
> 
> 1. Download the ebuild attachment and replace it with the old ebuild
> 2. Download the patch and save it under 'files' directory naming it depending
> on your kernel.
> 3. issue: ebuild
> /usr/portage/app-emulation/virtualbox-modules/virtualbox-modules-1.6.6-r1.ebuild
> manifest.
> 4. Emerge the package.
> 
> Regards,
> 

This steps work for me on 2.6.30-gentoo-r4, thanks!
Comment 11 Andy Dalton 2009-08-16 12:23:32 UTC
(In reply to comment #1)
> 1.6 is oooooold. 2.1.4 will be stable soon enough, so we'll just wait (see bug
> 267267 ) and then close this one, eh? :)

Not to be impatient, but the latest stable virtualbox-modules + the latest stable kernel has been busted for four mounths now. :-)

Having a app-emulation/virtualbox-modules-1.6.6-r2 that could handle all kernel versions >= 2.6.29 in the tree would be a tremendous help until one of the newer versions does eventually become stable.  Maybe changing

if kernel_is 2 6 29

to

if kernel_is ge 2 6 29

in the attached ebuild would do the trick?

Thanks for your help!
Comment 12 Josep Sanjuas 2009-08-17 07:58:44 UTC
The patch also works for me. Also I'd say integrate with portage asap, it's just a super super harmless patch. After several months vbox is still broken..
Comment 13 Renan Manola 2009-08-26 04:41:15 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > (In reply to comment #8)
> > > I am one of those inexperienced users (at least concerning patching ebuilds)
> > > and did not succeed in patching the build of virtualbox-modules-1.6.6-r1 in
> > > order to run on gentoo 2.6.29.
> > > 
> > > Can anyone point me to proper directions for patching the ebuild? Or better
> > > yet, incorporate the patches in gentoo and issue an intermediate patch
> > > virtualbox-modules-1.6.6-r2!
> > > 
> > 
> > 1. Download the ebuild attachment and replace it with the old ebuild
> > 2. Download the patch and save it under 'files' directory naming it depending
> > on your kernel.
> > 3. issue: ebuild
> > /usr/portage/app-emulation/virtualbox-modules/virtualbox-modules-1.6.6-r1.ebuild
> > manifest.
> > 4. Emerge the package.
> > 
> > Regards,
> > 
> 
> This steps work for me on 2.6.30-gentoo-r4, thanks!
> 

This also worked for me on 2.6.30-r4 . Please admins, add this fix to the main branch.
Comment 14 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-09-01 08:27:44 UTC
*** Bug 283350 has been marked as a duplicate of this bug. ***
Comment 15 Stefan Kiesler 2009-09-04 09:11:45 UTC
Created attachment 203105 [details]
New ebuild for kernels >= 2.6.29 (see comment #11)

Applied the change from Comment #11 to the ebuild.
Tested and works fine for me on 2.6.30-gentoo-r4 amd64.

Please, add to portage or mark 1.6.6 unstable, right now this is NOT a stable package!
Comment 16 Dmitriy K. 2009-09-13 19:02:21 UTC
(In reply to comment #15)
> Created an attachment (id=203105) [edit]
> New ebuild for kernels >= 2.6.29 (see comment #11)
> 
> Applied the change from Comment #11 to the ebuild.
> Tested and works fine for me on 2.6.30-gentoo-r4 amd64.
> 
> Please, add to portage or mark 1.6.6 unstable, right now this is NOT a stable
> package!
> 

Doesn't works here, on x86 2.6.30-gentoo-r4
But an error seems different this time.


...
  i686-pc-linux-gnu-gcc -Wp,-MD,/var/tmp/portage/app-emulation/virtualbox-modules-1.6.6-r3/work/vboxdrv/r0drv/linux/.initterm-r0drv-linux.o.d  -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/include -Iinclude  -I/usr/src/linux-2.6.30-gentoo-r4/arch/x86/include -include include/linux/autoconf.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -fno-delete-null-pointer-checks -Os -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=k8 -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-stack-protector -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -I/usr/src/linux/include -I/var/tmp/portage/app-emulation/virtualbox-modules-1.6.6-r3/work/vboxdrv/ -I/var/tmp/portage/app-emulation/virtualbox-modules-1.6.6-r3/work/vboxdrv/include -I/var/tmp/portage/app-emulation/virtualbox-modules-1.6.6-r3/work/vboxdrv/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_X86 -DUSE_NEW_OS_INTERFACE_FOR_MM  -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(initterm_r0drv_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxdrv)"  -c -o /var/tmp/portage/app-emulation/virtualbox-modules-1.6.6-r3/work/vboxdrv/r0drv/linux/initterm-r0drv-linux.o /var/tmp/portage/app-emulation/virtualbox-modules-1.6.6-r3/work/vboxdrv/r0drv/linux/initterm-r0drv-linux.c                                                       
/var/tmp/portage/app-emulation/virtualbox-modules-1.6.6-r3/work/vboxdrv/r0drv/linux/alloc-r0drv-linux.c: In function ‘rtMemAlloc’:
/var/tmp/portage/app-emulation/virtualbox-modules-1.6.6-r3/work/vboxdrv/r0drv/linux/alloc-r0drv-linux.c:138: error: ‘_PAGE_KERNEL_EXEC’ undeclared (first use in this function)
/var/tmp/portage/app-emulation/virtualbox-modules-1.6.6-r3/work/vboxdrv/r0drv/linux/alloc-r0drv-linux.c:138: error: (Each undeclared identifier is reported only once
/var/tmp/portage/app-emulation/virtualbox-modules-1.6.6-r3/work/vboxdrv/r0drv/linux/alloc-r0drv-linux.c:138: error: for each function it appears in.)
make[2]: *** [/var/tmp/portage/app-emulation/virtualbox-modules-1.6.6-r3/work/vboxdrv/r0drv/linux/alloc-r0drv-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/var/tmp/portage/app-emulation/virtualbox-modules-1.6.6-r3/work/vboxdrv] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.30-gentoo-r4'
make: *** [vboxdrv] Error 2
Comment 17 Vitaly Demyanec 2009-10-28 10:11:47 UTC
Patch along with -r3 ebuild works for me at 2.6.30-gentoo-r5 amd64
Comment 18 Patrizio Bassi 2009-10-31 10:54:18 UTC
any chance to have these patches in portage?
Comment 19 Patrick Lauer gentoo-dev 2009-11-10 01:40:01 UTC
3.0 stable everywhere.