Second Life on Solaris - Building 22.214.171.124
By Danaf-Oracle on Oct 03, 2007
First I'm happy to report that Linden Labs has started merging my changes into the official source so the work required to patch and build the viewer is becoming minimal.
Second, I'm sorry to report that I've put the SPARC port on hold. There are challenges with the GL library that need to be worked out and since much of this effort is on my own time, I have not been able to take a deep enough dive to address them.
Third, because of the number of libraries required and various licensing issues, Sun's attorney's have asked me not to distribute my builds outside Sun. But don't fear, I'm sure some brave soul will read this blog and will post a package for general availability.
Building the Viewer
If you want to create your own Solaris x86 build, here are the steps:
This is probably the hardest part of the entire process.
Build all the libraries as instructed in my
except for openjpeg and OpenAL (see the next items).
Because of performance improvements being made to openjpeg, you want to be sure to
pull a copy of latest source using svn:
svn co http://www.openjpeg.org/svn/trunk
As of this writing, there was a small glitch with building openjpeg on Solaris, To fix it apply this patch then run
make/gmakeas usual. If you try to build openjpeg and it builds fine without the patch, be aware that the Second Life build may fail due to a missing posix_memalign() call. The patch above corrects this.
Build OpenAL for audio support. Yup, thanks to Callum Lerwick and his
OpenAL Support Patch we now have full audio support in the viewer.
There is one issue. To build OpenAL on Solaris, you need to fix configure.ac to use the proper POSIX C setting by either changing the line below from 199309 to 200112L or removing it altogether:
AC_DEFINE([_POSIX_C_SOURCE], , [Define to the POSIX version that should be used.])
Thanks to Henry Jen for helping me figure out what was needed.
Download a copy of the source. You can do this two ways:
- From the web on the Second Life Source Archive or
svn co http://svn.secondlife.com/svn/linden/branches/Branch_1-18-3-Viewer
If you've downloaded the source as a tar file, unpack it before you proceed.
Create a symbolic link from the source archive to a link called linden. For example, if you downloaded the svn version of the source:
ln -s Branch_1-18-3-Viewer linden
From now on the path to this "linden" directory will be referred to as
Download the Art Work for the same version you are building. For 126.96.36.199 the art work is
Unzip the Artwork from the directory $LINDEN/.. (Hint, that's one drectory above the linden directory.) Hence, the artwork assumes it is dumping into a directory named "linden".
cd $LINDEN/.. unzip slviewer-artwork-RC-188.8.131.52.zip
Create the directory $LINDEN/libraries/i686-sunos5 and then copy
the include and shared versions of the libraries from your libraries builds into $LINDEN/libraries/i686-sunos5/include and $LINDEN/libraries/i686-sunos5/lib_release_client.
Download the solaris_crash_logger for SL from
gzcat sl-184.108.40.206-solaris_crash_logger.tar.gz | tar xf -
Download the solaris_tools from
gzcat sl-220.127.116.11-solaris_tools.tar.gz | tar xf -
Run $LINDEN/indra/newview/solaris_tools/make_include_links to create links for the includes hidden in various directories on Solaris - don't worry, the only links it creates are under $LINDEN/libraries/i686-sunos5/include.
Now for the fun part... Patching the viewer source.
Download the patches from here.
gzcat sl-18.104.22.168-solaris_patches.tar.gz | tar xf -
Each patch is it's own file. You can step through them one by one or install them all at once. I'll let you dream up an incantation to your liking. Just be aware that they normally install cleanly if you apply them from within $LINDEN/indra. I normally do something like the following in ksh:
cd $LINDEN/indra for file in solaris_patches/llaudio do print "patching $file" patch -u -p0 < $file print "continue? \\c" read kick; done
As you can tell, I do each set of patches (llaudio, llcommon, etc.) separately so I can watch for errors and correct as I go. It should take you between 15 and 30 minutes to apply all the patches..
Because there are some new files introduced for OpenAL support, the patches may be a bear to apply since they create new files. To make your life easier, an archive of these files is available here.
Expand it using:
gzcat llaudio-openal-files.tar.gz | tar xf -
Download the file
and place it in $LINDEN/indra/newview (yes I could have added a patch for this, so shoot me).
cd $LINDEN/indra mv SConstruct SConstruct.22.214.171.124-brokeDownload a copy of a SConstruct that works from here and place it in $LINDEN/indra.
NOTE: if there's a Python expert out there who can get the newer SConstruct working, please send me a note with your changes. Of course you'll have to merge the changes necessary to get a clean Solaris build (see the SConstruct above for details.)
Install SCons, see my previous blogs for the details.
Build the package using SCons using one of the commands below.
Be sure to adjust the -j option to match
the number of cpus on your system.
On Solaris 10 use:
scons -j 4 DISTCC=no BTARGET=client BUILD=releasefordownload ARCH=i686 \\ STANDALONE=yes GSTREAMER=no
On OpenSolaris or Solaris Nevada use:
scons -j 4 DISTCC=no BTARGET=client BUILD=releasefordownload ARCH=i686 \\ GSTREAMER=no
If the build is successful, a package in both pkg stream and directory form will reside in $LINDEN/indra/newview/pkg-i386.
To install this package, simply run:
pkgadd -d $LINDEN/indra/newview/pkg-i386 secondlife
To run the client, execute
You may run into some snags during the build. These will likely have to do with updated libraries not specified correctly in the manifest ($LINDEN/indra/newview/solaris_tools/client-manifest-i686). The format for this file should be fairly straight forward. Just make the necessary changes and rerun
scons. And of course, feel free to
shoot me an email
if you run into problem(s). If you are hitting something I'll bet I've hit it already.
If you are looking for me in-world, I'm Whoops Babii.