Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 297878 - Compilation against vanilla kernels from git fails virtualbox-modules, nvidia-driver
Summary: Compilation against vanilla kernels from git fails virtualbox-modules, nvidia...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
: 298258 300326 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-22 08:02 UTC by Ingo Krabbe
Modified: 2010-02-25 16:40 UTC (History)
8 users (show)

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


Attachments
git patch mail to compile against linux-next.git kernels against virtualbox-modules-3.1.0.ebuild (0001-new-version-works-now-for-2.6.32-kernels.patch,9.01 KB, patch)
2009-12-22 08:04 UTC, Ingo Krabbe
Details | Diff
files/virtualbox-modules-2.6.32.patch (virtualbox-modules-2.6.32.patch,5.13 KB, patch)
2010-02-04 09:17 UTC, Laurento Frittella (mrfree)
Details | Diff
virtualbox-modules-3.1.2.ebuild (virtualbox-modules-3.1.2.ebuild,1.79 KB, text/plain)
2010-02-04 09:17 UTC, Laurento Frittella (mrfree)
Details
0001-autoconf.h-was-moved-in-2.6.33.patch (0001-autoconf.h-was-moved-in-2.6.33.patch,6.99 KB, patch)
2010-02-25 14:56 UTC, Christoph Brill (egore) (RESIGNED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Krabbe 2009-12-22 08:02:28 UTC
Using a vanilla kernel from git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

fails as (at least) on this branch 
@* master     bf923ab Add linux-next specific files for 20091211
some header files moved from linux/ to generated/

So all module emerges fail.

I assume that the all kernel trees will move to this layout (I may be wrong at this topic), so I file a patched virtualbox-modules file here.  I also patched nvidia-drivers, but that beast is a bit more complex, so I installed it by hand.
I might completely patch those modules if you give me a git overlay repository/repository branch that I can publish to.
Comment 1 Ingo Krabbe 2009-12-22 08:04:10 UTC
Created attachment 213731 [details, diff]
git patch mail to compile against linux-next.git kernels against virtualbox-modules-3.1.0.ebuild
Comment 2 George Diamantopoulos 2009-12-24 16:08:22 UTC
Hi,

I assume this also works for 2.6.33-rc? I also get errors about autoconf.h when trying to emerge virtualbox-modules with this newer kernel.

However I can't get the patch to apply properly, it produces errors. Here's the part i modified in the ebuild:

src_prepare() {

        # Apply 2.6.32 Patch
        epatch "${FILESDIR}/virtualbox-modules-2.6.32.patch"

}

And here's some output from the patching attempt:

PATCH COMMAND:   patch -p4 -g0 -E --no-backup-if-mismatch < /usr/local/portage/myoverlay/app-emulation/virtualbox-modules/files/virtualbox-modules-2.6.32.patch

===========================================
missing header for unified diff at line 17 of patch
can't find file to patch at input line 17
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 1f713a0d637ad4ab05e2ed9cec6b040cca966df5 Mon Sep 17 00:00:00 2001
|From: Ingo Krabbe <ingo.krabbe@eoa.de>
|Date: Tue, 22 Dec 2009 08:47:05 +0100
|Subject: [PATCH] new version works now for 2.6.32 kernels
|
|---
| app-emulation/virtualbox-modules/Manifest          |    3 +-
| ...32-moves-linux-autoconf.h-generated-autoc.patch |  123 ++++++++++++++++++++
| .../virtualbox-modules-3.1.0.ebuild                |    6 +
| 3 files changed, 131 insertions(+), 1 deletions(-)
| create mode 100644 app-emulation/virtualbox-modules/files/kernel-2.6.32-moves-linux-autoconf.h-generated-autoc.patch
|
|diff --git a/app-emulation/virtualbox-modules/Manifest b/app-emulation/virtualbox-modules/Manifest
|index ac40080..c1d5332 100644
|--- a/app-emulation/virtualbox-modules/Manifest
|+++ b/app-emulation/virtualbox-modules/Manifest
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
patching file kernel-2.6.32-moves-linux-autoconf.h-generated-autoc.patch
missing header for unified diff at line 161 of patch
can't find file to patch at input line 161
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-3.1.0.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-3.1.0.ebuild
|index 0695489..a78fb4b 100644
|--- a/app-emulation/virtualbox-modules/virtualbox-modules-3.1.0.ebuild
|+++ b/app-emulation/virtualbox-modules/virtualbox-modules-3.1.0.ebuild
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
Comment 3 Ingo Krabbe 2009-12-24 21:28:48 UTC
Your patch command looks a bit strange to me.  What I actually did to create and apply this patch, was to "git init" my portage overlay, and then
git am 0001-new-version[...].git (or git apply, what you prefer)

What also works is

cd $(your-overlay)/app-emulation/virtualbox-modules
patch -p3 0001-new[...]patch

Sorry for the inconvenience, but I find it most easy to just use git.
Comment 4 Patrick Lauer gentoo-dev 2010-01-10 00:05:00 UTC
*** Bug 300326 has been marked as a duplicate of this bug. ***
Comment 5 Patrick Lauer gentoo-dev 2010-01-10 00:05:30 UTC
*** Bug 298258 has been marked as a duplicate of this bug. ***
Comment 6 Laurento Frittella (mrfree) 2010-02-04 09:17:07 UTC
Created attachment 218379 [details, diff]
files/virtualbox-modules-2.6.32.patch

I read your patch and if I correctly understood the problem we can simply sed s/ linux/autoconf.h in generated/autoconf.h

I did it and produced a useful patch

The ebuild compiles fine
Comment 7 Laurento Frittella (mrfree) 2010-02-04 09:17:29 UTC
Created attachment 218381 [details]
virtualbox-modules-3.1.2.ebuild
Comment 8 Christoph Brill (egore) (RESIGNED) 2010-02-25 14:56:23 UTC
Created attachment 221149 [details, diff]
0001-autoconf.h-was-moved-in-2.6.33.patch

This fixes building virtualbox-modules against 2.6.33 while keeping it compilable against earlier versions using

#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)

Works fine here.
Comment 9 Patrick Lauer gentoo-dev 2010-02-25 16:40:22 UTC
3.1.4 has a fix already :) 
I don't care for old versions, if you use a ~arch kernel use ~arch modules, or else.

I must say that that patch is a bit nicer than mine, if you feel like making upstream happy you can check if they've already adapted to it and if not provide them your patch.

Thanks!