Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 448332 - app-emulation/virtualbox-modules-4.1.22 compilation fails with sys-kernel/gentoo-sources-3.6.11
Summary: app-emulation/virtualbox-modules-4.1.22 compilation fails with sys-kernel/gen...
Status: RESOLVED DUPLICATE of bug 433796
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-23 21:38 UTC by Asaf Gery
Modified: 2012-12-23 22:38 UTC (History)
2 users (show)

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


Attachments
This patch adds the needed include of <linux/err.h> in vboxpci/VBoxPciInternal.h (virtualbox-modules-4.1.22-kernel-3.6-vboxpci.patch,413 bytes, patch)
2012-12-23 21:41 UTC, Asaf Gery
Details | Diff
This is the ebuild that applies the patch (virtualbox-modules-4.1.22-r1.ebuild,1.65 KB, text/plain)
2012-12-23 21:41 UTC, Asaf Gery
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Asaf Gery 2012-12-23 21:38:38 UTC
After upgrading my kernel to gentoo-sources-3.6.11, remerging virtualbox-modules-4.1.22 fails with compilation error:
In file included from /var/tmp/portage/app-emulation/virtualbox-modules-4.1.22/work/vboxpci/VBoxPciInternal.h:34:0,
                 from /var/tmp/portage/app-emulation/virtualbox-modules-4.1.22/work/vboxpci/VBoxPci.c:38:
include/linux/iommu.h: In function ‘iommu_group_alloc’:
include/linux/iommu.h:272:2: error: implicit declaration of function ‘ERR_PTR’

This error is due to a change in the kernel headers between kernel versions 3.5.7 and 3.6.11.

The fix is quite simple VBoxPciInternal.h should also include <linux/err.h> in case the kernel is equal or greater 3.6.11 (assuming that it was not changed again in higher kernel versions).

I attached a patch and ebuild that fix this problem.

Reproducible: Always

Steps to Reproduce:
1. emerge sys-kernel/gentoo-sources-3.6.11
2. update /usr/src/linux to point to that kernel
3.(try to) emerge app-emulation/virtualbox-modules-4.1.22 
Actual Results:  
Compilation of vboxpci module fails, as a result emerge fails

Expected Results:  
app-emulation/virtualbox-modules-4.1.22 should be installed successfully
Comment 1 Asaf Gery 2012-12-23 21:41:13 UTC
Created attachment 333162 [details, diff]
This patch adds the needed include of <linux/err.h> in vboxpci/VBoxPciInternal.h
Comment 2 Asaf Gery 2012-12-23 21:41:43 UTC
Created attachment 333164 [details]
This is the ebuild that applies the patch
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2012-12-23 22:01:49 UTC
I suppose this problem doesn't appear with virtualbox-4.1.24 (currently in unstable branch). If yes please mark this bug as a duplicate of bug #447892.
Comment 4 Asaf Gery 2012-12-23 22:38:29 UTC
Sorry, it seems that this bug was already reported and a patch was already suggested.
There are minor differences between #433796's patch and my patch - in my patch I included the missing <linux/err.h> header file conditionally and in the ebuild I applied the patch conditionally, in #433796 the include is unconditional. I don't know whether it makes any change at all.
Another difference is that the patch of #433796 also adds include of <linux/notifier.h> to vboxpci/VBoxPci.c, which I didn't add, so I am wondering whether that include is really needed.

I tested only on amd64, maybe x86 requires the other include?

*** This bug has been marked as a duplicate of bug 433796 ***