Second Life client lives on Solaris x86
By Danaf-Oracle on Apr 30, 2007
Before I get into the discussion of how the build went, I should point out that Linden Labs has a detailed discussion of how to build their client on Linux at their Wiki site that one should read carefully before even attempting to do their own SL client build.
Let's first discuss the build environment. The Second Life source is supplied in two pieces: the source itself and the art work. One needs to download both and then inflate them on top of each other. Next, the build does not use make. It uses SCons which is a Python-based script that does essentially what make does. Instead of a Makefile one has to maintain a SConstruct file. It's a fairly easy environment to get used to and like makefiles, one has to be VERY careful about indentation. In the Second Life client, the SConstruct file is in linden/indra.
As discussed in the
Wiki build notes, There are several third party libraries required to build the client. I built these using
--prefix=/opt/opensl so that they all got placed in a directory that I could control and so that I knew these libraries would not conflict with anything in /usr/local or the other "freeware" delivered with Solaris in either /usr, /usr/sfw, or /opt/sfw . Here's the notes I took while working with each library:
- curl - you need 7.16.x (SFWcurl from the Companion CD delivers 7.10.3)
boost - a C++ library, it's huge
configure --with-python=/usr/sfw/bin/python --prefix=/opt/opensl
- Apache2 (for apr, aprutil) - I just built Apache2 from the source and copied the libraries I needed.
You also need to use gmake.
IMPORTANT:xmlrpc-epi uses an internal data structure called "queue". Unfortunately that structure conflicts with the Solaris STREAM queue so I changed xmlrpc-epi's
XMLRPCqueue. You won't notice the conflict until you start compiling the SL client.
- libjpeg - I used the one bundled with Solaris, see /usr/lib/libjpeg\*
Vorbis 1.1.2 & Ogg 1.1.3, (SFWvorb is version 1.0 which is too old but SFWoggl looked fine.)
configure --with-ogg=/opt/opensl --prefix=/opt/opensl
The make does not build a shared library and LL recommend doing so (I didn't.)
LL wiki page recommended patches for openjpeg but the latest source includes these changes.
- expat 2.0.0
configure -- with-ssl=/usr/sfw --prefix=/opt/opensl
- SDL 1.2.11 (SFWsdl = 1.2.5 which is too old.)
bison 2.3 (SUNWbison is too old.)
This one I built and installed in /usr/local/bin and I made sure the SConstruct file used this version.
Once I got everything built, I copied the necessary includes and libs into linden/libraries/"platform" where platform is either i686-sunos5 or sparc-sunos5. (I need to note that I've only just started a SPARC build. More on it in a future blog.)
the SCons command line I used was:
TEMP_BUILD_DIR="/tmp/danaf/secondlife-build" scons DISTCC=no BTARGET=client \\
When ready to create a "releasable" a copy, the SConstruct uses a packaging script called package_client.sh inside a tools directory under
linden/indra/newview. Of course in my case this meant having to create a
solaris_tools directory and the files/scripts associated with it. I used the Linux equivalents as a reference and quickly decided that it would be better to create a packaging script that created a Solaris pkg instead of the Linux tarball approach. I also decided to hide the client executable in a separate exec directory so that all people will find in the bin are things that can run as is.
Some folks at Linden Labs have said that they'd be happy to work my changes back into their source tree so I'll be sending them "patches" in a day or so.
Lastly, and as proof, here's a couple images off my Ultra-40. The first is the good ol' SecondLife login screen and the second was taken from within the Sun Pavillion.
|Second Life Login Screen|
|Inside the Sun Pavilion @ Second Life|