Second Life on Solaris - Building 1.18.3.5

It has been a while since my last post concerning Second Life and since Linden Labs just released the source for version 1.18.3.5 of the viewer, I thought it best to post an update with the patches that will allow you to build it.

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 previous blogs 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 configure and make/gmake as 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], [199309], [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:

    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 $LINDEN.

  • Download the Art Work for the same version you are building. For 1.18.3.5 the art work is here.

    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-1.18.3.5.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 here.

    cd $LINDEN/indra
    gzcat sl-1.18.3.5-solaris_crash_logger.tar.gz | tar xf -

  • Download the solaris_tools from here.

    cd $LINDEN/indra/newview
    gzcat sl-1.18.3.5-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.

    cd $LINDEN/indra
    gzcat sl-1.18.3.5-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: cd $LINDEN/indra

    gzcat llaudio-openal-files.tar.gz | tar xf -

  • Download the file featuretable_solaris.txt 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.1.18.3.5-broke Download 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 /opt/secondlife/bin/secondlife

Gotchas

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.

Comments:

I tried compiling it before and it almost made me kill myself. The builds then worked fine. What's stupid is that there are some closed source components of which there are no Solaris versions of. Notably the voice chat stuff, which is used quite a bit in some places.

Since I don't have the patience with their build system, I've currently gone to running the Linux client under BrandZ with DISPLAY, and it works quite nice.

Posted by Tom Servo on October 09, 2007 at 12:18 AM 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