|
|
Dependencies for Building QEMU on Solaris1) QEMU must be compiled by gcc-3.xBecause of specific GCC-isms in QEMU using the Dyngen code generator, it must be compiled with gcc-3.x. With the advent of "The Code Generator" (TCG), the dependency on gcc-3.x is lifted, and QEMU for specific targets (i386-softmmu, x86_64-softmmu, sparc-softmmu), gcc4 or the Studio Compilers should work (but have not been tested yet). Solaris 10FCS unpatched gcc in /usr/sfw/bin fails, but patched versions and Solaris 10U3 and later (ie 11) build QEMU correctly, as well as blastwave's gcc-3.4.5 for 32-bit. Currently, only gcc-3.4.3 from /usr/sfw/bin can build 64-bit binaries on amd64/x86-64 systems. Blastwave has no suitable replacement currently. See the gcc-failures page for compilers which are not recommended. The separate kqemu module is configured to use the gcc-3.4.3 from /usr/sfw/bin due to Blastwave's gcc-3.4.5 x86 package inability to compile 64-bit. 2) libSDL (www.libsdl.org) is a graphics libraryQEMU uses libSDL to do the rendering of the graphics screeens used in the GUI's such as Windows, Solaris JDS, and other graphical interfaces. While QEMU does not require libSDL, the functionality of QEMU without libSDL is pretty limited, and basically allows access via standard terminals, such as text consoles. Update: Solaris Nevada Build 63 and later have libSDL included so if you are on nevada, you can skip this portion unless you want to be running the very latest bits.If you're on Solaris 10, or Solaris Nevada, pre-Build 63, libSDL for 32-bit Sparc/x86 can be downloaded from Blastwave. For a 64-bit AMD64 Solaris 10 or Solaris Nevada, pre-Build 63 system, you will likely need to build your own version. Specifics on how to build libSDL-1.2.12 on x86_64 are shown below. libSDL 1.2.12 was released in July, and contains the fixes for how sdl-config emits the —libs parameters for Solaris. Assuming you build libSDL from the libSDL-1.2.12 tarball in the download section for 32-bit, you'll configure it the following way, assuming for the example that it will be put in /opt/local, with sdl-config being in /opt/local/bin and the 32-bit libraries being in /opt/local/lib (choose a prefix of your own liking). env CC="gcc" PATH=/usr/sfw/bin:${PATH} CFLAGS=-DNOSDLGLEXT ./configure —disable-joystick —enable-threads —x-includes=/usr/X11R6/include —prefix=/opt/local —disable-dga and complete the build and install of the 32-bit libSDL. To build the 64-bit version of libSDL, start with a clean libSDL tree, and configure the following. Note the additional flags for —bindir, and —libdir, which will layer on top of the newly installed 32-bit libSDL. Additionally, for 64-bit libSDL, we disable nasm, which has some custom 32-bit assembler which will not build, and is handled by the 64-bit instruction set. env CC="gcc -m64 -R/usr/sfw/lib/64" PATH=/usr/sfw/bin:${PATH} CFLAGS="-DNOSDLGLEXT -Darch64' ./configure —disable-joystick —enable-threads —x-includes=/usr/X11R6/include —disable-nasm —prefix=/opt/local —bindir=/opt/local/bin/amd64 —libdir=/opt/local/lib/amd64 —disable-dga When building a 64-bit version of qemu, you'll need to make sure that /opt/local/bin/amd64 appears in your PATH before /opt/local/bin. 3) tuntap (http://www.whiteboard.ne.jp/~admin2/tuntap)This is an extension of the existing tun code available from http://vtun.sourceforge.net/tun or Blastwave's CSWtun. If you have one of these existing packages installed, you'll need to remove that package, and compile and install the tun/tap module, as well as the bridge module located on that site. While QEMU does not require tun/tap, the functionality of QEMU without tun/tap is limited to the slirp firewall as part of the QEMU VM, and access to the QEMU guest requires "-redir tcp:port::local_port" parameters. The TAP functionality added to the current TUN module allows two features to be used in QEMU. a) TAP – this allows a full connection to happen between the QEMU guest and the QEMU host. This is typically a private network between the QEMU host and guest. b) BRIDGE – this allows a full connection to happen between the QEMU guest and the network that the interface the TAP is bridged to. In this example, a QEMU guest using a bridge interface can actually DHCP an address from the network the TAP is bridged to, as long as the interface the TAP is connected to is not a WIFI interface. The bridge interface can also be assigned an address in the network space used by the primary interface if DHCP is not providing addresses. The downside to this configuration is that the guest can't access the host. However, if you need access to both the network and the QEMU host, you can use a second interface with just a TAP, or the standard QEMU networking (-net user -net nic). The bridge software available from http://www.whiteboard.ne.jp/~admin2/tuntap appears to only support one bridged interface at a time. 4) gnutls – The GNU Transport Layer Security LibraryThis is part of Solaris 10 and 11, but Solaris 9 and 8 do not have these libraries. pkg-get -i gnutls brings down opencdk, libpgp and libpgp_error, as well as zlib. or build it yourself. This is required for the improved security model for the vnc server that QEMU can use. 5) zlib – compression libraryThis is provided as part of Solaris, and is also available in the package archive at www.blastwave.org 6) pkg-config – pkg-config is a helper tool used when compiling applications and libraries.This is part of Solaris 10 and 11, but Solaris 9 and 8 do not have these libraries. pkg-get -i pkgconfig or build it yourself This is required for getting compiler and linker flags out of gnutls and other libraries for QEMU to compile with it correctly. |