LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (http://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   building guest additions in VirtualBox with 38-kernel fails (http://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/building-guest-additions-in-virtualbox-with-38-kernel-fails-871284/)

j1alu 03-27-2011 11:35 AM

building guest additions in VirtualBox with 38-kernel fails
 
Virtualbox, guest is Debian, host is Debian.
I mount the guest-additions like usual, go there and run it with
sh ./VBoxLinuxAdditions-x86.run
and it ends with and error:
Code:

Building the main  Guest Additions module ... fail.
Look at /var/log/vbox-addinstal.log to find out what went wrong.

As far i can tell that is the main error:
Code:

-D"KBUILD_MODNAME=KBUILD_STR(vboxguest)" -c -o /tmp/vbox.0/.tmp_VBoxGuest-linux.o /tmp/vbox.0/VBoxGuest-linux.c
In file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:34,
                from /tmp/vbox.0/VBoxGuest-linux.c:27:
/tmp/vbox.0/include/iprt/types.h:97:31: error: linux/autoconf.h: No such file or directory

I can recreate the error in with a different VirtualBox-installation
(guest Debian, kernel: 2.6.38-1-686)
I ain't got that problem with other kernels.

Code:

$ apt-cache policy virtualbox-ose
virtualbox-ose:
  Installed: 4.0.4-dfsg-1
  Candidate: 4.0.4-dfsg-1
  Version table:
 *** 4.0.4-dfsg-1 0
        500 http://ftp.de.debian.org/debian/ sid/main i386 Packages
        100 /var/lib/dpkg/status
$



The complete log-file:
Code:

make KBUILD_VERBOSE=1 -C /lib/modules/2.6.38-1-686/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
make -C /usr/src/linux-headers-2.6.38-1-686 \
        KBUILD_SRC=/usr/src/linux-headers-2.6.38-1-common \
        KBUILD_EXTMOD="/tmp/vbox.0" -f /usr/src/linux-headers-2.6.38-1-common/Makefile \
        modules
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \
        echo;                                                                \
        echo "  ERROR: Kernel configuration is invalid.";                \
        echo "        include/generated/autoconf.h or include/config/auto.conf are missing.";\
        echo "        Run 'make oldconfig && make prepare' on kernel src to fix it.";        \
        echo;                                                                \
        /bin/false)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f /usr/src/linux-headers-2.6.38-1-common/scripts/Makefile.build obj=/tmp/vbox.0
  gcc-4.4 -Wp,-MD,/tmp/vbox.0/.test.o.d  -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.4.5/include -I/usr/src/linux-headers-2.6.38-1-common/arch/x86/include -Iinclude  -I/usr/src/linux-headers-2.6.38-1-common/include -include include/generated/autoconf.h  -I/tmp/vbox.0 -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 -Os -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=1024 -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack  -I/lib/modules/2.6.38-1-686/build/include  -I/tmp/vbox.0/  -I/tmp/vbox.0/include  -I/tmp/vbox.0/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -D_X86_ -DIN_RT_R0 -DIN_SUP_R0 -DVBGL_VBOXGUEST -DVBGL_HGCM -DVBOX_WITH_HGCM  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(test)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxadd_test)" -c -o /tmp/vbox.0/.tmp_test.o /tmp/vbox.0/test.c
  ld -m elf_i386  -r -o /tmp/vbox.0/vboxadd_test.o /tmp/vbox.0/test.o
(cat /dev/null;  echo kernel//tmp/vbox.0/vboxadd_test.ko;) > /tmp/vbox.0/modules.order
make -f /usr/src/linux-headers-2.6.38-1-common/scripts/Makefile.modpost
  scripts/mod/modpost -m  -i /usr/src/linux-headers-2.6.38-1-686/Module.symvers -I /tmp/vbox.0/Module.symvers  -o /tmp/vbox.0/Module.symvers -S -w -c -s
  gcc-4.4 -Wp,-MD,/tmp/vbox.0/.vboxadd_test.mod.o.d  -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.4.5/include -I/usr/src/linux-headers-2.6.38-1-common/arch/x86/include -Iinclude  -I/usr/src/linux-headers-2.6.38-1-common/include -include include/generated/autoconf.h  -I/tmp/vbox.0 -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 -Os -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=1024 -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack  -I/lib/modules/2.6.38-1-686/build/include  -I/tmp/vbox.0/  -I/tmp/vbox.0/include  -I/tmp/vbox.0/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -D_X86_ -DIN_RT_R0 -DIN_SUP_R0 -DVBGL_VBOXGUEST -DVBGL_HGCM -DVBOX_WITH_HGCM  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(vboxadd_test.mod)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxadd_test)" -DMODULE  -c -o /tmp/vbox.0/vboxadd_test.mod.o /tmp/vbox.0/vboxadd_test.mod.c
  ld -r -m elf_i386 -T /usr/src/linux-headers-2.6.38-1-common/scripts/module-common.lds --build-id  -o /tmp/vbox.0/vboxadd_test.ko /tmp/vbox.0/vboxadd_test.o /tmp/vbox.0/vboxadd_test.mod.o
/tmp/vbox.0/Makefile.include.header:87: Ignoring unknown BUILD_TYPE value '_BUILDTYPE_'.
make KBUILD_VERBOSE=1 -C /lib/modules/2.6.38-1-686/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
make -C /usr/src/linux-headers-2.6.38-1-686 \
        KBUILD_SRC=/usr/src/linux-headers-2.6.38-1-common \
        KBUILD_EXTMOD="/tmp/vbox.0" -f /usr/src/linux-headers-2.6.38-1-common/Makefile \
        modules
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \
        echo;                                                                \
        echo "  ERROR: Kernel configuration is invalid.";                \
        echo "        include/generated/autoconf.h or include/config/auto.conf are missing.";\
        echo "        Run 'make oldconfig && make prepare' on kernel src to fix it.";        \
        echo;                                                                \
        /bin/false)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f /usr/src/linux-headers-2.6.38-1-common/scripts/Makefile.build obj=/tmp/vbox.0
/tmp/vbox.0/Makefile.include.header:93: Using BUILD_TYPE='release' from the environment.
  gcc-4.4 -Wp,-MD,/tmp/vbox.0/.test_drm.o.d  -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.4.5/include -I/usr/src/linux-headers-2.6.38-1-common/arch/x86/include -Iinclude  -I/usr/src/linux-headers-2.6.38-1-common/include -include include/generated/autoconf.h  -I/tmp/vbox.0 -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 -Os -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=1024 -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack  -I/lib/modules/2.6.38-1-686/build/include  -I/tmp/vbox.0/  -I/tmp/vbox.0/include  -I/tmp/vbox.0/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DVBGL_VBOXGUEST -DVBOX_WITH_HGCM -DLOG_TO_BACKDOOR -DRT_WITH_VBOX -DIN_MODULE -DIN_GUEST_R0 -DRT_ARCH_X86  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(test_drm)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxadd_test_drm)" -c -o /tmp/vbox.0/.tmp_test_drm.o /tmp/vbox.0/test_drm.c
  ld -m elf_i386  -r -o /tmp/vbox.0/vboxadd_test_drm.o /tmp/vbox.0/test_drm.o
(cat /dev/null;  echo kernel//tmp/vbox.0/vboxadd_test_drm.ko;) > /tmp/vbox.0/modules.order
make -f /usr/src/linux-headers-2.6.38-1-common/scripts/Makefile.modpost
/tmp/vbox.0/Makefile.include.header:93: Using BUILD_TYPE='release' from the environment.
  scripts/mod/modpost -m  -i /usr/src/linux-headers-2.6.38-1-686/Module.symvers -I /tmp/vbox.0/Module.symvers  -o /tmp/vbox.0/Module.symvers -S -w -c -s
  gcc-4.4 -Wp,-MD,/tmp/vbox.0/.vboxadd_test_drm.mod.o.d  -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.4.5/include -I/usr/src/linux-headers-2.6.38-1-common/arch/x86/include -Iinclude  -I/usr/src/linux-headers-2.6.38-1-common/include -include include/generated/autoconf.h  -I/tmp/vbox.0 -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 -Os -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=1024 -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack  -I/lib/modules/2.6.38-1-686/build/include  -I/tmp/vbox.0/  -I/tmp/vbox.0/include  -I/tmp/vbox.0/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DVBGL_VBOXGUEST -DVBOX_WITH_HGCM -DLOG_TO_BACKDOOR -DRT_WITH_VBOX -DIN_MODULE -DIN_GUEST_R0 -DRT_ARCH_X86  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(vboxadd_test_drm.mod)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxadd_test_drm)" -DMODULE  -c -o /tmp/vbox.0/vboxadd_test_drm.mod.o /tmp/vbox.0/vboxadd_test_drm.mod.c
  ld -r -m elf_i386 -T /usr/src/linux-headers-2.6.38-1-common/scripts/module-common.lds --build-id  -o /tmp/vbox.0/vboxadd_test_drm.ko /tmp/vbox.0/vboxadd_test_drm.o /tmp/vbox.0/vboxadd_test_drm.mod.o
make KBUILD_VERBOSE=1 -C /lib/modules/2.6.38-1-686/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
make -C /usr/src/linux-headers-2.6.38-1-686 \
        KBUILD_SRC=/usr/src/linux-headers-2.6.38-1-common \
        KBUILD_EXTMOD="/tmp/vbox.0" -f /usr/src/linux-headers-2.6.38-1-common/Makefile \
        modules
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \
        echo;                                                                \
        echo "  ERROR: Kernel configuration is invalid.";                \
        echo "        include/generated/autoconf.h or include/config/auto.conf are missing.";\
        echo "        Run 'make oldconfig && make prepare' on kernel src to fix it.";        \
        echo;                                                                \
        /bin/false)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f /usr/src/linux-headers-2.6.38-1-common/scripts/Makefile.build obj=/tmp/vbox.0
  gcc-4.4 -Wp,-MD,/tmp/vbox.0/.VBoxGuest-linux.o.d  -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.4.5/include -I/usr/src/linux-headers-2.6.38-1-common/arch/x86/include -Iinclude  -I/usr/src/linux-headers-2.6.38-1-common/include -include include/generated/autoconf.h  -I/tmp/vbox.0 -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 -Os -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=1024 -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack  -I/lib/modules/2.6.38-1-686/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_X86  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(VBoxGuest_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxguest)" -c -o /tmp/vbox.0/.tmp_VBoxGuest-linux.o /tmp/vbox.0/VBoxGuest-linux.c
In file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:34,
                from /tmp/vbox.0/VBoxGuest-linux.c:27:
/tmp/vbox.0/include/iprt/types.h:97:31: error: linux/autoconf.h: No such file or directory
make[4]: *** [/tmp/vbox.0/VBoxGuest-linux.o] Error 1
make[3]: *** [_module_/tmp/vbox.0] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make: *** [vboxguest] Error 2

Thanks

bathory 03-27-2011 12:39 PM

Hi,

You need to create a symlink:
Code:

ln -s /usr/src/linux-headers-2.6.38-1-686/include/generated/autoconf.h /usr/src/linux-headers-2.6.38-1-686/include/linux/
Regards

j1alu 03-27-2011 03:15 PM

Thanks.
You edited, i just wanted to say that its the headers-folder, but you changed it already.
Worked like a charme.

smithmatsiko 10-17-2011 12:15 PM

GuestAdditions on SUSE 11.4
 
With OpenSuse 11.4, life is too easy..VirtualBox Additions are already installed for you.
Simply Know this command:mount -t vboxsf [-o OPTIONS] sharename mountpoint

Procedure
Sharename: Devices>Shared Folder>[smith]
Mountpoint: /mnt/documents
Note create the folder: mkdir /mnt/documents

mount -t vboxsf smith /mnt/documents

Enjoy

DoComputing 03-23-2014 05:21 AM

another answer
 
anyone still having problems, this fixed it for me.
"sudo apt-get install build-essential module-assistant;"


http://virtualboxes.org/doc/installing-guest-additions-on-ubuntu/


All times are GMT -5. The time now is 06:56 PM.