1 2 Building Firefox-2.0.0.12 from source, for testing Helgrind 3 ----------------------------------------------------------- 4 5 wget 6 ftp://ftp.mozilla.org/pub/firefox/releases/2.0.0.12/source/firefox-2.0.0.12-source.tar.bz2 7 8 bzip2 -dc firefox-2.0.0.12-source.tar.bz2 | tar xvf - 9 10 mv mozilla firefox-2.0.0.12 11 12 mkdir InstFirefox20012 13 export XYZZYFOOBAR=`pwd`/InstFirefox20012 14 15 cd firefox-2.0.0.12 16 17 ./configure --prefix=$XYZZYFOOBAR --enable-application=browser \ 18 --enable-optimize="-O -g" 19 20 make -j 2 21 make install 22 23 cd ../InstFirefox20012 24 25 MOZ_NO_REMOTE=1 NO_EM_RESTART=1 \ 26 LD_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 66 Building OpenOffice 2.4/3.0 from source 67 --------------------------------------- 68 69 svn co svn://svn.gnome.org/svn/ooo-build/trunk ooo-build 70 71 cd ooo-build 72 73 export ARCH_FLAGS="-g -O" 74 export 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 88 make 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 110 cd ~/OOoBuild/Inst01 111 valgrind -v ./program/soffice.bin 112 113 114 # Hacking OOo 115 116 # Use two shells, (C)ompile and (R)un. In (C): 117 # 118 cd 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: 133 source ooenv # just once! 134 # appears to complain aobut "ulimit -c", but OK nevertheless 135 136 valgrind [args] ./soffice.bin 137 138 139 ## More notes, 2 May 08 140 export 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 148 perl-Archive-Zip-1.20 149 cups-devel-1.2.12 150 libjpeg-devel-6.2.0 151 libxslt-devel 152 libgcrypt-devel 153 liggpg-error-devel 154 libxml2-devel 155 readline-devel 156 python-devel 157 blt 158 python-tk 159 libcurl-devel 160 libidn-devel 161 boost-devel 162 unixODBC-devel 163 mozilla-xulrunner181-devel 164 mozilla-nspr-devel 165 mozilla-nss-devel 166 mozilla-xulrunner181 167 neon-devel 168 gnome-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 184 qt3-devel 185 liblcms-devel 186 libmnt-devel 187 188 export QTDIR=/usr/lib/qt3 189 190 kdebase3-devel 191 (tons of stuff) 192 193