Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion autobuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4203,7 +4203,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>canonical_repo</key>
<string>https://github.com/secondlife/viewer</string>
<key>description</key>
<string>Firestorm Viewer</string>
<string>Aperture Viewer</string>
</map>
</map>
</llsd>
61 changes: 34 additions & 27 deletions doc/building_linux.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Build instructions for Linux

> [!WARNING]
> Please note that we do not give support for compiling the viewer on your own. However, there is a self-compilers group in Second Life that can be joined to ask questions related to compiling the viewer: [Firestorm Self Compilers](https://tinyurl.com/firestorm-self-compilers)
> Please note that we do not give support for compiling the viewer on your own.

This procedure is based on discussions with the Firestorm Linux development team and is the only one recommended for Firestorm for Linux. System requirements are:
NOTE: Aperture Viewer is based on the Firestorm Viewer (which is based on the Second Life Viewer), so these build
instructions were heavily based on the excellent work from the Firestorm team.

System requirements are:
- Ubuntu 22.04 LTS (x86_64) - fully upgraded (this is also now the minimum requirement for running the viewer).
- 16GB or more RAM ([Low Memory Caution](#common-issuesbugsglitches-and-solutions))
- 64GB hard drive space
- 4 or more core CPU (you could get by with 2 cores, but the process will take much longer)
- GCC 11 compiler (which is the default version on Ubuntu 22.04 LTS)
- GCC 11, or newer, compiler.

It is recommended that you use a virtual machine for compiling, ensuring the guest can meet the hardware requirements.
It is recommended that you use a virtual machine (or docker container) running Ubuntu 22.04 LTS for compiling, ensuring the guest can meet the hardware requirements.

This procedure may or may not work on other Linux distributions (or you might need to adjust some of the package names to suit the distribution you are using).

Expand Down Expand Up @@ -60,20 +63,20 @@ There are two required repositories, the viewer itself and the build variables.

```
cd ~/src
git clone https://github.com/FirestormViewer/phoenix-firestorm.git
git clone https://github.com/ApertureViewer/Aperture-Viewer.git
```

This will create a folder called phoenix-firestorm and add all the source files. If you desire, you can choose a different folder name by adding the name to the end of the command:
This will create a folder called Aperture-Viewer and add all the source files. If you desire, you can choose a different folder name by adding the name to the end of the command:

```
git clone https://github.com/FirestormViewer/phoenix-firestorm.git NewDestinationDirectory
git clone https://github.com/ApertureViewer/Aperture-Viewer.git NewDestinationDirectory
```

The rest of this document will assume the default directory, `phoenix-firestorm`
The rest of this document will assume the default directory, `Aperture-Viewer`

### Clone the Autobuild build variables

Autobuild uses a separate file to control compiler options, switches, and the like for different configurations.
Autobuild uses a separate file to control compiler options, switches, and the like for different configurations. The Firestorm viewer repository has appropriate settings.

```
cd ~/src
Expand Down Expand Up @@ -116,7 +119,7 @@ wrote !/home/username/src/3p-fmodstudio/fmodstudio-2.01.02-linux64-202161533.ta
Additionally, a file `result.txt` has been created containing the md5 hash value of the package file, which you will need in the next steps.

```
cd ~/src/phoenix-firestorm
cd ~/src/Aperture-Viewer
```

Copy the FMOD Studio path and md5 value from the package process into this command:
Expand Down Expand Up @@ -147,17 +150,20 @@ export AUTOBUILD_VARIABLES_FILE=$HOME/src/fs-build-variables/variables
You can add that to `~/.bashrc` or `~/.profile` so they execute automatically, or execute them before you run autobuild.

```
cd ~/src/phoenix-firestorm
cd ~/src/Aperture-Viewer
autobuild configure -A 64 -c ReleaseFS_open
```
or
```
autobuild configure -A 64 -c ReleaseFS_open -- --fmodstudio
```

This will set up to compile with all defaults and without non-default libraries. It will fetch any additional necessary libraries.

Available premade firestorm-specific build targets:
Available premade build targets:

```
ReleaseFS (includes KDU, FMOD)
ReleaseFS_open (no KDU, no FMOD)
ReleaseFS_open (no KDU, no FMOD), unless you add them yourself
RelWithDebInfoFS_open (no KDU, no FMOD)
```

Expand All @@ -168,8 +174,8 @@ There are a number of switches you can use to modify the configuration process.
- **LL_TESTS** (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.
- **clean** will cause autobuild to remove any previously compiled objects and fetched packages. It can be useful if you need to force a reload of all packages
- **package** will result in a bzip2 archive of the completed viewer. Enabled by default, you would have to use **-DPACKAGE:BOOL=Off** to disable it
- **chan** will set a unique channel (and the name) for the viewer, appending whatever is defined to "Firestorm-". By default, the channel is "private" followed by your computer's name.
- **fmodstudio** will tell autobuiild to use the FmodStudio package when compiling.
- **chan** will set a unique channel (and the name) for the viewer, appending whatever is defined to "Aperture-". By default, the channel is "private" followed by your computer's name.
- **fmodstudio** will tell autobuild to use the FmodStudio package when compiling.

Most switches start with a double-dash (\--). And if you use any switches you must enclose them with a double-dash at the start and an optional double-dash at the end.

Expand All @@ -185,7 +191,7 @@ autobuild configure -A 64 -c ReleaseFS_open -- --fmodstudio
autobuild configure -A 64 -c ReleaseFS_open -- --chan="MyBuild"
```

In the last example, the channel and resulting viewer name would be "Firestorm-MyBuild".
In the last example, the channel and resulting viewer name would be "Aperture-MyBuild".

The first time you configure, several additional files will be downloaded from Firestorm and Second Life sources. These are mostly binary packages maintained outside the viewer development itself. And if you use the `--clean` switch, you will re-download them all.

Expand All @@ -194,6 +200,10 @@ The first time you configure, several additional files will be downloaded from F
```
autobuild build -A 64 -c ReleaseFS_open
```
or
```
autobuild build -A 64 -c ReleaseFS_open -- --chan="MyBuild"
```

Be sure to use the fmodstudio and chan switches again.

Expand All @@ -216,18 +226,18 @@ If you build the viewer using a virtual machine (guest), you will need to copy t
The build process created a ready-to-use viewer as well as a compressed archive. The archive can be copied or moved to any shared filesystem, such as a flash or cloud drive, and it could be installed or extracted in the same manner as is the official release.

```
cp ~/src/phoenix-firestorm/build-linux-x86_64/newview/Phoenix*.tar.* /path/to/shared/drive
cp ~/src/Aperture-Viewer/build-linux-x86_64/newview/Aperture*.tar.* /path/to/shared/drive
```

or
```
mv ~/src/phoenix-firestorm/build-linux-x86_64/newview/Phoenix*.tar.* /path/to/shared/drive
mv ~/src/Aperture-Viewer/build-linux-x86_64/newview/Aperture*.tar.* /path/to/shared/drive
```

When copying the ready-to-run folders and files, use

```
rsync -rptgoDLK --update --progress ~/src/phoenix-firestorm/build-linux-x86_64/newview/packaged/* /path/to/destination
rsync -rptgoDLK --update --progress ~/src/Aperture-Viewer/build-linux-x86_64/newview/packaged/* /path/to/destination
```

Using rsync has the advantage of updating the destination, replacing only those files that changed or are missing, which takes much less time than copying and replacing every file.
Expand All @@ -239,7 +249,7 @@ Using rsync has the advantage of updating the destination, replacing only those
Create the desktop launcher after copying to the destination machine

```
cd /path/to/firestorm
cd /path/to/aperture
etc/refresh_desktop_app_entry.sh
```

Expand All @@ -248,8 +258,8 @@ Then open your applications menu and look in the Internet or Network branch for
### Running from command line or file browser

```
cd /path/to/firestorm
./firestorm
cd /path/to/aperture
./aperture
```

## Troubleshooting
Expand All @@ -258,9 +268,6 @@ cd /path/to/firestorm

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.

- **Firestorm Self-Compilers group:** [Firestorm Self Compilers](https://tinyurl.com/firestorm-self-compilers) is free to join, fellow self-compilers may be able to offer assistance.
- **Jira:** [JIRA](https://jira.firestormviewer.org) may contain resolved issues related to the error you're seeing. Search using the error you encountered. Or create a new issue to report an error in this document, or if a code change causes a build process to fail.

### Common issues/bugs/glitches and solutions

- **Virtual memory exhausted, c++ fatal error, or similar out-of-memory issues** may occur if you are building the viewer for the first time, or re-building after a very large set of changes were added. Sometimes restarting the build command will let you recover, sometimes you have to restart the build system. To avoid that from happening, add ram to your virtual environment, or add swap space, something on the order of 10GB or more. As well, reducing the number of CPU cores assigned, down to 4 or less, will lower ram usage.
Expand All @@ -273,5 +280,5 @@ rm ../build-linux-x86_64/packages/LICENSES/SDL.txt
rm ../build-linux-x86_64/packages/lib/release/*SDL*
```
- **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. Compiling with FModStudio may resolve this issue.
- **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 directlry, you will find various commented options. Uncommenting one or more may help restore sound, as can compiling with FModStudio. Refer also to the README.Linux.txt and README-linux-voice.txt files in the program directory.
- **No sounds:** The viewer will try to use whatever sound service you have running, but might need a little coaxing. Read through the aperture script inside the program directory, you will find various commented options. Uncommenting one or more may help restore sound, as can compiling with FModStudio. Refer also to the README.Linux.txt and README-linux-voice.txt files in the program directory.
- **Voice won't connect:** Refer to **[this link](https://wiki.firestormviewer.org/fs_voice#linux)** or the relevant link on **[this page](https://wiki.firestormviewer.org/linux)** to make needed adjustments to your computer and/or the SLVoice files.
3 changes: 3 additions & 0 deletions indra/cmake/00-Common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ if (LINUX)
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--no-keep-memory -Wl,--build-id -Wl,-rpath,'$ORIGIN:$ORIGIN/../lib' -Wl,--exclude-libs,ALL")

set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}")

# gcc newer than v12 has some warnings that stop us compiling. (Ideally they should be fixed, of course)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=nonnull -Wno-error=maybe-uninitialized")
endif (LINUX)


Expand Down
2 changes: 2 additions & 0 deletions indra/llfilesystem/lldir_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ void LLDir_Linux::initAppDirs(const std::string &app_name,

std::string upper_app_name(app_name);
LLStringUtil::toUpper(upper_app_name);
LLStringUtil::replaceChar(upper_app_name, ' ', '_');

auto app_home_env(LLStringUtil::getoptenv(upper_app_name + "_USER_DIR"));
if (app_home_env)
Expand All @@ -174,6 +175,7 @@ void LLDir_Linux::initAppDirs(const std::string &app_name,
mOSUserAppDir += ".";
std::string lower_app_name(app_name);
LLStringUtil::toLower(lower_app_name);
LLStringUtil::replaceChar(lower_app_name, ' ', '_');
mOSUserAppDir += lower_app_name;
}

Expand Down
4 changes: 2 additions & 2 deletions indra/newview/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ endif (OPENSIM)

# <AP:WW> Rebrand: Rename viewer binary to "aperture".
#set(VIEWER_BINARY_NAME "firestorm-bin" CACHE STRING
set(VIEWER_BINARY_NAME "aperture" CACHE STRING
set(VIEWER_BINARY_NAME "aperture-bin" CACHE STRING
# </AP:WW>
"The name of the viewer executable to create.")

Expand Down Expand Up @@ -2669,7 +2669,7 @@ set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH
# </FS:Ansariel>

if (LINUX)
set(product Firestorm-${ARCH}-${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION})
set(product Aperture-${ARCH}-${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION})

# These are the generated targets that are copied to package/
set(COPY_INPUT_DEPENDENCIES
Expand Down
4 changes: 2 additions & 2 deletions indra/newview/app_settings/settings_firestorm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>aperture</string>
<string>Aperture</string>
</map>

<key>SkinCurrentTheme</key>
Expand All @@ -106,7 +106,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>aperture</string>
<string>Aperture</string>
</map>

<key>FSSkinCurrentThemeReadableName</key>
Expand Down
Loading