Difference between revisions of "Compiling and Patching Snowglobe (Linux)"
m (→Compile: wikify) |
m (Labeled Section Transclusion markers) |
||
Line 8: | Line 8: | ||
<!-- Edit the following section in https://wiki.secondlife.com/wiki/Compiling_the_viewer_(Linux)#Required_tools --> | <!-- Edit the following section in https://wiki.secondlife.com/wiki/Compiling_the_viewer_(Linux)#Required_tools --> | ||
{{:Compiling the viewer (Linux)}} | {{:Compiling the viewer (Linux)}} | ||
<section begin=BeforePatchOld /><section begin=BeforePatchNew /> | |||
== Get last Snowglobe Trunk sources == | == Get last Snowglobe Trunk sources == | ||
Line 16: | Line 16: | ||
./trunk/scripts/public_fetch_tarballs.py | ./trunk/scripts/public_fetch_tarballs.py | ||
<section end=BeforePatchNew /> | |||
== Prepare / configure (OLD) == | == Prepare / configure (OLD) == | ||
cd trunk/indra/ | cd trunk/indra/ | ||
./develop.py configure | ./develop.py configure | ||
<section end=BeforePatchOld /><section begin=BeforePatchNew /> | |||
== Prepare / configure == | == Prepare / configure == | ||
cd trunk/indra/ | cd trunk/indra/ | ||
cmake . | cmake . | ||
<section end=BeforePatchNew /><section begin=Patch /> | |||
== Patch == | == Patch == | ||
Line 33: | Line 33: | ||
cd (...)/trunk/ | cd (...)/trunk/ | ||
patch -p1 < /path/to/your-patch.txt | patch -p1 < /path/to/your-patch.txt | ||
<section end=Patch /><section begin=AfterPatch /> | |||
== Compile == | == Compile == | ||
Line 40: | Line 40: | ||
After compilation you get <code>(...)/linden/indra/viewer-linux-i686-relwithdebinfo/newview/'''Snowglobe-something.tar.bz2'''</code> — copy it somewhere, extract it and do as usual. | After compilation you get <code>(...)/linden/indra/viewer-linux-i686-relwithdebinfo/newview/'''Snowglobe-something.tar.bz2'''</code> — copy it somewhere, extract it and do as usual. | ||
<section end=AfterPatch /> | |||
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 <code>make</code> after it's completed installing the prebuilts and starts listing compile percentages, remove the offending libraries from <code>linden/libraries/i686-linux/lib_release_client/</code>, run <code>make clean</code>, and finally rerun <code>make</code> to build without any more manual intervention. | 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 <code>make</code> after it's completed installing the prebuilts and starts listing compile percentages, remove the offending libraries from <code>linden/libraries/i686-linux/lib_release_client/</code>, run <code>make clean</code>, and finally rerun <code>make</code> to build without any more manual intervention. | ||
[[Category:Compiling viewer]] | [[Category:Compiling viewer]] |
Revision as of 15:01, 11 December 2009
Snowglobe is where open development is most active right now. Follow these instructions to compile (and patch) Snowglobe sources on Linux using SVN.
This page is meant to be a quick, step-to-step, easy-to-mantain reference. See Compiling the viewer (Linux) and links provided there for more details and information on dependencies, errors, etc.
Required tools
There are a number of tools that need to be installed first.
- hg [package: mercurial]
- cmake [package: cmake]
- Currently (snowglobe 1.3.2 and higher) cmake 2.6.2 is the minimum required version.
- yacc or compatible tool [suggested package: bison]
- lex or compatible tool [suggested package: flex]
- python [package: python]
- python 2.4.3 is the minimum required version.
- All more recent 2.x versions should work, too. If you encounter problems or deprecation warnings, please report them.
- python 3.x hasn't been tested yet.
- g++ [package: g++]
- Note (not relevant for standalone): gcc 4.4 (which is in recent Ubuntu and debian) won't work in versions prior to 2.0 (or Snowglobe 1.3) if you are not building standalone (see below), because it chokes on some parts of boost prior to 1.37 (http://svn.boost.org/trac/boost/ticket/2069). The solution is to install GCC 4.3 and to run 'export CXX=/usr/bin/g++-4.3' or whatever your binary is before trying to compile.
- Another workaround is to use update-alternatives; for example, if you already have 4.4 installed, try this:
sudo apt-get install g++-4.3 sudo update-alternatives --remove-all gcc sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.3 43 --slave /usr/bin/g++ g++ /usr/bin/g++-4.3 --slave /usr/bin/gcov gcov /usr/bin/gcov-4.3 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 44 --slave /usr/bin/g++ g++ /usr/bin/g++-4.4 --slave /usr/bin/gcov gcov /usr/bin/gcov-4.4
- then choose 4.3:
sudo update-alternatives --config gcc
- Linden Lab has backported gcc-4.6.3 to Debian Squeeze; this port and its associated libraries are used when building the official Linux viewer.
- The sources and Debian packages for this backport are available from Debian GCC Backport
- libboost-program-options-dev was needed on Ubuntu 8.04 to use cmake, but it's not needed anymore to build a 1.23-render-pipeline on Ubuntu 9.04-beta (nor Snowglobe 2 on Ubuntu 9.10)
- make (package: make)
- bzip2 (package: bzip2)
The build process may use the following optional tools:
- distcc distributed compiler (useful if you have multiple PCs.)
- ccache a fast compiler cache (speed up recompilation, a must if you intend to do development.)
Tip: To boost your productivity as a developer, try the suggestions at Development Environment for Multiple Viewers about directory structure, multiple viewers and automation of repetitive tasks. |
<section begin=BeforePatchOld /><section begin=BeforePatchNew />
Get last Snowglobe Trunk sources
svn co http://svn.secondlife.com/svn/linden/projects/2009/snowglobe/trunk
Get current libraries and artwork
./trunk/scripts/public_fetch_tarballs.py
<section end=BeforePatchNew />
Prepare / configure (OLD)
cd trunk/indra/ ./develop.py configure
<section end=BeforePatchOld /><section begin=BeforePatchNew />
Prepare / configure
cd trunk/indra/ cmake .
<section end=BeforePatchNew /><section begin=Patch />
Patch
Learn how and where to apply a patch.
cd (...)/trunk/ patch -p1 < /path/to/your-patch.txt
<section end=Patch /><section begin=AfterPatch />
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.
<section end=AfterPatch />
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.