firestorm‐viewer - EricaNebula/gentoo-overlay GitHub Wiki

Firestorm Viewer

https://firestormviewer.org

A 3rd party viewer for Second Life


Why?

This is basically the reason I started learning to write ebuilds. Compiling Firestorm from source is a more complicated process than just checking out the repo and running the usual build command; It's complex enough that I ended up writing a shell script to automate parts (and eventually all) of the process. As well as that script does the job, it's also really not the Gentoo way. I wanted it integrated with Portage, so I started learning how to do that.

Special Instructions

By default this package builds with the fmodstudio USE flag. This is recommended but requires you to manually download the fmod studio api application because the download page requires (free) signup.

The ebuild will stop you and tell you what to do if you try to merge it, but if you happen to see this first you need to visit https://www.fmod.com/download#fmodengine and sign up, then download FMOD Studio API 2.03.07 (fmodstudioapi20307linux.tar.gz) and place it into a folder within this repo: /var/db/repos/nebula/net-misc/3p-fmodstudio/files

The other USE flag that matters is opensim, which if you enable will build the viewer with support for opensim. If you only connect to SL then you do not need this.

Finally, the viewer can be built with AVX2 CPU optimizations, but will only do so if your CPU flags are set correctly in Portage (which they should be).

Notes about this ebuild

This ebuild violates some Portage/Gentoo best practices. Most importantly it uses RESTRICT=network-sandbox to allow the ebuild access to the network during all phases. This is because the application is built with LindenLabs' own "autobuild" build system, which does not provide a way to just fetch dependencies; It can only do it as part of the configure or build steps, which normally do not get network access.

The proper solution would be to find a way to determine which packages autobuild is going to download, add them to the SRC_URI array, and then during the unpack phase ensure they all get placed in the right locations. I'm not sure if I can do this, and I'm also not sure how much I even want to try. So for now this ebuild can just connect to the network and download its dependencies whenever it needs to.

Also, because of something about the way I am installing the compiled files (I think), if you're watching you'll see the following during installation:

scanelf: rpath_security_checks(): Security problem NULL DT_RUNPATH in /var/tmp/portage/games-simulation/firestorm-viewer-7.1.13.78266/image/opt/firestorm-viewer/bin/dullahan_host
scanelf: rpath_security_checks(): Security problem NULL DT_RUNPATH in /var/tmp/portage/games-simulation/firestorm-viewer-7.1.13.78266/image/opt/firestorm-viewer/lib/libalut.so.0.0.0
Auto fixing rpaths for /var/tmp/portage/games-simulation/firestorm-viewer-7.1.13.78266/image/opt/firestorm-viewer/bin/dullahan_host

 * QA Notice: The following files contain insecure RUNPATHs
 *  Please file a bug about this at https://bugs.gentoo.org/
 *  with the maintainer of the package.
 *   /var/tmp/portage/games-simulation/firestorm-viewer-7.1.13.78266/image/opt/firestorm-viewer/bin/dullahan_hostn    RPATH: :/../lib
 * 


 * QA Notice: The following files contain runtime text relocations
 *  Text relocations force the dynamic linker to perform extra
 *  work at startup, waste system resources, and may pose a security
 *  risk.  On some architectures, the code may not even function
 *  properly, if at all.
 *  For more information, see:
 * 
 *    https://wiki.gentoo.org/wiki/Hardened/HOWTO_locate_and_fix_textrels
 * 
 *  Please include the following list of files in your report:
 * TEXTREL opt/firestorm-viewer/lib32/libvivoxsdk.so
 * TEXTREL opt/firestorm-viewer/lib32/libvivoxplatform.so
 * TEXTREL opt/firestorm-viewer/lib32/libortp.so

For now I don't know how to address these, or if it's even possible to do so. If I ever learn how to deal with these I'll absolutely do it.

That's all. Enjoy easier Firestorm compilation!