Installing VirtualBox 1.6.0 for Solaris ======================================= A ready-made VirtualBox 1.6.0 installation package is available for OpenSolaris and Solaris 10 at VirtualBox.org. Download and install the package from VirtualBox.org to get VirtualBox running quickly. However, if you want to compile VirtualBox by yourself, then follow the instructions below. The instructions help you compile and install 32-bit version of VirtualBox 1.6.0 for Sun Solaris 10 u4. ** Prerequisites You will need the following tools to compile VirtualBox * GNU awk from Solaris Freeware3 Make sure that the tools are present and found in PATH. If necessary, add /usr/sfw/bin:/opt/sfw/bin to PATH and /usr/sfw/lib:/opt/sfw/lib to LD_LIBRARY_PATH so that the Freeware tools work. ** GNU C/C++ VirtualBox does not work correctly when compiled with gcc 3.4.3 from Sun Freeware. Instead, gcc 3.4.6 must be installed temporarily. (Note that gcc 3.4.3 shared libraries are still required at run-time.) Get gcc and configure wget ftp://ftp.gnu.org/gnu/gcc/gcc-3.4.6/gcc-3.4.6.tar.bz2 bunzip2 -c gcc-3.4.6.tar.bz2 | gtar xf - cd gcc-3.4.6/ mkdir obj cd obj ../configure --prefix=/tmp/build \ --with-as=`which gas` --enable-languages=c,c++ Compile (~15 min) time gmake Install gmake install PATH=/tmp/build/bin:$PATH cd ../.. Note that the compiler is installed to directory /tmp/build, which is removed automatically at boot. ** SDL Install SDL version 1.2.7 or higher wget http://www.libsdl.org/release/SDL-1.2.13.tar.gz gunzip -c SDL-1.2.13.tar.gz | tar xf - cd SDL-1.2.13/ ./configure --disable-shared --prefix=/tmp/build gmake install PKG_CONFIG_PATH=/tmp/build/lib/pkgconfig export PKG_CONFIG_PATH cd .. ** Qt Install Qt wget ftp://ftp.trolltech.com/qt/source/qt-x11-free-3.3.8.tar.bz2 bunzip2 -c qt-x11-free-3.3.8.tar.bz2 | tar xf - cd qt-x11-free-3.3.8 ./configure -v -platform solaris-g++ --prefix=/tmp/build -static \ -thread -stl -largefile -tablet -sm -disable-sql \ -qt-imgfmt-jpeg -qt-imgfmt-png -qt-imgfmt-mng -system-libjpeg \ -system-libpng -qt-libmng -system-zlib \ -L /tmp/build/lib -L /usr/X11R6/lib -L /usr/openwin/sfw/lib \ -I /tmp/build/include -I /usr/sfw/include -I /usr/openwin/share/include \ -I /usr/X11/include Accept license terms by typing yes. Compile and install separately (~30 min) time gmake gmake install cd .. ** VirtualBox Download VirtualBox 1.6 OSE source code from virtualbox.org and unpack the distribution umask 022 bunzip2 -c VirtualBox-1.6.0-OSE.tar.bz2 | gtar xf - cd VirtualBox-1.6.0_OSE Apply my patch for Solaris 10 wget http://softagalleria.net/download/virtualbox/virtualbox-1.6.diff gpatch -p 1 -i virtualbox-1.6.diff Configure bash ./configure --build-libxml2 --build-libxslt source env.sh SDK_LIBSDL_LIBS="SDL Xext Xrender X11" PATH_SDK_LIBSDL=/tmp/build/lib VBOX_XCURSOR_INCS=/tmp/build/include export SDK_LIBSDL_LIBS PATH_SDK_LIBSDL VBOX_XCURSOR_INCS Configure for Qt and dependent libraries QTDIR=/tmp/build LIB_QT="qt-mt Xrandr Xrender Xinerama Xft fontconfig freetype \ png jpeg z ICE SM Xi X11" export QTDIR LIB_QT Compile (~30 min) time kmk all Check the output once again and do not continue if you see any errors. VirtualBox installs a kernel module, and your system may crash or fail to boot if VirtualBox does not compile cleanly. ** Install Download guest additions wget -O out/solaris.x86/release/bin/VBoxGuestAdditions.iso \ http://virtualbox.org/download/1.6.0/VBoxGuestAdditions_1.6.0.iso Login as root, cd to the package directory and install the VirtualBox kernel module umask 022 cp out/solaris.x86/release/bin/vboxdrv /platform/i86pc/kernel/drv/ cp src/VBox/HostDrivers/Support/solaris/vboxdrv.conf \ /platform/i86pc/kernel/drv/ add_drv vboxdrv chmod a+rw /devices/pseudo/vboxdrv* ln -s /devices/pseudo/vboxdrv\@0:vboxdrv /dev/vboxdrv Install the run-time files as root ver=1.6.0 cd out/solaris.x86/release/bin mkdir -p /opt/virtualbox-$ver cp -r * /opt/virtualbox-$ver/ rm /opt/virtualbox-$ver/tst* /opt/virtualbox-$ver/testcase You should now be able to run VirtualBox as /opt/virtualbox-$ver/VirtualBox If VirtualBox works, you can remove the /tmp/build directory and sources as those are no longer needed. Uninstalling VirtualBox ======================= Use the instructions below to remove VirtualBox from your computer. If you are removing VirtualBox for the purpose of upgrading to a later version, be sure to shut down all virtual machines before uninstalling VirtualBox. You cannot pick up the guest operating system from a saved state once you install an newer version of VirtualBox. Instead, you will need to discard the saved state and this may have adverse effects to the guest operating system. If you do want to remove VirtualBox, then first remove the kernel module as root rem_drv vboxdrv rm /platform/i86pc/kernel/drv/vboxdrv* rm /dev/vboxdrv Remove program files as root ver=1.6.0 rm -fr /opt/virtualbox-$ver