Voodooalert+x264 Logo
US+UK Flagge DE+AT Flagge
Change language:
 

x264 benchmark compilation & installation guide for Oracle Solaris 11.2 (2014-11-28)

Oracle Solaris Logo

System prerequisites

To compile and install the x264 benchmark on Oracle Solaris 11.2 we will need some GNU base software. Additionally I would recommend the installation of a graphical user interface, if not yet existing. This is not absolutely required, but will make things easier. On top of that we need to ensure that the machine has internet access, and then we need to run the following commands as user root. The first one is only required if you still need to or wish to install a graphical user interface, a process after which you should by the way also reboot.


To further simplify the compilation process, I'd suggest to add the path /usr/local/bin to your search path, which is not the default on Oracle Solaris 11.2. Reason is, that our software will be installed into the prefix /usr/local. The search path can be updated temporarily or permanently. The temporary solution (first command) only applies until you log out or close the terminal window. For the permanent one (second command) you will also need to log out / close the terminal once after applying the change, after which it will always apply. The permanent setting is also user specific, so if you want to be able to use it as root or as any other user too, you will need to run the command as each user separately:

Yasm on x86 machines

This step is only required on machines using processors with a x86 architecture. If installing on a SPARC machine, yasm may be skipped as the assembler builds highly optimized code only for instruction set extensions like Intel SSE/2/3/4 or AMD LZCNT.

To assemble highly optimized x86 code, we'll compile the yasm assembler ourselves, but you'll need to download it first:

Unpack the archive file by running tar -xzvf ./yasm-1.3.0.tar.gz, and enter the newly created yasm folder. Since yasm is well prepared for Solaris, we can just start configuring and building, this is a relatively simple process:

yasm should now be locatable and executable on your system (verify by running yasm --version), so we can continue with libav and x264.

The benchmark software itself

To use x264 we need the decoding filters of libavcodec (libav in short) and the x264 encoder itself, which will be linked against libav during the installation. Additionally, we need the input video file, download links are available at the bottom of the [results list].

For simplicities' sake we shall assume that the files are now sitting in /export/home/user/x264src. Additionally we will assume that the yasm assembler is present and locatable. Switch to that directory on the terminal, and start with libav. Unpack it by running something like tar -xzvf <filename.tgz> on the actual file name, after which there will be a libav folder. Enter that folder, and set some environment variables that we will need through the entire remaining process. Should you need to log out or close the terminal window, you need to set those again!

Now start the configuration process for the libav source tree as follows (The opus codec of modern libav is broken on several UNIX systems including Solaris, so we'll disable it):

Following that we need to edit the make file to prevent the system from invoking the wrong installer. Open the Makefile with your preferred text editor and look for the following block:

ifdef AVPROGS
install: install-progs install-data
endif

Add the following line exactly before that block, then save the file:

INSTALL="/usr/bin/ginstall"

Now we can compule and install the libav suite:

Now libav is installed, and we can handle the last part, x264 itself. Before starting, you should once again ensure that your CFLAGS, CXXFLAGS and LDFLAGS environment variables are still set by executing export. Then, unpack x264 like this: tar -xjvf last_x264.tar.bzw. After that, enter the newly created x264 folder, and open the script configure inside with your favorite text editor. Then look for the following block:

sunos*|solaris*)
  SYS="SunOS"
  define HAVE_MALLOC_H
  libm="-lm"
  if cc_check "" /usr/lib/64/values-xpg6.o; then
    LDFLAGS="$LDFLAGS /usr/lib/64/values-xpg6.o"
  else
    LDFLAGS="$LDFLAGS /usr/lib/values-xpg6.o"
  fi
  if test -x /usr/ucb/install ; then
    INSTALL=/usr/ucb/install
  elif test -x /usr/bin/ginstall ; then
    # OpenSolaris
    INSTALL=/usr/bin/ginstall
  elif test -x /usr/gnu/bin/install ; then
    # OpenSolaris
    INSTALL=/usr/gnu/bin/install
  fi
  HAVE_GETOPT_LONG=0
  ;;

Replace the entire block with the following:

sunos*|solaris*)
  SYS="SunOS"
  define HAVE_MALLOC_H
  LDFLAGS="$LDFLAGS -lm -lxnet -lresolv /usr/lib/values-xpg6.o"
  INSTALL=/usr/bin/ginstall
  HAVE_GETOPT_LONG=0
  ;;

Now we can run the configuration by calling configure like this:

Assuming all went well we can compile x264:

Now, if all worked out nicely, you may verify the functionality of x264 by running x264 --version. Should that work and should x264 show up as being linked against libswscale and libavformat, all is ok. Now you can download the benchmark script for UNIX:

Copy that file launchbenchmark.sh into a folder dedicated to the benchmark, create one in case you haven't already: mkdir -p /export/home/user/x264benchmark. You should also put the input video file elephantsdream_source.264 into that folder.
You you can essentially just run the benchmark. To do that, enter the following command while sitting in your benchmark folder, e.g. /export/home/user/x264benchmark after having made sure that the benchmark script inside is executable (chmod +x ./launchbenchmark.sh):

That could look somewhat like this (click to enlarge). The result can be read from the terminal after the benchmark is done, the important value here is the one that will be shown besides the string "Real":

Oracle Solaris 11.2 Screenshot

Depending on the host machine that might take some hours, in extreme cases even days, weeks or months. If you have problems with this guide or if there are any additional questions about the x264 benchmark on Oracle Solaris 11.2, please refer to the [according forum thread] and ask there. The forum is german, but if you ask in english, you will still get a reply, at least by me. :)

[Back to the x264 benchmark results list]

[Comment on this guide]