Second Life client lives on Solaris x86

Back in the beginning of April I was tasked to get a Second Life (SL) client running under Solaris. Luckily, Siva had done some preliminary work so I thought all I had to do was pull the source and start a compile, right? NOT! Second Life is not a trivial build. One problem I ran up against is that Open Second Life does not stay up to date with the source available from Linden Labs(LL) and earlier this month LL decided they need to ensure clients were current so they imposed a new serial number check during authentication. Hence, I was forced to pull a copy of the latest client source from the SecondLife wiki page and merge in the changes required to support Solaris. Since then, I also added a bunch of my own changes to better support Solaris.

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.
  • xmlrpc-epi 0.51
    configure --prefix=/opt/opensl
    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 queue to 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
  • ElfIO 1.0.3
    ./configure --prefix=/opt/opensl
    The make does not build a shared library and LL recommend doing so (I didn't.)
  • openjpeg 1.1.1
    ./configure --prefix=/opt/opensl
    LL wiki page recommended patches for openjpeg but the latest source includes these changes.
  • expat 2.0.0
  • curl 7.16.1
    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 \\
    BUILD=releasefordownload

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
Comments:

Since this is quite involved can you make a binary available somewhere (assuming the license allows you to do so) and post to games-discuss at opensolaris dot org this blog entry and the pointer to the binary. Thanks.

Posted by Darren Moffat on May 02, 2007 at 12:22 AM EDT #

You know, that makes me want to use solaris!!! I think I will...

Posted by Joe L on September 12, 2008 at 01:16 PM EDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Don't ya just love toys and taking them apart to see how they work? To me it doesn't matter if it's an iPod, a laptop, or the biggest baddest thing a company makes. And nothing makes me more happy than showing how easy it is to develop stuff on Oracle Solaris.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today