Build the Viewer on Linux)
Step 1. Install Requirements
- Python 3.7+ (probably best to use a `virtual environment`)
- Git
- CMake >=3.20 (need to be able to handle
--configoption) - Autobuild
- Native packages (this list is incomplete):
libvlc-dev
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:
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 --no-configure
You can omit the --no-configure option: if you do, autobuild will implicitly run the configuration step before building. That's harmless, it just takes some extra time.
Running your newly built viewer
Step 5. Run
To launch the viewer you build, 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:
- This talk page (Report useful experiences there)
- Issue list below (If new issues, please add it to talk page above instead of there)
- Old talk page
- Common compilation problems (Rather old)
- Issue tracker
- Fix it: Modifying CMake Files and please, submit a patch!
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.
- Subscribe to OpenSource-Dev Mailing List (subscribe) and post your question there.