Guest Additions failed to build after Fedora 17 sw update

Discussions about using Linux guests in VirtualBox.
Post Reply
BCD3
Posts: 14
Joined: 2. Aug 2012, 18:18
Primary OS: MS Windows 7
VBox Version: OSE Fedora
Guest OSses: Fedora 18

Guest Additions failed to build after Fedora 17 sw update

Post by BCD3 »

After updating my Fedora 17 software (including the kernel), I ran the guest additions as usual, but got an error on the 'Building main Guest Additions module [FAILED]'. In /var/log/vboxadd-install.log I found the following error entry:

*********************************************************
if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/r0drv/linux/initterm-r0drv-linux.o != "scripts/mod/empty.o" ]; then /usr/src/kernels/3.5.0-2.fc17.x86_64/scripts/recordmcount "/tmp/vbox.0/r0drv/linux/initterm-r0drv-linux.o"; fi; fi;
gcc -Wp,-MD,/tmp/vbox.0/r0drv/linux/.memobj-r0drv-linux.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include -I/usr/src/kernels/3.5.0-2.fc17.x86_64/arch/x86/include -Iarch/x86/include/generated -Iinclude -include /usr/src/kernels/3.5.0-2.fc17.x86_64/include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -include /tmp/vbox.0/include/VBox/VBoxGuestMangling.h -I/lib/modules/3.5.0-2.fc17.x86_64/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxguest/ -I/tmp/vbox.0/vboxguest/include -I/tmp/vbox.0/vboxguest/r0drv/linux -D__KERNEL__ -DMODULE -DVBOX -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_GUEST -DIN_GUEST_R0 -DIN_MODULE -DRT_WITH_VBOX -DVBGL_VBOXGUEST -DVBOX_WITH_HGCM -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(memobj_r0drv_linux)" -D"KBUILD_MODNAME=KBUILD_STR(vboxguest)" -c -o /tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.o /tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c
/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c: In function ‘rtR0MemObjLinuxDoMmap’:
/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:1150:9: error: implicit declaration of function ‘do_mmap’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxguest] Error 2
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
*****************************************************************************

Any help would be greatly appreciated...

Thanks,
Bruce Detter
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Guest Additions failed to build after Fedora 17 sw updat

Post by Perryg »

What is the version of VirtualBox, and where did you get the install?
robatino
Posts: 164
Joined: 17. Dec 2008, 21:15

Re: Guest Additions failed to build after Fedora 17 sw updat

Post by robatino »

It's this bug associated with the 3.5.0 kernel: https://www.virtualbox.org/ticket/10709
BCD3
Posts: 14
Joined: 2. Aug 2012, 18:18
Primary OS: MS Windows 7
VBox Version: OSE Fedora
Guest OSses: Fedora 18

Re: Guest Additions failed to build after Fedora 17 sw updat

Post by BCD3 »

VirtualBox 4.1.18 with the related guest additions from virtualbox.
Fedora 17 from fedoraproject.
Everything was working fine until I updated the Fedora (including the kernel) sw this morning.

It does appear to be the same bug as 10709. Is there a way to go back a version?

Thanks...
BCD3
Posts: 14
Joined: 2. Aug 2012, 18:18
Primary OS: MS Windows 7
VBox Version: OSE Fedora
Guest OSses: Fedora 18

Re: Guest Additions failed to build after Fedora 17 sw updat

Post by BCD3 »

robatino's link to the bug was very helpful. They pushed the kernel-3.5.0 out this morning. The suggested fix was to copy a source code file from the vbox fedora host src to the vbox fedora client src. I'm running F17 in a Win7 host so I don't have that host file, any suggestions?
robatino
Posts: 164
Joined: 17. Dec 2008, 21:15

Re: Guest Additions failed to build after Fedora 17 sw updat

Post by robatino »

BCD3 wrote:robatino's link to the bug was very helpful. They pushed the kernel-3.5.0 out this morning. The suggested fix was to copy a source code file from the vbox fedora host src to the vbox fedora client src. I'm running F17 in a Win7 host so I don't have that host file, any suggestions?
I attached a copy of /usr/src/vboxhost-4.1.18/vboxdrv/r0drv/linux/memobj-r0drv-linux.c from my F17 x86_64 host to the ticket:
https://www.virtualbox.org/attachment/t ... rv-linux.c
BCD3
Posts: 14
Joined: 2. Aug 2012, 18:18
Primary OS: MS Windows 7
VBox Version: OSE Fedora
Guest OSses: Fedora 18

Re: Guest Additions failed to build after Fedora 17 sw updat

Post by BCD3 »

Again, thank you to robatino, following the instructions in the bug report, and using rpm2cpio and cpio I was able to extract the latest src code from a linux host download (without having to actually install it). I do appreciate you attaching the source code to bug report, it will help the next person, but I had already started the rpm file extraction before I saw your post...

The problem has been resolved..
Hugh1234
Posts: 1
Joined: 8. Aug 2012, 06:30

Re: Guest Additions failed to build after Fedora 17 sw updat

Post by Hugh1234 »

Could anyone please provide instructions on how to use this modified source code?
Must I download the whole source for the guest additions and update/compile it or can I use it with the existing "Install guest additions" from the guest console somehow?
In the former case, where do I find the howto for using a custom guest additions?
BTW, how do I retrieve the attached source file without including all the line numbers etc?
ManfredB
Volunteer
Posts: 178
Joined: 10. May 2007, 12:48

Re: Guest Additions failed to build after Fedora 17 sw updat

Post by ManfredB »

Hello Hugh 1234,

I used the additions-4.2.0_Beta1.

Problem is solved.

Manfred
urilabob
Posts: 67
Joined: 16. Aug 2009, 17:09
Primary OS: Linux other
VBox Version: OSE Fedora
Guest OSses: Fedora 11

Re: Guest Additions failed to build after Fedora 17 sw updat

Post by urilabob »

Hugh1234 wrote:Could anyone please provide instructions on how to use this modified source code?
Must I download the whole source for the guest additions and update/compile it or can I use it with the existing "Install guest additions" from the guest console somehow?
In the former case, where do I find the howto for using a custom guest additions?
BTW, how do I retrieve the attached source file without including all the line numbers etc?
Where it goes depends on the distro; in Fedora it would go in /usr/src/vboxguest<your guest number>/r0drv/linux (the sources should already be there from your previous install). You would then just need to do "/etc/init.d/vboxadd setup". But I decided to revert my VM until 4.2 is fully released.
kitgerrits
Posts: 1
Joined: 20. Aug 2012, 10:41

Re: Guest Additions failed to build after Fedora 17 sw updat

Post by kitgerrits »

I have pulled the kernel modules from rpmfusion and they seem to work:
Name : kmod-VirtualBox
Arch : x86_64
Version : 4.1.18
Release : 1.fc17.5
Size : 8.6 k
Repo : rpmfusion-free-updates
Summary : Metapackage which tracks in VirtualBox kernel module for newest
: kernel
License : GPLv2 or CDDL
Description : This is a meta-package without payload which sole purpose is to
: require the VirtualBox kernel module(s) for the newest kernel.
: to make sure you get it together with a new kernel.
robatino
Posts: 164
Joined: 17. Dec 2008, 21:15

Re: Guest Additions failed to build after Fedora 17 sw updat

Post by robatino »

The just released 4.1.20 works for me (except for corrupting the kernel-devel package, but that was already happening, see https://www.virtualbox.org/ticket/10709#comment:11 ).
Tuelho
Posts: 1
Joined: 21. Aug 2012, 15:50

Re: Guest Additions failed to build after Fedora 17 sw updat

Post by Tuelho »

Hey! The ticket's (#10709) instructions worked fine for me. It saved my work day 0/
;-)
Post Reply