0

I'd like to be able to use a specific version of gcc to build VirtualBox 5.0.16 guest additions inside an Ubuntu 14.04 guest in order to avoid errors. VBoxLinuxAdditions.run --help doesn't give any information nor do the build instructions.

I'm getting guest addition binaries from the built-in function Insert Guest Additions CD image menu item which mounts the ISO automatically inside Ubuntu.

0

1 Answer 1

1

A further examination of the source reveals they use automake, you can set the compiler using environment variables that the Makefile will use to compile the source.

The location source is obfuscated. To find the full source you need to find the tar file appended to the end of the VBoxLinuxAdditions.run shell script and unpack it, it contains two tar files which contain the source. (VBoxGuestAdditions-x86.tar.bz2 and ./VBoxGuestAdditions-amd64.tar.bz2) This is the code which will be compiled on the guest. The shell script needs to be modified slightly for it to dump its files.

Once you have the source tar unpack the one you need and using make CC=<path to required gcc> you should be able to specify the compiler you want the build to use.

Some influential environment variables:
   CC          C compiler command
   CFLAGS      C compiler flags
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
   LIBS        libraries to pass to the linker, e.g. -l<library>
   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
   LT_SYS_LIBRARY_PATH
              User-defined run-time library search path.
   CPP         C preprocessor
   CXX         C++ compiler command
   CXXFLAGS    C++ compiler flags
   CXXCPP      C++ preprocessor
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .