Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 386497 - app-emulation/virtualbox-modules-4.1.{2,4} fails to compile with sys-kernel/hardened-sources-3.0.4-r1 x86_64
Summary: app-emulation/virtualbox-modules-4.1.{2,4} fails to compile with sys-kerne...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL: https://forums.grsecurity.net/viewtop...
Whiteboard:
Keywords:
: 379421 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-09 07:10 UTC by letrec@gmail.com
Modified: 2011-11-06 18:50 UTC (History)
5 users (show)

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


Attachments
virtualbox-modules-4.1.4 patch (virtualbox-modules-4.1.4-pax-const.patch,2.28 KB, patch)
2011-10-09 07:11 UTC, letrec@gmail.com
Details | Diff
Patched Ebuild (virtualbox-modules-4.1.4.ebuild,1.60 KB, text/plain)
2011-10-09 07:13 UTC, letrec@gmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description letrec@gmail.com 2011-10-09 07:10:37 UTC
Compilation fails. 

Reproducible: Always

Steps to Reproduce:
1. emerge -av =app-emulation/virtualbox-modules-4.1.4
2. Observe Build Error

Actual Results:  
Compilation fails

Expected Results:  
Successful Compilation and Installation

This can be amended by patching your virtualbox-modules-4.1.{2,4}.ebuild file to include the attached patch found here:

http://www.grsecurity.net/~paxguy1/virtualbox-modules-4.1.2-pax-const.patch

See attached patch and modified ebuild. 

Apparently it's an issue with gcc constify plugin as described in thread.
Comment 1 letrec@gmail.com 2011-10-09 07:11:54 UTC
Created attachment 289301 [details, diff]
virtualbox-modules-4.1.4 patch

Patch for Gcc Constify Plugin
Comment 2 letrec@gmail.com 2011-10-09 07:13:16 UTC
Created attachment 289303 [details]
Patched Ebuild

Patched Ebuild to  epatch constify patch, no conditionals.
Comment 3 Anthony Basile gentoo-dev 2011-10-09 20:31:43 UTC
The problem is actually in virtualbox, not the hardened-kernel.  If the virtualbox team wishes, they can include this patch.

@polynomial.  if you want to conditionally depend on a USE flag, don't use "hardened" because that refers only to hardened tool chain.  We've been recommending to people to use "pax_kernel".
Comment 4 Aleksander Wałęski 2011-10-18 22:52:57 UTC
Virtualbox team seems to ignore the problem ( https://www.virtualbox.org/ticket/9432 ). Couldn't this patch be merged into portage tree?
Comment 5 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-10-24 22:13:33 UTC
+  24 Oct 2011; Lars Wendler <polynomial-c@gentoo.org>
+  virtualbox-modules-4.1.4.ebuild,
+  +files/virtualbox-modules-4.1.4-pax-const.patch:
+  Fixed compilation with >=3.0.4 hardened kernel. Thanks to letrec for
+  providing the patch and blueness for giving the correct hints wrt. USE flag
+  naming (bug #386497).
+
Fix went into 4.1.4 version. 4.1.2 will vanish soon.
Comment 6 Anton Bolshakov 2011-10-26 08:16:21 UTC
I would like to ask to re-open this bug because I'm unable to compile  app-emulation/virtualbox-modules-4.1.4[pax_kernel] against earlier version of the kernel such as sys-kernel/hardened-sources-2.6.37-r7

Please add an additional check for the kernel version.
Comment 7 Tony Vroon (RETIRED) gentoo-dev 2011-10-26 08:41:39 UTC
(In reply to comment #6)
> I would like to ask to re-open this bug because I'm unable to compile 
> app-emulation/virtualbox-modules-4.1.4[pax_kernel] against earlier version of
> the kernel such as sys-kernel/hardened-sources-2.6.37-r7

You are expected to use the latest stable ebuild in the tree, which is 3.0.4-r4.
Comment 8 Anton Bolshakov 2011-10-26 08:48:36 UTC
(In reply to comment #7)
> You are expected to use the latest stable ebuild in the tree, which is
> 3.0.4-r4.

I would if I could. Unfortunately, I've got stuck in the past due to the bug #382793

FYI, vmware-modules-238.5 does that:
  kernel_is ge 2 6 39 && epatch "${FILESDIR}/${PV_MAJOR}-2.6.39.patch"
Comment 9 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-11-06 13:16:19 UTC
+  06 Nov 2011; Lars Wendler <polynomial-c@gentoo.org>
+  virtualbox-modules-4.1.4.ebuild, virtualbox-modules-4.1.6.ebuild:
+  Added kernel version check for pax patch. Cleaned up 4.1.4 ebuild a bit.
+
Comment 10 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-11-06 18:50:14 UTC
*** Bug 379421 has been marked as a duplicate of this bug. ***