VirtualBox

Version 3 (modified by jose, 17 years ago) ( diff )

--

Linux build instructions

While we try to not favor any distribution, we only build with certain distributions. This includes Debian, Ubuntu, Gentoo and Red Hat Enterprise Linux. Things should not be much different for other distributions though. If you want to supply specific build instructions (especially package names) for other distributions, please contact InnoTek.

Prerequisites

You need:

  • GCC 3.2.3 or later
  • as86 (real mode assembler, sometimes part of the dev86 package; on Gentoo, part of sys-devel/bin86)
  • bcc (Bruce Evans C Compiler; on Gentoo, part of sys-devel/dev86)
  • IASL (Intel ACPI compiler)
  • xsltproc (libxslt, XML style sheet processor)
  • libxerces (Xerces XML parser; the C++, not the Java version)
  • libxalan (Xalan XSL library, depends on Xerces; again, the C++, not the Java version)
  • libXcursor (required to support color mouse pointers in guest)
  • Qt 3.3.x (with x >= 5 if possible)
  • libIDL
  • libSDL

On Debian-based systems, the following command should install the required packages:

apt-get install bcc iasl xsltproc xalan libxalan110-dev uuid-dev zlib1g-dev \
                libidl-dev libsdl1.2-dev libxcursor-dev libqt3-headers

On Gentoo, the following should do:

emerge -av sys-devel/bin86 sys-devel/dev86 sys-power/iasl libxslt xerces-c \
           xalan-c libXcursor =qt-3* libIDL libsdl

Note that VirtualBox makes use of YASM as its assembler which is part of the source repository as the currently available releases of YASM contain various bugs. As soon as a working release becomes officially available, we will add YASM to the list of prerequisites.

If you use GCC 4.x for building VirtualBox, the build system will use precompiled objects for the recompiler as compiling this module currently only works with GCC 3.x.

Building VirtualBox

  1. Change to the root directory of the sources and execute the configure script: ./configure. If it finds everything it needs, it will create a file called 'AutoConfig.kmk' containing paths to the various tools on your system. Also, it will create an environment setup script called env. This step only has to be done once (if something changes in your build tool setup, you might have to repeat it but keep in mind that both output files will be overwritten).
  1. Whenever you want to build VirtualBox, you have to open a shell and source the generated environment setup script 'env', i.e. do
    source ./env
    
  1. To build a release package, type kmk all. This produces the required binaries in out/linux.x86/release/bin/. (If you want to build a debug version, type kmk BUILD_TYPE=debug.)

Running your build

You can run VirtualBox directly from the build target directory (out/linux.x86/release/bin/). But first of all, you must build and install the VirtualBox kernel module, whose sources will have been copied to the build target directory.

So, issue the following:

cd out/linux.x86/release/bin/src
make
sudo make install
cd ..

Then it should have been installed to your modules directory and you can load it using modprobe vboxdrv. Next you should start the VirtualBox XPCOM daemon using

LD_LIBRARY_PATH=. ./VBoxSVC&

Finally, you can start one of the frontends, e.g.

LD_LIBRARY_PATH=. ./VirtualBox

Note that the LD_LIBRARY_PATH=. is required because we have to find our .so files and the output directory is not in the system's library path.

Note: See TracWiki for help on using the wiki.

© 2023 Oracle
ContactPrivacy policyTerms of Use