Difference between revisions of "Build the Viewer on Linux"
Rob Linden (talk | contribs) |
Tofu Linden (talk | contribs) (wad of rough docs for linux build) |
||
Line 1: | Line 1: | ||
{{CompileNav}} | {{CompileNav}} | ||
These are raw notes. Will prettify them later. | |||
=== Ubuntu build notes === | * install scons [scons] | ||
* install boost [libboost-dev] | |||
* install boost-regex [libboost-regex-dev] | |||
* install apr-1 [libapr1.0-dev] | |||
* install aprutil-1 [libaprutil1.0-dev] | |||
* install xmlrpc-epi 0.51 <http://xmlrpc-epi.sourceforge.net/> | |||
** note: not xmlrpc-c | |||
* install jpeglib [libjpeg62-dev] | |||
* install SDL [libsdl1.2-dev] | |||
* install Vorbis [libvorbis-dev] | |||
* install libgtk2 [libgtk2.0-dev] | |||
* unpack FMOD 3 <http://www.fmod.org/> | |||
* build ELFIO <http://sourceforge.net/projects/elfio/> | |||
* build OpenJPEG <http://www.openjpeg.org/> | |||
$ cp -a /usr/include/apr-1.0/ ${SLSRC}/libraries/i686-linux/include/apr-1 | |||
$ mkdir ${SLSRC}/libraries/i686-linux/include/expat | |||
$ cp -a /usr/include/expat*.h ${SLSRC}/libraries/i686-linux/include/expat | |||
$ mkdir ${SLSRC}/libraries/i686-linux/include/zlib | |||
$ cp -a /usr/include/zlib*.h ${SLSRC}/libraries/i686-linux/include/zlib/ | |||
$ mkdir ${SLSRC}/libraries/i686-linux/include/openjpeg | |||
$ cp ${OPENJPEG}/libopenjpeg/openjpeg.h ${SLSRC}/libraries/i686-linux/include/openjpeg/ | |||
$ cp ${OPENJPEG}/libopenjpeg.a ${SLSRC}/libraries/i686-linux/lib_release_client/ | |||
$ cp ${FMOD}/api/inc/* ${SLSRC}/libraries/i686-linux/include/ | |||
$ cp ${FMOD}/api/libfmod-3.75.so ${SLSRC}/libraries/i686-linux/lib_release_client/ | |||
$ mkdir ${SLSRC}/libraries/i686-linux/include/ELFIO | |||
$ cp ${ELFIO}/ELFIO/*.h ${SLSRC}/libraries/i686-linux/include/ELFIO/ | |||
$ cp ${ELFIO}/ELFIO/libelfio.so ${SLSRC}/libraries/i686-linux/lib_release_client/ | |||
$ mkdir ${SLSRC}/libraries/i686-linux/include/jpeglib | |||
$ cp -a /usr/include/j*.h ${SLSRC}/libraries/i686-linux/include/jpeglib/ | |||
$ touch ${SLSRC}/libraries/i686-linux/include/jpeglib/jinclude.h | |||
$ mkdir ${SLSRC}/libraries/i686-linux/include/llfreetype2 | |||
$ cp -a /usr/include/freetype2/freetype/ ${SLSRC}/libraries/i686-linux/include/llfreetype2/ | |||
$ cp -a /usr/include/ft2build.h ${SLSRC}/libraries/i686-linux/include/llfreetype2/freetype/ | |||
$ cp -a /usr/include/atk-1.0 ${SLSRC}/libraries/i686-linux/include/ | |||
$ cp -a /usr/include/gtk-2.0 ${SLSRC}/libraries/i686-linux/include/ | |||
$ cp -a /usr/lib/gtk-2.0/include/* ${SLSRC}/libraries/i686-linux/include/gtk-2.0/ | |||
$ cp -a /usr/include/glib-2.0 ${SLSRC}/libraries/i686-linux/include/ | |||
$ cp -a /usr/lib/glib-2.0/include/* ${SLSRC}/libraries/i686-linux/include/glib-2.0/ | |||
$ cp -a /usr/include/pango-1.0 ${SLSRC}/libraries/i686-linux/include/ | |||
[if your GTK is fairly recent and thus needs Cairo:] | |||
$ cp -a /usr/include/cairo/* ${SLSRC}/libraries/i686-linux/include/ | |||
------------------------ | |||
BUILDING | |||
$ cd indra | |||
$ scons DISTCC=no BTARGET=client BUILD=release | |||
* resulting unstripped binary is then newview/secondlife-i686-bin | |||
------------------------ | |||
RUNNING FROM INSIDE THE TREE | |||
* preparing to run 'in-tree' | |||
** ensure you have indra/newview/app_settings/static_*.db2 - if not, you'll find it in the 'binary-common' package. | |||
$ cp ../../scripts/messages/message_template.msg app_settings/ | |||
* running it! | |||
$ ( cd newview && LD_LIBRARY_PATH=../../libraries/i686-linux/lib_release_client:${LD_LIBRARY_PATH}:/usr/local/lib ./secondlife-i686-bin ) | |||
------------------------ | |||
PACKAGING | |||
Doesn't work 'out of the box' as an automated process right now. | |||
=== OLD Ubuntu build notes - may be incorrect === | |||
Ubuntu 5.10 and higher uses a newer version of libc6 with a bug fix that breaks our codebase. | Ubuntu 5.10 and higher uses a newer version of libc6 with a bug fix that breaks our codebase. | ||
Line 24: | Line 102: | ||
</code> | </code> | ||
Source your ~/.bashrc, or open a new terminal, and build again. | Source your ~/.bashrc, or open a new terminal, and build again. | ||
Revision as of 14:54, 19 December 2006
These are raw notes. Will prettify them later.
- install scons [scons]
- install boost [libboost-dev]
- install boost-regex [libboost-regex-dev]
- install apr-1 [libapr1.0-dev]
- install aprutil-1 [libaprutil1.0-dev]
- install xmlrpc-epi 0.51 <http://xmlrpc-epi.sourceforge.net/>
- note: not xmlrpc-c
- install jpeglib [libjpeg62-dev]
- install SDL [libsdl1.2-dev]
- install Vorbis [libvorbis-dev]
- install libgtk2 [libgtk2.0-dev]
- unpack FMOD 3 <http://www.fmod.org/>
- build ELFIO <http://sourceforge.net/projects/elfio/>
- build OpenJPEG <http://www.openjpeg.org/>
$ cp -a /usr/include/apr-1.0/ ${SLSRC}/libraries/i686-linux/include/apr-1
$ mkdir ${SLSRC}/libraries/i686-linux/include/expat $ cp -a /usr/include/expat*.h ${SLSRC}/libraries/i686-linux/include/expat
$ mkdir ${SLSRC}/libraries/i686-linux/include/zlib $ cp -a /usr/include/zlib*.h ${SLSRC}/libraries/i686-linux/include/zlib/
$ mkdir ${SLSRC}/libraries/i686-linux/include/openjpeg $ cp ${OPENJPEG}/libopenjpeg/openjpeg.h ${SLSRC}/libraries/i686-linux/include/openjpeg/ $ cp ${OPENJPEG}/libopenjpeg.a ${SLSRC}/libraries/i686-linux/lib_release_client/
$ cp ${FMOD}/api/inc/* ${SLSRC}/libraries/i686-linux/include/ $ cp ${FMOD}/api/libfmod-3.75.so ${SLSRC}/libraries/i686-linux/lib_release_client/
$ mkdir ${SLSRC}/libraries/i686-linux/include/ELFIO $ cp ${ELFIO}/ELFIO/*.h ${SLSRC}/libraries/i686-linux/include/ELFIO/ $ cp ${ELFIO}/ELFIO/libelfio.so ${SLSRC}/libraries/i686-linux/lib_release_client/
$ mkdir ${SLSRC}/libraries/i686-linux/include/jpeglib $ cp -a /usr/include/j*.h ${SLSRC}/libraries/i686-linux/include/jpeglib/ $ touch ${SLSRC}/libraries/i686-linux/include/jpeglib/jinclude.h
$ mkdir ${SLSRC}/libraries/i686-linux/include/llfreetype2 $ cp -a /usr/include/freetype2/freetype/ ${SLSRC}/libraries/i686-linux/include/llfreetype2/ $ cp -a /usr/include/ft2build.h ${SLSRC}/libraries/i686-linux/include/llfreetype2/freetype/
$ cp -a /usr/include/atk-1.0 ${SLSRC}/libraries/i686-linux/include/ $ cp -a /usr/include/gtk-2.0 ${SLSRC}/libraries/i686-linux/include/ $ cp -a /usr/lib/gtk-2.0/include/* ${SLSRC}/libraries/i686-linux/include/gtk-2.0/ $ cp -a /usr/include/glib-2.0 ${SLSRC}/libraries/i686-linux/include/ $ cp -a /usr/lib/glib-2.0/include/* ${SLSRC}/libraries/i686-linux/include/glib-2.0/ $ cp -a /usr/include/pango-1.0 ${SLSRC}/libraries/i686-linux/include/
[if your GTK is fairly recent and thus needs Cairo:] $ cp -a /usr/include/cairo/* ${SLSRC}/libraries/i686-linux/include/
BUILDING
$ cd indra $ scons DISTCC=no BTARGET=client BUILD=release
- resulting unstripped binary is then newview/secondlife-i686-bin
RUNNING FROM INSIDE THE TREE
- preparing to run 'in-tree'
- ensure you have indra/newview/app_settings/static_*.db2 - if not, you'll find it in the 'binary-common' package.
$ cp ../../scripts/messages/message_template.msg app_settings/
- running it!
$ ( cd newview && LD_LIBRARY_PATH=../../libraries/i686-linux/lib_release_client:${LD_LIBRARY_PATH}:/usr/local/lib ./secondlife-i686-bin )
PACKAGING
Doesn't work 'out of the box' as an automated process right now.
OLD Ubuntu build notes - may be incorrect
Ubuntu 5.10 and higher uses a newer version of libc6 with a bug fix that breaks our codebase.
If you see errors of the form:
obj_dat.c:(.text+0x857): undefined reference to `__ctype_b'
...when you try to build our codebase then you need to enable the CTYPE_WORKAROUND. If you use 'make' or 'dmake', add the
following lines to your ~/.bashrc file:
export SIMULATOR_CPPFLAGS="-DCTYPE_WORKAROUND"
export RPCSERVER_CPPFLAGS="-DCTYPE_WORKAROUND"
export DATASERVER_CPPFLAGS="-DCTYPE_WORKAROUND"
export USERSERVER_CPPFLAGS="-DCTYPE_WORKAROUND"
export TEST_CPPFLAGS="-DCTYPE_WORKAROUND"
If you use 'scons', add the follow line to your ~/.bashrc file:
export SERVER_CPPFLAGS="-DCTYPE_WORKAROUND"
Source your ~/.bashrc, or open a new terminal, and build again.