= Solaris build instructions = The Solaris port of VirtualBox is work in progress and so is this page. The current page is just an edited version of the GNU/Linux one. == Prerequisites == You need: * '''Solaris Nevada build 70''' and '''Solaris Developer Express 07/09''' are the oldest versions VirtualBox can be expected to build on. Build 75 or later is strongly recommended. * '''GCC 3.4.3+'''. It will probably work with 3.4.6 or even 4.x.y, but 3.4.3 is the one we've tried and which problems we have worked around. * '''as86'''. This ships with Solaris and the VirtualBox source tree. [[br]] The source: http://homepage.ntlworld.com/robert.debath/dev86/ * '''bcc''' (Bruce Evans C Compiler). This ships with Solaris and the VirtualBox source tree. [[br]] The source: http://homepage.ntlworld.com/robert.debath/dev86/ * '''IASL''' (Intel ACPI compiler). This is currently included in the VirtualBox source tree. [[br]] The source: http://www.intel.com/technology/iapc/acpi/downloads.htm * '''xsltproc''' (libxslt, XML style sheet processor). This ships with Solaris. [[br]] The source: http://xmlsoft.org/XSLT/downloads.html * '''libIDL'''. This ships with Solaris. [[br]] The source: http://ftp.gnome.org/pub/gnome/sources/libIDL/ * '''libSDL 1.2.x'''. This ships with Solaris. [[br]] The source: http://libsdl.org/download-1.2.php * '''libXcursor''' (required to support color mouse pointers in guest). Included with Solaris starting with build 74. For earlier builds, you'll have to built it yourself. [[br]] The source: http://ftp.x.org/pub/individual/lib/libXcursor-1.1.9.tar.bz2 * '''YASM 0.6.3+ or revision 2004+'''. This is currently included in the VirtualBox source tree. [[br]] The source: http://www.tortall.net/projects/yasm/wiki/Download * '''libxerces''' (only VBox version < 1.6, Xerces XML parser; the C++, not the Java version). You'll probably have to build this yourself or see check ^1^. [[br]] The source: http://xerces.apache.org/xerces-c/download.cgi * '''libxalan''' (only VBox version < 1.6, Xalan XSL library, depends on Xerces; again, the C++, not the Java version). You'll probably have to build this yourself or see check ^1^. [[br]] The source: http://xml.apache.org/xalan-c/download.html * '''libxml2''' (only VBox version >= 1.6, XML file handling) * ''' libxslt1''' (only VBox version >= 1.6, XML file transformation) * '''Qt 3.3.x''' (with x >= 5 if possible; only for VBox version <= 2.2.0). You'll have to build this yourself. [[br]] The source: ftp://ftp.trolltech.com/qt/source/qt-x11-free-3.3.8.tar.bz2 [[br]] [[br]] Make sure '''QTDIR''' environment variable is pointing to the Qt installation and that the shared libraries can be found. [[br]] Configure example (not the {{{-I}}} options for odd include locations): {{{ ./configure -v -platform solaris-g++-64 -thread -shared -stl -largefile -tablet -sm -disable-sql \ -qt-imgfmt-jpeg -qt-imgfmt-png -qt-imgfmt-mng -qt-libjpeg -qt-libpng -qt-libmng -qt-zlib \ -prefix /opt/vboxose-qt \ -I/usr/include \ -I/usr/X11/include \ -I/usr/X11/share/include \ -I/usr/sfw/include }}} * '''Qt 4.x.y''' (with x >= 4 if possible) * Doxygen 1.4.0+ - optional. [[br]] http://www.sunfreeware.com/programlistintel10.html#doxygen * !TeTex 3.0+ - internal only^2^. [[br]] http://www.sunfreeware.com/programlistintel10.html#tetex * Wget 1.10+ - internal only^2^. Included with Solaris starting with build 76. [[br]] http://www.sunfreeware.com/programlistintel10.html#wget * The '''PATH''' has to include the following directories: * {{{/usr/sfw/bin}}} - for gcc and related tools. * {{{/usr/ccs/bin}}} - for ar and other tools. * {{{/usr/local/teTeX/bin/i386-pc-solaris2.10}}} - !TeTex, internal only^2^. * The '''LD_LIBRARY_PATH''' has to include the following directories: * {{{/usr/sfw/lib}}} - for gcc and related tools. * {{{/usr/ccs/lib}}} - for ar and other tools. ^1^ The '''xerces''' and '''xalan''' sources we use together with the appropriate kBuild makefiles can be found here: [[br]] http://virtualbox.org/download/testcase/xerces-and-xalan-vbox-src.tar.bz2 [[br]] Untar them into the VirtualBox trunk directory and add {{{--build-xalan}}} as argument to {{{configure}}} whenever running it. ^2^ Items marked "internal only" is intended for VirtualBox team members only. == Building !VirtualBox == 1. Change to the root directory of the sources and execute the configure script: `./configure --disable-hardening`. 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.sh`. 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). 2. Whenever you want to build !VirtualBox, you have to open a shell and source the generated environment setup script 'env.sh', i.e. do {{{ source ./env.sh }}} 3. To build a release package, type `kmk all`. This produces the required binaries in `out/solaris.x86/release/bin/`. (If you want to build a debug version, type `kmk BUILD_TYPE=debug`.) In case you have more than one CPU core, you could take advantage of our parallel build system by supplying `-j3` (number of cores + 1) as an option to kmk. == Running your build == You can run !VirtualBox directly from the build target directory (`out/solaris.x86/release/bin/`). But first of all, you must install the !VirtualBox kernel module. There is a script {{{src/VBox/HostDrivers/Support/solaris/mod.sh}}} which does this for you. It requires you to either install sudo or run it as root. Or, you can do the following: {{{ cd out/solaris.amd64/release/bin }}} You will need to copy the driver file and .conf file if any into the appropriate locations. Current drivers include vboxflt (bridged networking, host-only networking), vboxnet (host-only networking), vboxusbmon, vboxusb (USB drivers). {{{ /platform/i86pc/kernel/drv/ (32-bit drivers and .conf files) /platform/i86pc/kernel/drv/amd64 (64-bit drivers) }}} And then run as root/sudo: {{{ vboxconfig.sh --setupdrivers }}} The config script only loads drivers that are found in the appropriate locations (don't forget to copy the ".conf" files). Finally, you can start one of the frontends, e.g. {{{ ./VirtualBox }}}