Difference between revisions of "Compiling the viewer (FreeBSD)"

From Second Life Wiki
Jump to navigation Jump to search
(Brief Overview of Compilation in FreeBSD)
 
Line 13: Line 13:
A number of small problems arose during the compilation process. A list of the changes are given below. These changes were found by untarring the original source in a directory called /tmp/virgin. Then a perl script was used to compare every file using "diff -C 5". The output from the differences is given below.
A number of small problems arose during the compilation process. A list of the changes are given below. These changes were found by untarring the original source in a directory called /tmp/virgin. Then a perl script was used to compare every file using "diff -C 5". The output from the differences is given below.


<code>
*** ./linden/indra/SConstruct Sat Feb 10 00:49:19 2007
*** ./linden/indra/SConstruct Sat Feb 10 00:49:19 2007
--- /tmp/linden/indra/SConstruct Tue Feb 13 13:38:58 2007
--- /tmp/linden/indra/SConstruct Tue Feb 13 13:38:58 2007
Line 849: Line 850:
   extern BOOL gPingInterpolate;
   extern BOOL gPingInterpolate;
   extern F32 gMinObjectDistance;
   extern F32 gMinObjectDistance;
<code>

Revision as of 14:44, 14 February 2007

Compiling the Viewer in FreeBSD

The viewer has been compiled under FreeBSD 6.2. In this case, the viewer source and the artwork file were saved in /tmp, slviewer-src-FL-1.13.3.57876.tar.gz and slviewer-artwork-FL-1.13.3.57876.zip. The directions were followed for compiling under linux. All of the libraries were available under the ports system with the exception of xmlrpc-epi. In this case the source files were saved in /tmp/linden/xmlrpc-epi-0.51 where they were compiled. There was an additional problem with the openjpeg port. One of the include files was not available, so the sources from /usr/ports/distfiles were untarred into the directory /tmp/linden/OpenJPEG. A symbolic link, /tmp/linden/OpenJPEG/include, was created that points to /tmp/linden/OpenJPEG/dist.

The path for the dynamic libraries must be set:

export LD_LIBRARY_PATH=../../libraries/i686-linux/lib_release_client:/usr/local/lib:/tmp/linden/xmlrpc-epi-0.51/src/.libs

Then the compilation was started using the command:

scons DISTCC=no BTARGET=client BUILD=release

A number of small problems arose during the compilation process. A list of the changes are given below. These changes were found by untarring the original source in a directory called /tmp/virgin. Then a perl script was used to compare every file using "diff -C 5". The output from the differences is given below.

      • ./linden/indra/SConstruct Sat Feb 10 00:49:19 2007

--- /tmp/linden/indra/SConstruct Tue Feb 13 13:38:58 2007

      • 21,30 ****

--- 21,31 ----

 import glob
 
 platform = sys.platform
 if platform == 'linux2':
 	platform = 'linux'

+ platform = 'linux'

 ######################
 # GET VERSION        #
 ######################
 
      • 114,123 ****

--- 115,135 ----

 		./llcommon ./llmath ./llwindow ./llaudio ./llcharacter
 		./lldatabase ./llhavok ./llimage ./llinventory ./llmedia ./llmessage
 		./llprimitive ./llrender ./llscene ./llui ./llvfs ./llwindow
 		./llxml ./lscript
 		../libraries/include

+ /usr/local/include + /usr/local/include/boost + /tmp/linden/OpenJPEG + /usr/local/include/pango-1.0 + /usr/local/include/atk-1.0 + /usr/local/include/glib-2.0 + /usr/local/include/cairo + /usr/X11R6/include + /usr/local/include/freetype2 + /usr/local/include/gtk-2.0 + /tmp/linden/xmlrpc-epi-0.51

 		../libraries/include/havok
 		""" +
 		'../libraries/' + system_str + '/include' )
 
 	client_external_libs = []
      • 178,199 ****
 	if platform == 'linux':
 		# Linux-only flags
 		flags += '-DLL_LINUX=1 '
 		if build_target == 'client':

! flags += '-DAPPID=secondlife -DLL_SDL=1 -DLL_X11=1 '

 			flags += '-DLL_GTK=1 '

! client_external_libs += [ 'gtk-x11-2.0', 'elfio' ]

 			include_dirs += [ '../libraries/' + system_str + '/include/gtk-2.0' ]
 			include_dirs += [ '../libraries/' + system_str + '/include/glib-2.0']
 			include_dirs += [ '../libraries/' + system_str + '/include/pango-1.0' ]
 			include_dirs += [ '../libraries/' + system_str + '/include/atk-1.0' ]
 			include_dirs += [ '../libraries/' + system_str + '/include/ELFIO' ]
 			include_dirs += [ '../libraries/' + system_str + '/include/llfreetype2' ]
 	else:
 		# Mac-only flags

! flags += '-x c++ -arch ppc -pipe -Wno-trigraphs -fpascal-strings -faltivec -fasm-blocks -g -O2 -fmessage-length=0 -mtune=G4 -Wno-deprecated-declarations -Wno-invalid-offsetof -mmacosx-version-min=10.3 -DLL_DARWIN=1 -Wmost -Wno-sign-compare -Wno-switch -fpch-preprocess -F./newview/build/Deployment -fconstant-cfstrings -ffor-scope -Wno-reorder -isysroot /Developer/SDKs/MacOSX10.3.9.sdk '

 	### Build type-specific flags ###
 
 	debug_opts = flags + '-fno-inline -O0 -D_DEBUG -DLL_DEBUG=1 '
 	release_opts = flags + '-O2 -DNDEBUG -DLL_RELEASE=1 '

--- 190,212 ----

 	if platform == 'linux':
 		# Linux-only flags
 		flags += '-DLL_LINUX=1 '
 		if build_target == 'client':

! flags += '-DAPPID=secondlife -DLL_SDL=1 -DLL_FMOD=0 -DLL_X11=1 '

 			flags += '-DLL_GTK=1 '

! # client_external_libs += [ 'gtk-x11-2.0', 'elfio' ] ! client_external_libs += [ 'gtk-x11-2.0', 'ELFIO' ]

 			include_dirs += [ '../libraries/' + system_str + '/include/gtk-2.0' ]
 			include_dirs += [ '../libraries/' + system_str + '/include/glib-2.0']
 			include_dirs += [ '../libraries/' + system_str + '/include/pango-1.0' ]
 			include_dirs += [ '../libraries/' + system_str + '/include/atk-1.0' ]
 			include_dirs += [ '../libraries/' + system_str + '/include/ELFIO' ]
 			include_dirs += [ '../libraries/' + system_str + '/include/llfreetype2' ]
 	else:
 		# Mac-only flags

! flags += ' '

 	### Build type-specific flags ###
 
 	debug_opts = flags + '-fno-inline -O0 -D_DEBUG -DLL_DEBUG=1 '
 	release_opts = flags + '-O2 -DNDEBUG -DLL_RELEASE=1 '
      • 202,212 ****
 	################
 	# ENVIRONMENT  #
 	################
 

! gcc_bin = 'g++-3.4'

 	# If you strip more aggressively than -S then the quality of crash-
 	# logger backtraces deteriorates.
 	strip_cmd = 'strip -S -o $TARGET $SOURCE'
 
 	# hidesyms_cmd is something which copies an executable while 'hiding'

--- 215,226 ----

 	################
 	# ENVIRONMENT  #
 	################
 

! # gcc_bin = 'g++-3.4' ! gcc_bin = 'g++'

 	# If you strip more aggressively than -S then the quality of crash-
 	# logger backtraces deteriorates.
 	strip_cmd = 'strip -S -o $TARGET $SOURCE'
 
 	# hidesyms_cmd is something which copies an executable while 'hiding'
      • 219,229 ****
 		hidesyms_cmd = 'objcopy --keep-global-symbols ' + exposed_symbols_file + ' $SOURCE $TARGET'
 	else:
 		hidesyms_cmd = 'cp -f $SOURCE $TARGET'
 
 	if build_target != 'client':

! gcc_bin = 'g++-3.3'

 	if arch == 'x86_64':
 		gcc_bin = '/opt/crosstool/gcc-4.0.2-glibc-2.3.6/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-gcc'
 		strip_cmd = '/opt/crosstool/gcc-4.0.2-glibc-2.3.6/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/bin/strip -S -o $TARGET $SOURCE'
 

--- 233,244 ----

 		hidesyms_cmd = 'objcopy --keep-global-symbols ' + exposed_symbols_file + ' $SOURCE $TARGET'
 	else:
 		hidesyms_cmd = 'cp -f $SOURCE $TARGET'
 
 	if build_target != 'client':

! #gcc_bin = 'g++-3.3' ! gcc_bin = 'g++'

 	if arch == 'x86_64':
 		gcc_bin = '/opt/crosstool/gcc-4.0.2-glibc-2.3.6/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-gcc'
 		strip_cmd = '/opt/crosstool/gcc-4.0.2-glibc-2.3.6/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/bin/strip -S -o $TARGET $SOURCE'
 
      • 232,242 ****
 	if enable_distcc == 'yes':
 		compiler = 'distcc ' + gcc_bin
 
 	base_env = Environment(CXX = compiler,
 			CPPPATH = include_dirs,

! LIBPATH = [lib_dir] + [system_lib_dir],

 			LINKFLAGS = system_link_flags + '--no-keep-memory --reduce-memory-overheads ' )
 
 	### Environments for various build types ###
 
 	env = base_env.Copy(CPPFLAGS = releasefordownload_opts)

--- 247,257 ----

 	if enable_distcc == 'yes':
 		compiler = 'distcc ' + gcc_bin
 
 	base_env = Environment(CXX = compiler,
 			CPPPATH = include_dirs,

! LIBPATH = [lib_dir] + [system_lib_dir] + ['/usr/local/lib'] +['/tmp/linden/xmlrpc-epi-0.51/src/.libs'] + ['/usr/X11R6/lib'],

 			LINKFLAGS = system_link_flags + '--no-keep-memory --reduce-memory-overheads ' )
 
 	### Environments for various build types ###
 
 	env = base_env.Copy(CPPFLAGS = releasefordownload_opts)
      • 372,382 ****
 		if platform == 'linux':
 			#############################
 			# BUILD LINUX_CRASH_LOGGER  #
 			#############################
 			output_crashlogger_bin = 'linux_crash_logger/linux-crash-logger-' + arch + '-bin'

! external_libs = net_external_libs + [ 'db-4.2', 'gtk-x11-2.0' ]

 			external_libs.remove('cares')
 			internal_libs = [ 'llvfs', 'llmath', 'llcommon' ]
 			create_executable(output_crashlogger_bin + '-globalsyms', 'linux_crash_logger', internal_libs + external_libs)
 			env.Command(output_crashlogger_bin, output_crashlogger_bin + '-globalsyms', hidesyms_cmd)
 

--- 387,398 ----

 		if platform == 'linux':
 			#############################
 			# BUILD LINUX_CRASH_LOGGER  #
 			#############################
 			output_crashlogger_bin = 'linux_crash_logger/linux-crash-logger-' + arch + '-bin'

! #external_libs = net_external_libs + [ 'db-4.2', 'gtk-x11-2.0' ] ! external_libs = net_external_libs + [ 'db41', 'gtk-x11-2.0' ]

 			external_libs.remove('cares')
 			internal_libs = [ 'llvfs', 'llmath', 'llcommon' ]
 			create_executable(output_crashlogger_bin + '-globalsyms', 'linux_crash_logger', internal_libs + external_libs)
 			env.Command(output_crashlogger_bin, output_crashlogger_bin + '-globalsyms', hidesyms_cmd)
 
      • 391,401 ****
 		##################
 		# BUILD NEWVIEW  #
 		##################
 		output_bin = 'newview/secondlife-' + arch + '-bin'
 

! external_libs = client_external_libs + common_external_libs + [ 'freetype', 'jpeg', 'SDL', 'GL', 'GLU', 'ogg', 'vorbisenc', 'vorbisfile', 'vorbis', 'fmod-3.75', 'db-4.2', 'openjpeg' ]

 		external_libs.remove('cares')
 
 		internal_libs = [ 'lscript', 'llwindow', 'llrender', 'llprimitive',
 				 'llmedia', 'llinventory', 
 				 'llimage',  'llimagej2coj', 

--- 407,418 ----

 		##################
 		# BUILD NEWVIEW  #
 		##################
 		output_bin = 'newview/secondlife-' + arch + '-bin'
 

! #external_libs = client_external_libs + common_external_libs + [ 'freetype', 'jpeg', 'SDL', 'GL', 'GLU', 'ogg', 'vorbisenc', 'vorbisfile', 'vorbis', 'fmod-3.75', 'db-4.2', 'openjpeg' ] ! external_libs = client_external_libs + common_external_libs + [ 'freetype', 'jpeg', 'SDL', 'GL', 'GLU', 'ogg', 'vorbisenc', 'vorbisfile', 'vorbis', 'db41', 'openjpeg' ]

 		external_libs.remove('cares')
 
 		internal_libs = [ 'lscript', 'llwindow', 'llrender', 'llprimitive',
 				 'llmedia', 'llinventory', 
 				 'llimage',  'llimagej2coj', 
      • ./linden/indra/llcommon/llpagemem.h Sat Feb 10 00:49:20 2007

--- /tmp/linden/indra/llcommon/llpagemem.h Tue Feb 13 10:51:48 2007

      • 25,35 ****
  */
 #ifndef LL_LLPAGEMEM_H
 #define LL_LLPAGEMEM_H
 
 #if !LL_DARWIN

! #include "malloc.h"

 #endif
 
 #include "llrand.h"
 
 

--- 25,36 ----

  */
 #ifndef LL_LLPAGEMEM_H
 #define LL_LLPAGEMEM_H
 
 #if !LL_DARWIN

! /* #include "malloc.h" */ ! #include <stdlib.h>

 #endif
 
 #include "llrand.h"
 
 
      • ./linden/indra/llcommon/llpreprocessor.h Sat Feb 10 00:49:20 2007

--- /tmp/linden/indra/llcommon/llpreprocessor.h Tue Feb 13 08:40:00 2007

      • 30,40 ****
 #define LLPREPROCESSOR_H
 
 // Figure out endianness of platform
 #ifdef LL_LINUX
 #define __ENABLE_WSTRING

! #include <endian.h>

 #endif	//	LL_LINUX
 
 #if (defined(LL_WINDOWS) || (defined(LL_LINUX) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || (defined(LL_DARWIN) && defined(__LITTLE_ENDIAN__)))
 #define LL_LITTLE_ENDIAN 1
 #else

--- 30,40 ----

 #define LLPREPROCESSOR_H
 
 // Figure out endianness of platform
 #ifdef LL_LINUX
 #define __ENABLE_WSTRING

! /* #include <endian.h> */

 #endif	//	LL_LINUX
 
 #if (defined(LL_WINDOWS) || (defined(LL_LINUX) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || (defined(LL_DARWIN) && defined(__LITTLE_ENDIAN__)))
 #define LL_LITTLE_ENDIAN 1
 #else
      • ./linden/indra/llcommon/llsdserialize_xml.cpp Sat Feb 10 00:49:20 2007

--- /tmp/linden/indra/llcommon/llsdserialize_xml.cpp Tue Feb 13 08:41:26 2007

      • 33,43 ****
 #include "apr-1/apr_base64.h"
 
 extern "C"
 {

! #include "expat/expat.h"

 }
 
 /**
  * LLSDXMLFormatter
  */

--- 33,43 ----

 #include "apr-1/apr_base64.h"
 
 extern "C"
 {

! #include "expat.h"

 }
 
 /**
  * LLSDXMLFormatter
  */
      • ./linden/indra/llcommon/llsys.cpp Sat Feb 10 00:49:20 2007

--- /tmp/linden/indra/llcommon/llsys.cpp Tue Feb 13 08:52:44 2007

      • 28,47 ****
 #include "linden_common.h"
 
 #include "llsys.h"
 
 #include <iostream>

! #include <zlib/zlib.h>

 #include "processor.h"
 
 #if LL_WINDOWS
 #	define WIN32_LEAN_AND_MEAN
 #	include <winsock2.h>
 #	include <windows.h>
 #elif LL_DARWIN

! # include <sys/sysctl.h> ! # include <sys/utsname.h>

 #elif LL_LINUX
 #	include <sys/utsname.h>
 const char MEMINFO_FILE[] = "/proc/meminfo";
 const char CPUINFO_FILE[] = "/proc/cpuinfo";
 #endif

--- 28,47 ----

 #include "linden_common.h"
 
 #include "llsys.h"
 
 #include <iostream>

! #include <zlib.h>

 #include "processor.h"
 
 #if LL_WINDOWS
 #	define WIN32_LEAN_AND_MEAN
 #	include <winsock2.h>
 #	include <windows.h>
 #elif LL_DARWIN

! include <sys/sysctl.h> ! include <sys/utsname.h>

 #elif LL_LINUX
 #	include <sys/utsname.h>
 const char MEMINFO_FILE[] = "/proc/meminfo";
 const char CPUINFO_FILE[] = "/proc/cpuinfo";
 #endif
      • 393,403 ****
 {
 }
 
 #if LL_LINUX
 #include <unistd.h>

! #include <sys/sysinfo.h>

 #endif
 
 U32 LLMemoryInfo::getPhysicalMemory() const
 {
 #if LL_WINDOWS

--- 393,404 ----

 {
 }
 
 #if LL_LINUX
 #include <unistd.h>

! /* #include <sys/sysinfo.h> */ ! #include <sys/sysctl.h>

 #endif
 
 U32 LLMemoryInfo::getPhysicalMemory() const
 {
 #if LL_WINDOWS
      • 405,426 ****
 	state.dwLength = sizeof(state);
 	GlobalMemoryStatus(&state);
 
 	return (U32)state.dwTotalPhys;
 

! #elif LL_DARWIN

 	// This might work on Linux as well.  Someone check...
 	unsigned int phys = 0;
 	int mib[2] = { CTL_HW, HW_PHYSMEM };
 
 	size_t len = sizeof(phys);	
 	sysctl(mib, 2, &phys, &len, NULL, 0);
 	
 	return phys;
 #elif LL_LINUX
 

! return getpagesize() * get_phys_pages();

 #else
 	return 0;
 
 #endif

--- 406,435 ----

 	state.dwLength = sizeof(state);
 	GlobalMemoryStatus(&state);
 
 	return (U32)state.dwTotalPhys;
 

! #elif LL_DARWIN

 	// This might work on Linux as well.  Someone check...
 	unsigned int phys = 0;
 	int mib[2] = { CTL_HW, HW_PHYSMEM };
 
 	size_t len = sizeof(phys);	
 	sysctl(mib, 2, &phys, &len, NULL, 0);
 	
 	return phys;
 #elif LL_LINUX

+ // This might work on Linux as well. Someone check... + unsigned int phys = 0; + int mib[2] = { CTL_HW, HW_PHYSMEM }; + + size_t len = sizeof(phys); + sysctl(mib, 2, &phys, &len, NULL, 0); + + return phys;

! /* return getpagesize() * get_phys_pages(); */

 #else
 	return 0;
 
 #endif
      • ./linden/indra/llimage/llimagejpeg.h Sat Feb 10 00:49:20 2007

--- /tmp/linden/indra/llimage/llimagejpeg.h Tue Feb 13 09:02:04 2007

      • 31,43 ****
 #include <setjmp.h>
 
 #include "llimage.h"
 
 extern "C" {

! #include "jpeglib/jinclude.h" ! #include "jpeglib/jpeglib.h" ! #include "jpeglib/jerror.h"

 }
 
 class LLImageJPEG : public LLImageFormatted
 {
 protected:

--- 31,43 ----

 #include <setjmp.h>
 
 #include "llimage.h"
 
 extern "C" {

! #include "jinclude.h" ! #include "jpeglib.h" ! #include "jerror.h"

 }
 
 class LLImageJPEG : public LLImageFormatted
 {
 protected:
      • ./linden/indra/llmath/lluuid.cpp Sat Feb 10 00:49:21 2007

--- /tmp/linden/indra/llmath/lluuid.cpp Tue Feb 13 08:53:49 2007

      • 606,616 ****
 #include <net/if.h>
 #define HAVE_NETINET_IN_H
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #if !LL_DARWIN

! #include <linux/sockios.h>

 #endif
 #endif
 
 // static
 S32 LLUUID::getNodeID(unsigned char *node_id)

--- 606,616 ----

 #include <net/if.h>
 #define HAVE_NETINET_IN_H
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #if !LL_DARWIN

! /* #include <linux/sockios.h> */

 #endif
 #endif
 
 // static
 S32 LLUUID::getNodeID(unsigned char *node_id)
      • ./linden/indra/llmessage/message.h Sat Feb 10 00:49:22 2007

--- /tmp/linden/indra/llmessage/message.h Tue Feb 13 08:55:29 2007

      • 32,42 ****
 #include <stdio.h>
 #include <map>
 #include <set>
 
 #if LL_LINUX

! #include <endian.h>

 #include <netinet/in.h>
 #endif
 
 #if LL_WINDOWS
 #include "winsock2.h" // htons etc.

--- 32,42 ----

 #include <stdio.h>
 #include <map>
 #include <set>
 
 #if LL_LINUX

! #include <sys/endian.h>

 #include <netinet/in.h>
 #endif
 
 #if LL_WINDOWS
 #include "winsock2.h" // htons etc.
      • ./linden/indra/llmessage/llhttpassetstorage.cpp Sat Feb 10 00:49:22 2007

--- /tmp/linden/indra/llmessage/llhttpassetstorage.cpp Tue Feb 13 08:58:34 2007

      • 32,42 ****
 #include "indra_constants.h"
 #include "llvfile.h"
 #include "llvfs.h"
 

! #include "zlib/zlib.h"

 const F32 MAX_PROCESSING_TIME = 0.005f;
 const S32 CURL_XFER_BUFFER_SIZE = 65536;
 // Try for 30 minutes for now.
 const F32 GET_URL_TO_FILE_TIMEOUT = 1800.0f;

--- 32,42 ----

 #include "indra_constants.h"
 #include "llvfile.h"
 #include "llvfs.h"
 

! #include "zlib.h"

 const F32 MAX_PROCESSING_TIME = 0.005f;
 const S32 CURL_XFER_BUFFER_SIZE = 65536;
 // Try for 30 minutes for now.
 const F32 GET_URL_TO_FILE_TIMEOUT = 1800.0f;
      • ./linden/indra/llrender/llfont.cpp Sat Feb 10 00:49:23 2007

--- /tmp/linden/indra/llrender/llfont.cpp Tue Feb 13 09:25:00 2007

      • 29,56 ****
 #include "llfont.h"
 
 // Freetype stuff
 #if LL_LINUX   // I had to do some work to avoid the system-installed FreeType headers... --ryan.

! #include "llfreetype2/freetype/ft2build.h"

 #else
 #include <ft2build.h>
 #endif
 
 // For some reason, this won't work if it's not wrapped in the ifdef
 #ifdef FT_FREETYPE_H

! #include FT_FREETYPE_H

 #endif
 
 #include "llerror.h"
 #include "llimage.h"
 //#include "llimagej2c.h"
 #include "llmath.h"	// Linden math
 #include "llstring.h"
 //#include "imdebug.h"
 

! FT_Render_Mode gFontRenderMode = FT_RENDER_MODE_NORMAL;

 LLFontManager *gFontManagerp = NULL;
 
 FT_Library gFTLibrary = NULL;
 

--- 29,58 ----

 #include "llfont.h"
 
 // Freetype stuff
 #if LL_LINUX   // I had to do some work to avoid the system-installed FreeType headers... --ryan.

! /* #include "llfreetype2/freetype/ft2build.h" */ ! #include <ft2build.h>

 #else
 #include <ft2build.h>
 #endif
 
 // For some reason, this won't work if it's not wrapped in the ifdef
 #ifdef FT_FREETYPE_H

! /* #include FT_FREETYPE_H */ ! #include <freetype/freetype.h>

 #endif
 
 #include "llerror.h"
 #include "llimage.h"
 //#include "llimagej2c.h"
 #include "llmath.h"	// Linden math
 #include "llstring.h"
 //#include "imdebug.h"
 

! FT_Render_Mode_ gFontRenderMode = FT_RENDER_MODE_NORMAL;

 LLFontManager *gFontManagerp = NULL;
 
 FT_Library gFTLibrary = NULL;
 
      • ./linden/indra/llxml/llxmlnode.h Sat Feb 10 00:49:24 2007

--- /tmp/linden/indra/llxml/llxmlnode.h Tue Feb 13 09:02:45 2007

      • 27,37 ****
 #ifndef LL_LLXMLNODE_H
 #define LL_LLXMLNODE_H
 
 #define XML_STATIC

! #include "expat/expat.h"

 #include <map>
 
 #include "indra_constants.h"
 #include "llmemory.h"
 #include "llthread.h"

--- 27,37 ----

 #ifndef LL_LLXMLNODE_H
 #define LL_LLXMLNODE_H
 
 #define XML_STATIC

! #include "expat.h"

 #include <map>
 
 #include "indra_constants.h"
 #include "llmemory.h"
 #include "llthread.h"
      • ./linden/indra/llxml/llxmlparser.h Sat Feb 10 00:49:24 2007

--- /tmp/linden/indra/llxml/llxmlparser.h Tue Feb 13 09:04:17 2007

      • 27,37 ****
 #ifndef LL_LLXMLPARSER_H
 #define LL_LLXMLPARSER_H
 
 #define XML_STATIC

! #include "expat/expat.h"

 class LLXmlParser
 {
 public:
 	LLXmlParser();

--- 27,37 ----

 #ifndef LL_LLXMLPARSER_H
 #define LL_LLXMLPARSER_H
 
 #define XML_STATIC

! #include "expat.h"

 class LLXmlParser
 {
 public:
 	LLXmlParser();
      • ./linden/indra/linux_crash_logger/linux_crash_logger.cpp Sat Feb 10 00:49:25 2007

--- /tmp/linden/indra/linux_crash_logger/linux_crash_logger.cpp Tue Feb 13 10:02:37 2007

      • 454,464 ****
 //		llinfos << "File " << mFilename << " is present..." << llendl;
 
 		if(!gCrashInPreviousExec && isCrashLog)
 		{
 			// Make sure the file isn't too old.

! double age = difftime(gLaunchTime, stat_data.st_mtim.tv_sec);

 //			llinfos << "age is " << age << llendl;
 
 			if(age > 60.0)
 			{

--- 454,465 ----

 //		llinfos << "File " << mFilename << " is present..." << llendl;
 
 		if(!gCrashInPreviousExec && isCrashLog)
 		{
 			// Make sure the file isn't too old.

! // double age = difftime(gLaunchTime, stat_data.st_mtime.tv_sec); ! double age = difftime(gLaunchTime, stat_data.st_mtime);

 //			llinfos << "age is " << age << llendl;
 
 			if(age > 60.0)
 			{
      • ./linden/indra/linux_crash_logger/linux_crash_logger.cpp Sat Feb 10 00:49:25 2007

--- /tmp/linden/indra/linux_crash_logger/linux_crash_logger.cpp Tue Feb 13 10:02:37 2007

      • 454,464 ****
 //		llinfos << "File " << mFilename << " is present..." << llendl;
 
 		if(!gCrashInPreviousExec && isCrashLog)
 		{
 			// Make sure the file isn't too old.

! double age = difftime(gLaunchTime, stat_data.st_mtim.tv_sec);

 //			llinfos << "age is " << age << llendl;
 
 			if(age > 60.0)
 			{

--- 454,465 ----

 //		llinfos << "File " << mFilename << " is present..." << llendl;
 
 		if(!gCrashInPreviousExec && isCrashLog)
 		{
 			// Make sure the file isn't too old.

! // double age = difftime(gLaunchTime, stat_data.st_mtime.tv_sec); ! double age = difftime(gLaunchTime, stat_data.st_mtime);

 //			llinfos << "age is " << age << llendl;
 
 			if(age > 60.0)
 			{
      • ./linden/indra/newview/lltexturefetch.h Sat Feb 10 00:49:29 2007

--- /tmp/linden/indra/newview/lltexturefetch.h Tue Feb 13 13:10:15 2007

      • 97,102 ****
 	queue_t mNetworkQueue;
 
 	LLFrameTimer mNetworkTimer;
 };
 

! #endif LL_LLTEXTUREFETCH_H --- 97,102 ----

 	queue_t mNetworkQueue;
 
 	LLFrameTimer mNetworkTimer;
 };
 

! #endif /* LL_LLTEXTUREFETCH_H */

      • ./linden/indra/newview/viewer.cpp Sat Feb 10 00:49:30 2007

--- /tmp/linden/indra/newview/viewer.cpp Tue Feb 13 13:22:51 2007

      • 68,78 ****
   #	include <netinet/in.h>
   #	include <arpa/inet.h>	// inet_ntoa()
 
   #if LL_LINUX
   #	include <dlfcn.h>		// RTLD_LAZY

! # include <execinfo.h> // backtrace - glibc only

   #define LL_ELFBIN 1
   #     if LL_ELFBIN
   #          include <cxxabi.h>         // for symbol demangling
   #          include "ELFIO.h"          // for better backtraces
   #     endif // LL_ELFBIN

--- 68,78 ----

   #	include <netinet/in.h>
   #	include <arpa/inet.h>	// inet_ntoa()
 
   #if LL_LINUX
   #	include <dlfcn.h>		// RTLD_LAZY

! // # include <execinfo.h> // backtrace - glibc only

   #define LL_ELFBIN 1
   #     if LL_ELFBIN
   #          include <cxxabi.h>         // for symbol demangling
   #          include "ELFIO.h"          // for better backtraces
   #     endif // LL_ELFBIN
      • 2252,2263 ****
 	size_t size;
 	char **strings;
 	size_t i;
 	BOOL success = FALSE;
 

! size = backtrace(array, MAX_STACK_TRACE_DEPTH); ! strings = backtrace_symbols(array, size);

 	std::string strace_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log");
 	llinfos << "Opening stack trace file " << strace_filename << llendl;
 	FILE* StraceFile = LLFile::fopen(strace_filename.c_str(), "w");		/* Flawfinder: ignore */
         if (!StraceFile)

--- 2252,2263 ----

 	size_t size;
 	char **strings;
 	size_t i;
 	BOOL success = FALSE;
 

! size = 0; // backtrace(array, MAX_STACK_TRACE_DEPTH); ! strings = NULL; //backtrace_symbols(array, size);

 	std::string strace_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log");
 	llinfos << "Opening stack trace file " << strace_filename << llendl;
 	FILE* StraceFile = LLFile::fopen(strace_filename.c_str(), "w");		/* Flawfinder: ignore */
         if (!StraceFile)
      • 2303,2314 ****
 		llinfos << "Opening stack trace file " << strace_filename << " failed. Using stderr." << llendl;
 		StraceFile = stderr;
 	}
 
 	// get backtrace address list and basic symbol info

! btsize = backtrace(array, MAX_STACK_TRACE_DEPTH); ! strings = backtrace_symbols(array, btsize);

 	// create ELF reader for our app binary
 	IELFI* pReader;
 	const IELFISection* pSec = NULL;
 	IELFISymbolTable* pSymTbl = 0;

--- 2303,2314 ----

 		llinfos << "Opening stack trace file " << strace_filename << " failed. Using stderr." << llendl;
 		StraceFile = stderr;
 	}
 
 	// get backtrace address list and basic symbol info

! btsize = 0; // backtrace(array, MAX_STACK_TRACE_DEPTH); ! strings = NULL; // backtrace_symbols(array, btsize);

 	// create ELF reader for our app binary
 	IELFI* pReader;
 	const IELFISection* pSec = NULL;
 	IELFISymbolTable* pSymTbl = 0;
      • ./linden/indra/newview/llviewerobjectlist.cpp Sat Feb 10 00:49:33 2007

--- /tmp/linden/indra/newview/llviewerobjectlist.cpp Tue Feb 13 12:58:13 2007

      • 58,68 ****
 #include "lltoolpie.h"
 #include "llkeyboard.h"
 #include "u64.h"
 #include "llviewerimagelist.h"
 #include "lldatapacker.h"

! #include <zlib/zlib.h>

 #include "object_flags.h"
 
 extern BOOL gVelocityInterpolate;
 extern BOOL gPingInterpolate;
 extern F32 gMinObjectDistance;

--- 58,69 ----

 #include "lltoolpie.h"
 #include "llkeyboard.h"
 #include "u64.h"
 #include "llviewerimagelist.h"
 #include "lldatapacker.h"

! /* #include <zlib/zlib.h> */ ! #include <zlib.h>

 #include "object_flags.h"
 
 extern BOOL gVelocityInterpolate;
 extern BOOL gPingInterpolate;
 extern F32 gMinObjectDistance;