VirtualBox

Opened 7 years ago

Closed 6 years ago

#16286 closed defect (fixed)

Kernel module does not compile with Linux 4.9

Reported by: HarryE Owned by:
Component: other Version: VirtualBox 5.1.10
Keywords: Debian Kernel 4.9 Cc:
Guest type: all Host type: Linux

Description (last modified by Frank Mehnert)

The kernel module is not compiling with Virtual Box 5.1.10 for Debian Jessie and Linux 4.9. I get the following compile 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 ./arch/x86/include/asm/mmzone_64.h:10,
                 from ./arch/x86/include/asm/mmzone.h:4,
                 from ./include/linux/mmzone.h:889,
                 from ./include/linux/gfp.h:5,
                 from ./include/linux/slab.h:14,
                 from /tmp/vbox.0/linux/../SUPDrvInternal.h:80,
                 from /tmp/vbox.0/linux/SUPDrv-linux.c:32:
./arch/x86/include/asm/realmode.h: In function 'real_mode_size_needed':
./arch/x86/include/asm/realmode.h:66:2: error: implicit declaration of function 'ALIGN' [-Werror=implicit-function-declaration]
  return ALIGN(real_mode_blob_end - real_mode_blob, PAGE_SIZE);
  ^

I included my kernel configuration.

Attachments (3)

.config (102.3 KB ) - added by HarryE 7 years ago.
defconfig (13.5 KB ) - added by joeAverage 7 years ago.
defconfig for my box
vbox-install.log (91.5 KB ) - added by zdavatz 7 years ago.
vbox-install.log for Virtualbox 5.1.12-112440-Linux_amd64

Download all attachments as: .zip

Change History (16)

by HarryE, 7 years ago

Attachment: .config added

comment:1 by joeAverage, 7 years ago

same here with Fedora 25, my deconfig (attached) and VirtualBox-5.1-5.1.10_112026_fedora25-1.x86_64.rpm

If I do a kernel compile with "make alldefconfig setting" vbox modules will be build without error !

there must be a setting in my defconfig that impedes the building of vbox modules with kernel 4.9. But which ?

my defconfig has been working during the whole 4.8-series

by joeAverage, 7 years ago

Attachment: defconfig added

defconfig for my box

comment:2 by zdavatz, 7 years ago

Interesting, with Kernel 4.9 I get:

/usr/src/linux> sudo make alldefconfig setting
scripts/kconfig/conf  --alldefconfig Kconfig
#
# configuration written to .config
#
scripts/kconfig/conf  --silentoldconfig Kconfig
make[1]: *** Keine Regel, um „setting“ zu erstellen.  Schluss.
Makefile:525: die Regel für Ziel „__build_one_by_one“ scheiterte
make: *** [__build_one_by_one] Fehler 2
Last edited 7 years ago by zdavatz (previous) (diff)

comment:3 by zdavatz, 7 years ago

I normally just run

make silentoldconfig

and that always used to work.

comment:4 by Frank Mehnert, 7 years ago

Description: modified (diff)

comment:5 by Frank Mehnert, 7 years ago

Thanks for the report. See r64872 which contains the correct fix. This fix will be included in the next 5.0 / 5.1 maintenance releases.

in reply to:  2 comment:6 by joeAverage, 7 years ago

Replying to zdavatz:

Interesting, with Kernel 4.9 I get:

/usr/src/linux> sudo make alldefconfig setting
scripts/kconfig/conf  --alldefconfig Kconfig
#
# configuration written to .config
#
scripts/kconfig/conf  --silentoldconfig Kconfig
make[1]: *** Keine Regel, um „setting“ zu erstellen.  Schluss.
Makefile:525: die Regel für Ziel „__build_one_by_one“ scheiterte
make: *** [__build_one_by_one] Fehler 2

well, I meant "make alldefconfig" and put the '"' wrong

Last edited 7 years ago by joeAverage (previous) (diff)

comment:7 by joeAverage, 7 years ago

thanks Frank for quick support !!!

in reply to:  5 comment:8 by HarryE, 7 years ago

Replying to frank:

Thanks for the report. See r64872 which contains the correct fix. This fix will be included in the next 5.0 / 5.1 maintenance releases.

That did it. Thanks!

comment:9 by Frank Mehnert, 7 years ago

Resolution: fixed
Status: newclosed

Fix is part of VBox 5.1.12.

by zdavatz, 7 years ago

Attachment: vbox-install.log added

vbox-install.log for Virtualbox 5.1.12-112440-Linux_amd64

comment:10 by zdavatz, 7 years ago

I still get the same error please see above attachment.

make[2]: *** [/tmp/vbox.0/r0drv/initterm-r0drv.o] Fehler 1
In file included from ./include/linux/jiffies.h:10:0,
                 from ./include/linux/ktime.h:25,
                 from ./include/linux/rcupdate.h:47,
                 from ./include/linux/srcu.h:33,
                 from ./include/linux/notifier.h:15,
                 from ./include/linux/memory_hotplug.h:6,
                 from ./include/linux/mmzone.h:751,
                 from ./include/linux/gfp.h:5,
                 from ./include/linux/kmod.h:22,
                 from ./include/linux/module.h:13,
                 from /tmp/vbox.0/include/internal/iprt.h:56,
                 from /tmp/vbox.0/r0drv/memobj-r0drv.c:34:
./include/generated/timeconst.h:11:2: Fehler: #error "include/generated/timeconst.h has the wrong HZ value!"
 #error "include/generated/timeconst.h has the wrong HZ value!"
  ^
scripts/Makefile.build:293: die Regel für Ziel „/tmp/vbox.0/r0drv/memobj-r0drv.o“ scheiterte
make[2]: *** [/tmp/vbox.0/r0drv/memobj-r0drv.o] Fehler 1
scripts/Makefile.build:293: die Regel für Ziel „/tmp/vbox.0/linux/SUPDrv-linux.o“ scheiterte
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Fehler 1
Makefile:1490: die Regel für Ziel „_module_/tmp/vbox.0“ scheiterte
make[1]: *** [_module_/tmp/vbox.0] Fehler 2
Makefile:303: die Regel für Ziel „vboxdrv“ scheiterte
make: *** [vboxdrv] Fehler 2

comment:11 by zdavatz, 7 years ago

Resolution: fixed
Status: closedreopened

comment:12 by Frank Mehnert, 7 years ago

zdavatz, this looks to me like a local build problem. You are compiling the VBox kernel module on your host which uses a kernel with a different HZ value than 250 while at the same time the kernel headers depend on such a value. I created a local kernel build with HZ=300 and successfully compiled the VirtualBox kernel modules against this kernel.

comment:13 by Valery Ushakov, 6 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use