[sldev] compiling the viewer

Max Okumoto okumoto at ucsd.edu
Fri Jun 8 16:46:41 PDT 2007


Skipped content of type multipart/alternative-------------- next part --------------
#
# @author Max Okumoto <okumoto at ucsd.edu>
#
# Makefile use to down load and build SecondLife binary from source files
# from website.
#
# If SVN_REV is set then use SVN instead of the slviewer-src-${SL_VER}.tar.gz
#
#SVN_REV	= http://svn.secondlife.com/svn/linden/release

BUILD		= releasefordownload

DISTFILES	= /local/home/linden/distfiles

SL_YEAR		= 2007
SL_MONTH	= 06
SL_DAY		= 02
SL_TYPE		= a
SL_VER		= ${SL_YEAR}${SL_MONTH}${SL_DAY}${SL_TYPE}
SL_VER		= 1-17-0-9
SL_FOO		=

SL_URL_PREFIX	= http://secondlife.com/developers/opensource/downloads/${SL_YEAR}/${SL_MONTH}

SL_SRC_TAR	= slviewer-src-${SL_FOO}${SL_VER}.tar.gz
SL_ART_ZIP	= slviewer-artwork-${SL_FOO}${SL_VER}.zip
SL_LIB_TAR	= slviewer-linux-libs-${SL_FOO}${SL_VER}.tar.gz

FMOD_MAJ	= 3
FMOD_MIN	= 75
FMOD_VER	= fmodapi${FMOD_MAJ}${FMOD_MIN}linux
FMOD_URL_PREFIX	= http://www.fmod.org/files

FMOD_SRC_TAR	= ${FMOD_VER}.tar.gz

##############################################################################
# 
##############################################################################
all: unpack update replace build

##############################################################################
# Get stuff
##############################################################################
get: ${DISTFILES}/${SL_SRC_TAR}
get: ${DISTFILES}/${SL_ART_ZIP}
get: ${DISTFILES}/${SL_LIB_TAR}

${DISTFILES}/${SL_LIB_TAR}:
	(cd ${DISTFILES}; wget ${SL_URL_PREFIX}/${SL_LIB_TAR})

${DISTFILES}/${SL_SRC_TAR}:
	(cd ${DISTFILES}; wget ${SL_URL_PREFIX}/${SL_SRC_TAR})

${DISTFILES}/${SL_ART_ZIP}:
	(cd ${DISTFILES}; wget ${SL_URL_PREFIX}/${SL_ART_ZIP})

${DISTFILES}/${FMOD_SRC_TAR}:
	(cd ${DISTFILES}; wget ${FMOD_URL_PREFIX}/${FMOD_SRC_TAR})

##############################################################################
# Unpack stuff
##############################################################################
unpack: linden/LICENSE-source.txt
unpack: linden/LICENSE-logos.txt
unpack: linden/LICENSE-libraries-linux.txt
unpack: linden/libraries/i686-linux/lib_release_client/libfmod-${FMOD_MAJ}.${FMOD_MIN}.so

linden/LICENSE-logos.txt: ${DISTFILES}/${SL_ART_ZIP}
	@echo 'Unpack slviewer artwork'
	@unzip -q ${DISTFILES}/${SL_ART_ZIP}
	@touch linden/LICENSE-logos.txt

linden/LICENSE-libraries-linux.txt: ${DISTFILES}/${SL_LIB_TAR}
	@echo 'Unpack slviewer libraries'
	@tar xf ${DISTFILES}/${SL_LIB_TAR}
	@touch linden/LICENSE-libraries-linux.txt

linden/LICENSE-source.txt: ${DISTFILES}/${SL_SRC_TAR}
	@if [ -n "${SVN_REV}" ]; then \
		echo 'Download slviewer src using SVN'; \
		svn co -q ${SVN_REV} linden; \
	else \
		echo 'Unpack slviewer src'; \
		tar xf ${DISTFILES}/${SL_SRC_TAR}; \
	fi
	@touch linden/LICENSE-source.txt

linden/libraries/i686-linux/lib_release_client/libfmod-${FMOD_MAJ}.${FMOD_MIN}.so: ${DISTFILES}/${FMOD_SRC_TAR}
	@echo 'Unpack FMOD library'
	@tar xf ${DISTFILES}/${FMOD_SRC_TAR}
	@(cd ${FMOD_VER}/api/inc; tar cf - .) |\
		(cd linden/libraries/i686-linux/include; tar xf -)
	@(cd ${FMOD_VER}/api; tar -cf - libfmod-${FMOD_MAJ}.${FMOD_MIN}.so) |\
		(cd linden/libraries/i686-linux/lib_release_client/; tar xf -)
	@rm -rf ${FMOD_VER}

##############################################################################
# Update stuff
##############################################################################
update:
	if [ -f linden/.svn/entries ]; then \
		(cd linden; svn update); \
	fi

##############################################################################
# Replase stuff
##############################################################################
replace: linden/indra/newview/libllkdu.so
replace: linden/indra/lib/libkdu_v42R.so
replace: linden/indra/newview/viewer_manifest.py.fixed

linden/indra/newview/libllkdu.so:
	cp linden/libraries/i686-linux/lib_release_client/libllkdu.so \
		linden/indra/newview/libllkdu.so

linden/indra/lib/libkdu_v42R.so:
	cp linden/libraries/i686-linux/lib_release_client/libkdu_v42R.so \
		linden/indra/lib/libkdu_v42R.so

linden/indra/newview/viewer_manifest.py.fixed:
	#
	# Enable faster jpg decode libraries.
	#
	sed \
		-e '/^#.*libllkdu\.so/s/^#//' \
		-e '/^#.*libkdu_v42R\.so/s/^#//' \
		linden/indra/newview/viewer_manifest.py > linden/indra/newview/viewer_manifest.py.fixed
	cp linden/indra/newview/viewer_manifest.py.fixed linden/indra/newview/viewer_manifest.py
foo:
	#
	# Don't package up google-profiling stuff (this can be removed when
	# Linden Labs adds these libaries to the tar file.
	#
	sed \
		-e '/^  *self.path("libtcmalloc\.so/s/^/#/' \
		-e '/^  *self.path("libstacktrace\.so/s/^/#/' \
		linden/indra/newview/viewer_manifest.py > linden/indra/newview/viewer_manifest.py.fixed
	cp linden/indra/newview/viewer_manifest.py.fixed linden/indra/newview/viewer_manifest.py

##############################################################################
# Build stuff
##############################################################################
build:
	date
	(cd linden/indra; scons DISTCC=no BTARGET=client MOZLIB=no BUILD=${BUILD})
	date
build-no-fmod:
	date
	(cd linden/indra; scons FMOD=no DISTCC=no BTARGET=client MOZLIB=no BUILD=${BUILD})
	date

##############################################################################
# Install stuff
##############################################################################
install:
	#bzcat linden/indra/newview/SecondLife_i686_1_16_0_5.tar.bz2 | (cd /opt; tar xf -)
	bzcat linden/indra/newview/SecondLife_i686_1_17_0_9.tar.bz2 | (cd /opt; tar xf -)

##############################################################################
# Clean stuff
##############################################################################
clean:
	rm -rf linden

##############################################################################
# Utilities
##############################################################################
tags:
	find linden -type f -name '*.cpp' -exec ctags -e --append {} \;
-------------- next part --------------
# @file secondlife-i686.supp
# @brief Valgrind suppressions for Linux i686 viewer.
#
# Copyright (c) 2000-$CurrentYear$, Linden Research, Inc.
# $License$
#
# This is a Valgrind suppression file for use on the viewer.
#
# Hints for most successful use of valgrind:
#
# - If your distro comes with library packages that contain debug info
#   (Fedora calls these debuginfo packages), install them.
# - Inside the SConstruct script, disable linking against tcmalloc.
#   Valgrind and tcmalloc don't get along.
# - Delete the copy of libstdc++.so.6 that is bundled with the viewer
#   (if you have one), so that the viewer will use the system's
#   libstdc++.
# - After you build the viewer, replace the stripped
#   do-not-directly-run-secondlife-bin binary with an unstripped copy.

# Mozilla noise.

{
   Cond:mozilla-runtime/*.so
   Memcheck:Cond
   obj:*/mozilla-runtime-*/*.so
}

{
   Value4:mozilla-runtime/*.so
   Memcheck:Value4
   obj:*/mozilla-runtime-*/*.so
}

{
   Cond:mozilla-runtime/*/*.so
   Memcheck:Cond
   obj:*/mozilla-runtime-*/*/*.so
}

{
   Value4:mozilla-runtime/*/*.so
   Memcheck:Value4
   obj:*/mozilla-runtime-*/*/*.so
}

{
   Cond:mozilla-runtime/libmozjs.so
   Memcheck:Cond
   obj:*/libmozjs.so
}

{
   Cond:mozilla-runtime/libxul
   Memcheck:Cond
   obj:*/libxul.so
}

{
   Value4:mozilla-runtime/libxul
   Memcheck:Value4
   obj:*/libxul.so
}

# libcurl badness.

{
   Cond:libcurl/inflate/Curl_unencode_gzip_write
   Memcheck:Cond
   fun:inflate
   fun:inflate_stream
   fun:Curl_unencode_gzip_write
}
{
   Cond:libcurl/ares_mkquery/Curl_getaddrinfo
   Memcheck:Cond
   fun:ares_mkquery
   fun:ares_query
   fun:ares_search
   fun:next_lookup
   fun:Curl_getaddrinfo
}

# libdl business.

{
   Cond:libdl/_dl_relocate_object
   Memcheck:Cond
   fun:_dl_relocate_object
}

# X11 fun.

{
   Param:X11/_X11TransSocketWritev/writev/vector
   Memcheck:Param
   writev(vector[...])
   fun:writev
   fun:_X11TransSocketWritev
}

{
   Param:X11/_X11TransWrite/write/buf
   Memcheck:Param
   write(buf)
   obj:/lib/libc-2.6.so
   fun:_X11TransWrite
}

# OpenSSL stuff.

{
   Value4:libcrypto
   Memcheck:Value4
   obj:*/libcrypto.so.0.9*
}

{
   Cond:libcrypto
   Memcheck:Cond
   obj:*/libcrypto.so.0.9*
}

{
   Value4:libssl
   Memcheck:Value4
   obj:*/libssl.so.0.9*
}

{
   Cond:libcrypto
   Memcheck:Cond
   obj:*/libssl.so.0.9*
}

# NVIDIA driver brokenness.

{
   Addr4:NVIDIA/libGL
   Memcheck:Addr4
   obj:/usr/lib/libGL.so.1.0.*
}

{
   Value4:NVIDIA/libGL
   Memcheck:Value4
   obj:/usr/lib/libGL.so.1.0.*
}

{
   Cond:NVIDIA/libGL
   Memcheck:Cond
   obj:/usr/lib/libGL.so.1.0.*
}

{
   Value4:NVIDIA/libGLcore
   Memcheck:Value4
   obj:/usr/lib/libGLcore.so.1.0.*
}

{
   Cond:NVIDIA/libGLcore
   Memcheck:Cond
   obj:/usr/lib/libGLcore.so.1.0.*
}

{
   Param:NVIDIA/ioctl
   Memcheck:Param
   ioctl(generic)
   fun:ioctl
   fun:_nv000130gl
}



More information about the SLDev mailing list