-   Linux - Software (
-   -   Can't activate guestadditions in VirtualBox in Slackware (

jasonwryan 04-01-2009 03:04 AM

Can't activate guestadditions in VirtualBox in Slackware
Hi, I am relatively new to Linux but keen to learn.

I am running VirtualBox 2.1.4 on Ubuntu 8.10. I am trying to install guest additions in Slackware 12.2 but keep getting the following error:


Building a test kernel module...

make KBUILD_VERBOSE=1 -C /lib/modules/ SUBDIRS=/tmp/selfgz317613971/module/test SRCROOT=/tmp/selfgz317613971/module/test modules
test -e include/linux/autoconf.h -a -e include/config/auto.conf || (                \
        echo;                                                                \
        echo "  ERROR: Kernel configuration is invalid.";                \
        echo "        include/linux/autoconf.h or include/config/auto.conf are missing.";        \
        echo "        Run 'make oldconfig && make prepare' on kernel src to fix it.";        \
        echo;                                                                \
mkdir -p /tmp/selfgz317613971/module/test/.tmp_versions ; rm -f /tmp/selfgz317613971/module/test/.tmp_versions/*
make -f scripts/ obj=/tmp/selfgz317613971/module/test
  gcc -Wp,-MD,/tmp/selfgz317613971/module/test/.test.o.d  -nostdinc -isystem /usr/lib/gcc/i486-slackware-linux/4.2.4/include -D__KERNEL__ -Iinclude  -I/usr/src/linux- -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -ffreestanding -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iinclude/asm-x86/mach-default -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg -Wdeclaration-after-statement -Wno-pointer-sign -I/lib/modules/ -I/tmp/selfgz317613971/module/test/ -I/tmp/selfgz317613971/module/test/include -I/tmp/selfgz317613971/module/test/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/selfgz317613971/module/test/test.o /tmp/selfgz317613971/module/test/test.c
gcc: error trying to exec 'as': execvp: No such file or directory
make[2]: *** [/tmp/selfgz317613971/module/test/test.o] Error 2
make[1]: *** [_module_/tmp/selfgz317613971/module/test] Error 2
make: *** [vboxadd_test] Error 2

Building the test kernel module failed.
Giving up due to the problems mentioned above.

Any advice would be really appreciated at this point: Google has not been all that helpful (which is surprising in itself)...

Thanks in advance.

lugoteehalt 04-01-2009 06:07 AM

Hope I'm not breaking any rules by suggesting a post on virtualbox's forum.

Chris Stegman 04-01-2009 01:46 PM

First, I am extrapolating from other similar problems, so take this with a grain of salt.

The visible error is

gcc: error trying to exec 'as': execvp: No such file or directory

yet the gcc command

gcc -Wp,-MD,/tmp/selfgz317613971/module/test/.test.o.d -nostdinc -isystem /usr/lib/gcc/i486-slackware-linux/4.2.4/include -D__KERNEL__ -Iinclude -I/usr/src/linux- -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -ffreestanding -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iinclude/asm-x86/mach-default -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg -Wdeclaration-after-statement -Wno-pointer-sign -I/lib/modules/ -I/tmp/selfgz317613971/module/test/ -I/tmp/selfgz317613971/module/test/include -I/tmp/selfgz317613971/module/test/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/selfgz317613971/module/test/test.o /tmp/selfgz317613971/module/test/test.c

does not show a use of "as" as a command, nor is "as" an isolated parameter. So the question is where did the "as" come from?

I don't have the time to look up the exact option, but if I remember correctly gcc has an option to expand out the variables in the command line and print that out. Doing so should show you where the "as" came from and then you can work from there.

Chris Stegman 04-01-2009 02:15 PM

Like I said, take with a grain of salt.

Took a quick search for the gcc option to expand the variables and didn't see one, then thought that the shell, e.g. Bash, could be expanding the variables.

Not being a Bash expert, can someone tell him the command to show expand bash commands before they are executed or where they would be in a capture log.

While I am not sure of how to capture the expansion of the variables on Linux, being a Windows developer, the error is originating from the gcc command an until you get a look at the command being executed, not the command displayed on the screen, you will be blind to the problem.

All times are GMT -5. The time now is 08:45 AM.