1 2Building Firefox-2.0.0.12 from source, for testing Helgrind 3----------------------------------------------------------- 4 5wget 6ftp://ftp.mozilla.org/pub/firefox/releases/2.0.0.12/source/firefox-2.0.0.12-source.tar.bz2 7 8bzip2 -dc firefox-2.0.0.12-source.tar.bz2 | tar xvf - 9 10mv mozilla firefox-2.0.0.12 11 12mkdir InstFirefox20012 13export XYZZYFOOBAR=`pwd`/InstFirefox20012 14 15cd firefox-2.0.0.12 16 17./configure --prefix=$XYZZYFOOBAR --enable-application=browser \ 18 --enable-optimize="-O -g" 19 20make -j 2 21make install 22 23cd ../InstFirefox20012 24 25MOZ_NO_REMOTE=1 NO_EM_RESTART=1 \ 26LD_LIBRARY_PATH=`pwd`/lib/firefox-2.0.0.12:\ 27`pwd`/lib/firefox-2.0.0.12/components:\ 28`pwd`/lib/firefox-2.0.0.12/plugins \ 29/home/sewardj/VgTRUNK/hgdev/Inst/bin/valgrind --tool=helgrind \ 30--trace-children=no -v ./lib/firefox-2.0.0.12/firefox-bin 31 32# start and then quit firefox a couple of times before measuring 33# it, analysing results, etc. This is because (I think) the new 34# build is probably a different version from whatever you used 35# before and so on the first run, the new build wants to mess with 36# ~/.mozilla (or something) and that makes it take much longer than 37# subsequent runs. 38 39# Patch the recycling allocator thusly (is this still necessary) ? 40 41 42$ diff -U3 ./xpcom/ds/nsRecyclingAllocator.cpp-ORIG ./xpcom/ds/nsRecyclingAllocator.cpp 43--- ./xpcom/ds/nsRecyclingAllocator.cpp-ORIG 2008-03-14 19:09:17.000000000 +0100 44+++ ./xpcom/ds/nsRecyclingAllocator.cpp 2008-03-14 19:39:34.000000000 +0100 45@@ -156,7 +156,7 @@ 46 mLock = nsnull; 47 } 48 } 49- 50+#include "/home/sewardj/VgTRUNK/hgde2/Inst/include/valgrind/helgrind.h" 51 // Allocation and free routines 52 void* 53 nsRecyclingAllocator::Malloc(PRSize bytes, PRBool zeroit) 54@@ -169,7 +169,7 @@ 55 if (freeBlock) 56 { 57 void *data = DATA(freeBlock); 58- 59+if (bytes > 0) VALGRIND_HG_CLEAN_MEMORY(data,bytes); 60 if (zeroit) 61 memset(data, 0, bytes); 62 return data; 63 64 65 66Building OpenOffice 2.4/3.0 from source 67--------------------------------------- 68 69svn co svn://svn.gnome.org/svn/ooo-build/trunk ooo-build 70 71cd ooo-build 72 73export ARCH_FLAGS="-g -O" 74export DOWNLOADCACHE=~/DOWNLOADS/OOo 75 76#export ARCH_FLAGS="-g -O -fno-inline -fno-inline-functions" 77# very slow, and not helpful 78 79./autogen.sh --with-distro=SUSE-11.0 80 --disable-gstreamer --disable-mono 81 82# --with-max-jobs=2 --with-num-cpus=2 sounds good on paper, but often 83# cause the build to fail 84# --with-alloc=system is used by default 85 86./download 87 88make 89 90# make now runs the 'inner' configure (of OOo proper) and 91# invariably fails. To fix, install 987,654,321 packages you never 92# heard of before, that OOo absolutely needs, and go back to the 93# autogen step. You probably need to do this ten times or more. 94# 95# configure: error: \genbrk\ not found in $PATH, install the icu 96# development tool \genbrk"" 97# 98# means you have to install packages: icu libicu-devel 99 100# eventually you might get through the inner configure. After 101# a couple of hours of flat out computation on both cores of 102# a fast Core 2, the build might complete successfully. 103 104# in the likely event of even all that not working, go on to #go-oo 105# at irc.freenode.org and ask questions 106 107# eventually ... 108 109./bin/ooinstall ~/OOoBuild/Inst01 110cd ~/OOoBuild/Inst01 111valgrind -v ./program/soffice.bin 112 113 114# Hacking OOo 115 116# Use two shells, (C)ompile and (R)un. In (C): 117# 118cd build/ooh680-m12 119. ./LinuxX86Env.Set.sh (or ". ./LinuxX86-64Env.Set.sh") 120./solenv/bin/linkoo ~/OOoBuild/Inst01 121# 122# This replaces all the .so's in the install tree with symlinks 123# back into the build tree, so you can then re-run without 124# having to endlessly reinstall. It also creates 'ooenv' in 125# ~/OOoBuild/Inst01/program, which needs to be sourced 126# once before running. 127# 128# So having changed something in OOo, eg in svx/, do: 129# 130(cd svx && build) 131# 132# Meanwhile in the (R)un shell: 133source ooenv # just once! 134# appears to complain aobut "ulimit -c", but OK nevertheless 135 136valgrind [args] ./soffice.bin 137 138 139## More notes, 2 May 08 140export DOWNLOADCACHE=~/DOWNLOADS/OOo to cache downloaded tarballs 141##export CONFIGURE_FLAGS=--disable-mediawiki is needed for dev300-m10 142##or not -- causes the build to fail later. Don't use this. 143 144 145# These are packages I had to install on a fairly vanilla OpenSUSE 146# 10.3 in order to get a build working 147 148perl-Archive-Zip-1.20 149cups-devel-1.2.12 150libjpeg-devel-6.2.0 151libxslt-devel 152 libgcrypt-devel 153 liggpg-error-devel 154 libxml2-devel 155 readline-devel 156python-devel 157 blt 158 python-tk 159libcurl-devel 160 libidn-devel 161boost-devel 162unixODBC-devel 163mozilla-xulrunner181-devel 164 mozilla-nspr-devel 165 mozilla-nss-devel 166 mozilla-xulrunner181 167neon-devel 168gnome-vfs2-devel 169 avahi-devel 170 dbus-1-devel 171 dbus-1-glib 172 gconf2-devel 173 hal-devel 174 indent 175 libblkid-devel 176 libbonobo-devel 177 libcom_err-devel 178 libext2fs-devel 179 libidl-devel 180 libusb-devel 181 libuuid-devel 182 orbit2-devel 183 popt-devel 184qt3-devel 185 liblcms-devel 186 libmnt-devel 187 188export QTDIR=/usr/lib/qt3 189 190kdebase3-devel 191 (tons of stuff) 192 193