Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 602678 - app-emulation/virtualbox-modules-5.1.10 does not build with kernel 4.9
Summary: app-emulation/virtualbox-modules-5.1.10 does not build with kernel 4.9
Status: RESOLVED DUPLICATE of bug 602420
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-14 19:06 UTC by François Valenduc
Modified: 2016-12-15 08:27 UTC (History)
2 users (show)

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


Attachments
linux 4.9.0 patch for virtualbox-modules (linux-4.9-vboxdrv.patch,513 bytes, patch)
2016-12-15 05:19 UTC, Uladzimir Bely
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description François Valenduc 2016-12-14 19:06:12 UTC
virtualbox-modules doesn't compile with kernel 4.9. I get the following error:

In file included from ./arch/x86/include/asm/acpi.h:33:0,
                 from ./arch/x86/include/asm/fixmap.h:19,
                 from ./arch/x86/include/asm/apic.h:11,
                 from ./arch/x86/include/asm/smp.h:12,
                 from ./include/linux/smp.h:59,
                 from ./include/linux/topology.h:33,
                 from ./include/linux/gfp.h:8,
                 from ./include/linux/slab.h:14,
                 from /var/tmp/portage/app-emulation/virtualbox-modules-5.1.10/work/vboxdrv/linux/../SUPDrvInternal.h:80,
                 from /var/tmp/portage/app-emulation/virtualbox-modules-5.1.10/work/vboxdrv/linux/SUPDrv-linux.c:32:
./arch/x86/include/asm/realmode.h: In function ‘real_mode_size_needed’:
./arch/x86/include/asm/realmode.h:67:9: error: implicit declaration of function ‘ALIGN’ [-Werror=implicit-function-declaration]
  return ALIGN(real_mode_blob_end - real_mode_blob, PAGE_SIZE);

Looking at the git tree of the kernel, almost nothing changed in /arch/x86/include/asm/realmode.h. Can somebody explains this problem ?
Comment 1 Uladzimir Bely 2016-12-15 05:12:18 UTC
There were several duplicate bugs here, closed as 'UPSTREAM BUGS'

But I found a solution:

Replace in linux sources, in realmode.h:

return ALIGN(real_mode_blob_end - real_mode_blob, PAGE_SIZE);
with
return __ALIGN_KERNEL(real_mode_blob_end - real_mode_blob, PAGE_SIZE);

It's the devfinition of ALIGN taken from <linux/kernel.h>

Maybe it should be in form of patch for gentoo-sources.
Comment 2 Uladzimir Bely 2016-12-15 05:19:44 UTC
Created attachment 456278 [details, diff]
linux 4.9.0 patch for virtualbox-modules

This one worked for me
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-12-15 08:27:57 UTC

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