Compiling and Patching Snowglobe (Linux)

From Second Life Wiki
Jump to navigation Jump to search

Snowglobe is where open development is most active right now. Follow these instructions to compile (and patch) Snowglobe sources on Linux using SVN.

Error creating thumbnail: Unable to save thumbnail to destination Note: This page is meant to be a quick, step-by-step, easy-to-mantain reference. See Compiling the viewer (Linux) for all the gory details and bleeding edge information about dependencies, libraries, standalone, errors, etc.

Step 0. Review BUILD.LINUX.md

There is a BUILD.LINUX.md markdown file in the active develop-linux branch (see Step 2) which will eventually become the primary documentation for building the SL viewer on Linux. In the meantime the instructions below may also be helpful.

Step 1. Install Requirements

  • Python 3.7+
  • Git
  • CMake 3.20+ (need to be able to handle --config option)
  • Native packages and tools (this list may be incomplete, please update as new dependencies are discovered):
 libfontconfig-dev libglib2.0-dev libglvnd-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libosmesa6-dev libvlc-dev libwayland-dev libx11-dev ninja-build python3-venv

Intermediate Check

Confirm things are installed properly so far by typing the following in a terminal:

cmake --version
python3 --version
git --version
autobuild --version

If everything reported sensible values and not "Command not found" errors, then you are in good shape!

Step 2. Checkout Code

Viewer

Open a terminal and checkout the viewer source code:

git clone https://github.com/secondlife/viewer.git

Until it is merged into the develop branch you need to checkout develop-linux:

cd viewer
git checkout develop-linux

Build Variables

See Building the Viewer with Autobuild#Select Build Variables

Step 3. Configure

Be sure you have the following environment variables set before continuing:

AUTOBUILD_ADDRSIZE=64
AUTOBUILD_VARIABLES_FILE=<path to autobuild viewer variables>

Configuring and building with autobuild works the same on all platforms. Full instructions may be found at Build_Viewer_With_Autobuild.

autobuild configure -c RelWithDebInfoOS

Step 4. Build

autobuild build

Running your newly built viewer

Step 5. Run

To launch the viewer you built, from your source tree root directory, run:

 build-linux-x86_64/newview/packaged/secondlife

Step 6. Optional

Running Unit Tests

TODO: provide instructions for running unit tests.

Optional: Installing Proprietary Libraries

Some builds of the the Viewer depends on proprietary libraries (alternative open source libraries are also provided for developers who prefer or are not licensed to use the proprietary libraries). Lindens do not distribute these libraries, so you will need to fetch and install these even if you download the libraries packages. (This is due to licensing restrictions. Don't ask, Lindens already did, and can't get permission. So you do have to get them yourself.)

TODO: provide instructions for building proprietary libraries.

Handling Problems

If you encounter errors or run into problems following the instructions above, please first check whether someone else already had the same issue. A solution might be known already.

You may find the solution in any of these resources:

Getting Help

Even when no description of your problem has been written down yet, someone might know about it, so get in touch with the community to get help.


Get last Snowglobe Trunk sources

Working with the Snowglobe 1.x code base:

svn co http://svn.secondlife.com/svn/linden/projects/2009/snowglobe/trunk


If you want to build the Snowglobe 2.x code base:

svn co http://svn.secondlife.com/svn/linden/projects/2010/snowglobe/trunk

Get current libraries and artwork

./trunk/scripts/public_fetch_tarballs.py

Prepare / configure (OLD)

cd trunk/indra/
./develop.py configure

Prepare / configure

cd trunk/indra/
cmake .

Patch

Learn how and where to apply a patch.

cd (...)/trunk/
patch -p1 < /path/to/your-patch.txt

Compile

cd indra/viewer-linux-i686-relwithdebinfo
make

After compilation you get (...)/linden/indra/viewer-linux-i686-relwithdebinfo/newview/Snowglobe-something.tar.bz2 — copy it somewhere, extract it and do as usual.

If some of the supplied prebuilt libraries are not compatible with your operating system (which you'll only discover after trying), then on future builds, abort the make after it's completed installing the prebuilts and starts listing compile percentages, remove the offending libraries from linden/libraries/i686-linux/lib_release_client/, run make clean, and finally rerun make to build without any more manual intervention.