Quantcast
Channel: Phoenix Firestorm Project - Wiki
Viewing all articles
Browse latest Browse all 5258

fs_compiling_firestorm_alexivy_ubuntu_20

$
0
0

Building Firestorm in 64-bit Ubuntu 20.04

Please note that this procedure has not yet been extensively tested on more than one system, or by more than one person. If you run into any problems after performing the steps exactly as written, please create a ticket on JIRA, that includes this page link, the step that failed and any error message you were shown.

This page describes all necessary steps1) to build the Firestorm viewer for Linux on Ubuntu 20.04, using Linden Lab's project Alex Ivy infrastructure. It assumes you are using Ubuntu 20.04 Focal Fossa, that your normal user has sudo privileges and that all standard updates have been applied using apt *upgrade*.

To successfuly compile Firestorm your computer must have at least 4GB RAM with 4GB+ swap, a modern dual-core CPU and 32GB available HDD space. However we strongly recommended you have 8GB or more RAM, a modern CPU with 4 or more real cores and 32GB available HDD space. You may require more HDD space if you compile different viewers, or different variations of Firestorm.

NOTE: This procedure is NOT valid for building versions of the viewer prior to the Alex Ivy merge (revision 54609)!
Please note that we do not offer support for compiling the viewer on your own. However, there are some resources available, listed below.

Prepare Your System

We're going to follow some conventional ideas on compiling software. Primarily, we will create a directory to contain all the source files. Open a terminal (in which we will work from here on).

cd #to jump to the home directory
mkdir -p src/sl/vorbis src/python-pip
cd src

Install Required Development Tools

Now to install the various programs used to build the viewer.

All installations are done with default settings (unless told explicitly) - if you change that, you're on your own!

The required tools, some of which may already be installed, are:

make cmake curl doxygen gdb git python2 python2-dev python-all
sudo apt install --install-recommends make cmake curl doxygen gdb git python2 python2-dev python-all

(the –install-recommends flag tells apt to install all packages recommended by each named package.)

Install PIP

Pip for Python 2.7 is not available to Ubuntu 20.04, so it takes a couple extra steps to install it

cd ~/src/python-pip
curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py
sudo python2 get-pip.py
cd ~/src

In at least one case, a required symlink (/usr/bin/python) was missing. Ensure that it exists, and is pointing to Python 2.7.

sudo ln -f -s /usr/bin/python2 /usr/lib/python

Install Required Libraries

These libraries may be included with your distribution, and some may already be installed:

libGL.so (libgl1-mesa-dev) LibGLU.so (libglu1-mesa-dev) libpython-all-dev libstdc++.so.6 (libstdc++6)
libX11.so (libx11-dev) libxinerama-dev libxml2.so (libxml2-dev) libXrender.so (libxrender-dev)
sudo apt install --install-recommends libgl1-mesa-dev libglu1-mesa-dev libpython-all-dev libstdc++6 libx11-dev libxinerama-dev libxml2-dev libxrender-dev

Install Autobuild

Autobuild is a Linden Lab resource that automates the configure and build processes.

sudo pip2 install autobuild

This will install autobuild and add a link in the exec path.

Setup Viewer Build Variables

In order to make it easier to build collections of related packages (such as the viewer and all the library packages that it imports) with the same compilation options, Autobuild expects a file of variable definitions. This can be set using the environmenat variable AUTOBUILD_VARIABLES_FILE.

cd ~/src/sl
git clone https://vcs.firestormviewer.org/fs-build-variables
source fs-build-variables/convenience Release
export AUTOBUILD_VARIABLES_FILE=$HOME/src/sl/fs-build-variables/variables

Clone the viewer

There are several repositories available, in but the one wea re after is the development repository. You can grab all the sources if you wish, but but keep in mind that each FS source requires around 110MB initially and around 4.3GB after the binaries have been built, plus possible compiling overhead.

git clone https://vcs.firestormviewer.org/phoenix-firestorm

This can take a bit, it's a rather large download.

Prepare third party libraries

Most third party libraries needed to build the viewer will be automatically downloaded for you and installed into the build directory within your source tree during compilation. Some need to be manually prepared and are not normally required when using an open source configuration (ReleaseFS_open).

If you are manually building the third party libraries, you will have to build the correct version (32bit libraries for a 32bit viewer, 64bit versions for a 64bit viewer)!

Install Vorbis

Credit for the vorbis file goes to Marissa Orloff. She states that when recompiling this the following changes were made: in ogg_vorbis build.sh in line 91 needs to be edited to remove LL_release. aclocal and automake need symlinks 1.15 > 1.16

cd ~/src/sl/vorbis
wget https://fireandicegrid.net/downloads/ogg_vorbis-1.3.3-1.3.6.200930615-linux64-200930615.tar.bz2
cd ../phoenix-firestorm
autobuild installables edit ogg_vorbis platform=linux64 hash=d888b4916006c28471b4f103854526c3 url=file://$HOME/src/sl/vorbis/ogg_vorbis-1.3.3-1.3.6.200930615-linux64-200930615.tar.bz2

FMOD Studio using Autobuild

If you want to use FMOD Studio to play sounds within the viewer, you will have to download your own copy. FMOD Studio can be downloaded here (requires creating a free account to access the download section).

Make sure to download the FMOD Studio API and not the FMOD Studio Tool!
cd ~/src/sl
git clone https://vcs.firestormviewer.org/3p-libraries/3p-fmodstudio
  • After you have cloned the repository, copy the downloaded FMOD Studio installer file to ~/src/sl/3p-fmodstudio
  • Currently, FMOD Studio is at version 2.01.01, and that's what 3p-fmodstudio is expecting to use. If you plan to use a different version, you will have to modify the file build-cmd.sh in the root of the repository. Right at the top, you find the version number of FMOD Studio you want to package (one short version without separator and one long version). Change these values to the version you downloaded:
FMOD_VERSION="20101"
FMOD_VERSION_PRETTY="2.01.01"
cd ~/src/sl/3p-fmodstudio
autobuild build -A 64 --all
autobuild package -A 64

Near the end of the output you will see the package name written, including the path, and the md5 hash below it. For example:

wrote /home/user/src/sl/3p-fmodstudio/fmodstudio-2.01.01-linux64-201831958.tar.bz2
md5 a648d0a332768cab58b377566e415c88

cd ~/src/sl/phoenix-firestorm

Copy the FMOD Studio path and md5 value from the package process into this command:

autobuild installables edit fmodstudio platform=linux64 hash={md5 value} url=file://{wrote value}

For example:

autobuild installables edit fmodstudio platform=linux64 hash=a648d0a332768cab58b377566e415c88 url=file:///home/user/src/sl/3p-fmodstudio/fmodstudio-2.01.01-linux64-201831958.tar.bz2
Note: Having modified autobuild.xml would require it be restored before trying to fetch any new commits or more especially if you push a commit. This can be done with *git reset –hard && git remote update*

Configuring the Viewer

 cd ~/src/sl/phoenix-firestorm
 autobuild configure -A 64 -c ReleaseFS_open

This will configure Firestorm to be built with all defaults and without third party libraries.

Note: Configuring the viewer for the first time will take some time to download all the required third-party libraries. As of Autobuild 1.1, the download progress is hidden by default. If you want to watch the download progress, you can use the verbose option to display a more detailed output:
autobuild configure -v -c ReleaseFS_open

Configuration Options

There are a number of switches you can use to modify the configuration process. The name of each switch is followed by its type and then by the value you want to set.

  • -A <architecture> sets the target architecture, that is if you want to build a 32bit or 64bit viewer (32bit is default if omitted).

When passing one or more of the following options, they must be separated first with a double dash, which denotes the start of an options list.

  • –fmodstudio controls if the FMOD Studio package is incorporated into the viewer. You must have performed the FMOD Studio installation steps above for this to work.
  • –package makes sure all files are added to a compressed tar file for easy distribution and storage.
  • –chan <channel name> lets you define a custom channel name for the viewer
  • –no-opensim removes opemsim support, limiting the accessible grids to SL's Agni and Aditi.
  • –avx causes the viewer to build with the AVX CPU instruction support. Similarly, –avx2 enabled AVX2 support.
  • -LL_TESTS:BOOL=<bool> controls if the tests are compiled and run. There are quite a lot of them so excluding them is recommended unless you have some reason to need one or
    more of them.
TIP: OFF and NO are the same as FALSE; anything else is considered to be TRUE

Examples:

  • To build a 64bit viewer with a custom channel name, FMOD Studio and to create an installer package, run this command:
    autobuild configure -A 64 -c ReleaseFS_open -- --fmodstudio --package --chan MyViewer -DLL_TESTS:BOOL=FALSE
  • To build a 64bit viewer without FMOD Studio and without an installer package, run this command:
    autobuild configure -A 64 -c ReleaseFS_open -- --chan MyViewer -DLL_TESTS:BOOL=FALSE

Building the viewer

Make sure you include the same architecture parameter and switches (except clean) you used while configuring the viewer:

autobuild build -A 64 -c ReleaseFS_open

Now, sit back, read War and Peace, calculate PI to 50 places, tour the country, whatever you desire. Compiling can take quite a bit of time depending on your computer's processing power.

NOTE: It is possible to use autobuild to do both the configure step (only needed once) and the build step with one command (autobuild build -A 64 -c ReleaseFS_open [– switches] . For clarity, they are mentioned separately.

Running your newly built viewer

Running from a menu item

Create the desktop launcher

cd ~/src/sl/phoenix-firestorm-lgpl/build-linux-x86_64/newview/packaged/etc
./refresh_desktop_app_entry.sh

Then open your applications menu and look in the Internet or Network branch for the Firestorm launcher.

Running from command line or file browser

cd ~/src/sl/phoenix-firestorm-lgpl/build-linux-x86_64/newview/packaged
./firestorm

Your file browser/file manager many not know how to execute a script. Check the settings for your file browser. In Nautilus, for example, open Preferences > Behavior tab, change the action for executable text files to either Run or Ask.

"Installing" the viewer

Copy or move the contents of ~/src/sl/phoenix-firestorm/build-linux-x86_64/newview/packaged to a place that can be access by the PC you want to install Firestorm on. Cloud-based storage, NAS or removable media would do.

Troubleshooting

Handling problems

If you encounter errors or run into problems, please first double check that you followed the steps correctly. One typo can break it. Then, check whether someone else already had the same issue. A solution might be known already.

  • Self-Compilers peer supportFirestorm Self Compilers is free to join, fellow self-compilers may be able to offer assistance.
  • IRC: The #phoenixviewer-dev channel is the best place to look for solutions.
    A lot of self-compilers and project developers hang out there and are ready to help you.
  • Jira:JIRA may contain resolved tickets.
    Search using the error you encountered.
  • Included documentation: In the Firestorm root folder are several “README” documents. You should make yourself familiar with their content, even if they appear to be out of date.

If you found a procedural error in this document, please let us know in as much detail as you can, either contact the author (preferred) or discuss on IRC.

Common Issues/Bugs/Glitches And Solutions

  • Missing libraries/applications/packages This may occur if you did not or could not install the listed packages. The packages do exist in the default Debian repositories, so make sure you did not disable those. If you find that a library or application is in a different package for your system, contact the team with the name of the library or application, the name of its package and your Linux OS so that information can be checked and added here.
  • Delayed sounds Some users have noted that OpenAL plays sounds from the viewer up to 20 seconds after they are triggered. There is no solution to this via the viewer, but there may be some solutions on the Internet
  • No Sounds The viewer will try to use whatever sound service you have running, but might need a little coaxing. Read through the firestorm script inside the program folder, you will find various commended options. Uncommenting one or more may help restore sound.
  • Voice Won't Connect It was observed in testing that voice would not connect unless “No Device” was chosen for the Input device (Preferences ⇒ Sound & Media ⇒ Voice ⇒ Audio Device Settings). This was resolved by replacing Firestorm/lib/libvivoxal.so.1 with a copy from release.
1)
Thanks to Manwa Pastorelli and Marissa Orloff for their contributions

Viewing all articles
Browse latest Browse all 5258

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>