VirtualBox

Ticket #16286 (reopened defect)

Opened 6 months ago

Last modified 6 months ago

Kernel module does not compile with Linux 4.9

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

Description (last modified by frank) (diff)

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

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

Change History

Changed 6 months ago by HarryE

comment:1 Changed 6 months ago by joeAverage

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

Changed 6 months ago by joeAverage

defconfig for my box

comment:2 follow-up: ↓ 6 Changed 6 months ago by 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
Last edited 6 months ago by zdavatz (previous) (diff)

comment:3 Changed 6 months ago by zdavatz

I normally just run

make silentoldconfig

and that always used to work.

comment:4 Changed 6 months ago by frank

  • Description modified (diff)

comment:5 follow-up: ↓ 8 Changed 6 months ago by 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.

comment:6 in reply to: ↑ 2 Changed 6 months ago by joeAverage

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 6 months ago by joeAverage (previous) (diff)

comment:7 Changed 6 months ago by joeAverage

thanks Frank for quick support !!!

comment:8 in reply to: ↑ 5 Changed 6 months ago by HarryE

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 Changed 6 months ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fix is part of VBox 5.1.12.

Changed 6 months ago by zdavatz

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

comment:10 Changed 6 months ago by zdavatz

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 Changed 6 months ago by zdavatz

  • Status changed from closed to reopened
  • Resolution fixed deleted

comment:12 Changed 6 months ago by frank

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.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use