Difference between revisions of "Debugging OOo"
(Created page with '== Lecture logs by Eric == <pre> 1 : [11:54] <@ericb2> fardad: ok, let's go 2 : �01[11:54] <@fardad> ericb2: Thank you in advance for taking time and lecturing us! 3 : [11:54] ...') |
(→Lecture logs by Eric) |
||
Line 1: | Line 1: | ||
== Lecture logs by Eric == | == Lecture logs by Eric == | ||
+ | |||
+ | = Session One = | ||
<pre> | <pre> | ||
1 : [11:54] <@ericb2> fardad: ok, let's go | 1 : [11:54] <@ericb2> fardad: ok, let's go |
Revision as of 13:46, 8 April 2009
Lecture logs by Eric
Session One
1 : [11:54] <@ericb2> fardad: ok, let's go 2 : �01[11:54] <@fardad> ericb2: Thank you in advance for taking time and lecturing us! 3 : [11:54] <@ericb2> To make things more easy, everything will be avaulable on the wiki afterwards 4 : [11:54] <@ericb2> fardad: you're welcome 5 : [11:55] <@ericb2> @all : if ever you detect something wrong, please let me know, or better fix it on the wiki afterwards 6 : [11:55] <@ericb2> thanks in advance 7 : [11:55] <@ericb2> Outline of the ClassRoom : 8 : [11:55] <@ericb2> 1) Create patches using svn 9 : [11:55] <@ericb2> 2) apply a patch 10 : [11:55] <@ericb2> 3) rebuild a module 11 : [11:55] <@ericb2> 4) rebuild a module including symbols 12 : [11:55] <@ericb2> 5) run OOo with gdb (introduction of gdb use) 13 : [11:55] <@ericb2> that's what we'll try to do 14 : [11:56] <@ericb2> if you have questions, please do 15 : [11:56] <@ericb2> fardad: we have ~1 hour 16 : [11:56] <@ericb2> fardad: is it ok ? 17 : [11:56] <IZBot> News from cws: native222: nominated || hr59: nominated 18 : �01[11:56] <@fardad> ericb2: sure, but just letting you know that students have 1hour 30 minutes 19 : [11:57] <@ericb2> fardad: well, they will experiment and ask then :-) 20 : [11:57] <@ericb2> Introduction : in this part, we will create, apply patches using svn tool. To simplify, we'll suppose the patches are in unified mode. 21 : [11:57] <@ericb2> Means: 22 : [11:57] <@ericb2> - 3 lines of context before the change 23 : [11:57] <@ericb2> - a line who starts with " - " means the line before the old version (if the old version was existing) 24 : [11:57] <@ericb2> - a line starting with " + " means after the change(s), if a new version does exist 25 : [11:57] <@ericb2> - 3 lines of context after the change 26 : [11:58] <@ericb2> The most important with unified mode : patches are human readable 27 : [11:58] <@ericb2> For example : 28 : [11:58] <@ericb2> ordinateur-de-eric-b-2:~/Desktop/ecntablet01 ericb$ svn diff sd/source/ui/slideshow/slideshow.hrc 29 : [11:58] <@ericb2> Index: sd/source/ui/slideshow/slideshow.hrc 30 : [11:58] <@ericb2> =================================================================== 31 : [11:58] <@ericb2> --- sd/source/ui/slideshow/slideshow.hrc (revision 267130) 32 : [11:58] <@ericb2> +++ sd/source/ui/slideshow/slideshow.hrc (working copy) 33 : [11:58] <@ericb2> @@ -38,8 +38,10 @@ 34 : [11:58] <@ericb2> #define CM_SCREEN_BLACK 5 35 : [11:58] <@ericb2> #define CM_SCREEN_WHITE 6 36 : [11:58] <@ericb2> #define CM_ENDSHOW 7 37 : [11:58] <@ericb2> -#define CM_FIRST_SLIDE 8 38 : [11:58] <@ericb2> -#define CM_LAST_SLIDE 9 39 : [11:58] <@ericb2> -#define CM_SLIDES 10 40 : [11:58] <@ericb2> +#define CM_ERASE_ALLINK 8 41 : [11:58] <@ericb2> +#define CM_ERASE_INK 9 42 : [11:58] <@ericb2> +#define CM_FIRST_SLIDE 10 43 : [11:58] <@ericb2> +#define CM_LAST_SLIDE 11 44 : [11:58] <@ericb2> +#define CM_SLIDES 12 45 : [11:58] <@ericb2> 46 : [11:58] <@ericb2> #endif 47 : [11:58] <@ericb2> As you can see, the - mean : the line is the previous version 48 : [11:59] <@ericb2> the + the new one 49 : [11:59] <@ericb2> in this patch, the deve loper added new constants 50 : [11:59] <@ericb2> 1) Create patches using svn 51 : [11:59] <@ericb2> Lot of possibilities. Below some of them. Probably better solutions do exist. This is just a little inventory of the possibilities. 52 : [11:59] <@ericb2> 1.1) you got a tree, did some modifications, and you want to send the patch to a friend 53 : [12:00] <@ericb2> To visualize the changes : 54 : [12:00] <@ericb2> ordinateur-de-eric-b-2:~/Desktop/moz2seamonkey01 ericb$ svn diff slideshow/source/inc/userpainteventhandler.hxx 55 : [12:00] <@ericb2> The command (without the prompt) is : 56 : [12:00] <@ericb2> svn diff slideshow/source/inc/userpainteventhandler.hxx 57 : [12:00] <@ericb2> Comment: we only check the changes in 1 filme there 58 : [12:00] <@ericb2> The result is : 59 : [12:00] <@ericb2> Index: slideshow/source/inc/userpainteventhandler.hxx 60 : [12:00] <@ericb2> =================================================================== 61 : [12:00] <@ericb2> --- slideshow/source/inc/userpainteventhandler.hxx (revision 267652) 62 : [12:00] <@ericb2> +++ slideshow/source/inc/userpainteventhandler.hxx (working copy) 63 : [12:00] <@ericb2> @@ -53,6 +53,9 @@ 64 : [12:00] <@ericb2> virtual ~UserPaintEventHandler() {} 65 : [12:01] <@ericb2> 66 : [12:01] <@ericb2> virtual bool colorChanged( RGBColor const& rUserColor ) = 0; 67 : [12:01] <@ericb2> + 68 : [12:01] <@ericb2> + virtual bool eraseAllInkChanged(bool const& rEraseAllInk) =0; 69 : [12:01] <@ericb2> + virtual bool eraseInkChanged(bool const& rEraseInk) =0; 70 : [12:01] <@ericb2> virtual bool disable() = 0; 71 : [12:01] <@ericb2> }; 72 : [12:01] <@ericb2> Now, to create the patch for true, the command is 73 : [12:01] <@ericb2> svn diff slideshow/source/inc/userpainteventhandler.hxx > my pretty patch.diff 74 : [12:01] <@ericb2> And " my_pretty_patch.diff " will contain the same. 75 : [12:01] <achan66> sorry what do you mean patch for true> 76 : [12:01] <achan66> ? 77 : [12:02] <@ericb2> Remark: if you are domain developer, you'll be asked for your passphrase 78 : [12:02] <@ericb2> achan66: the first command line returns everything on the standard output -> the screen 79 : [12:02] <achan66> okay thanks 80 : [12:02] <@ericb2> achan66: you're welcome :) 81 : [12:02] <@ericb2> 1.2) you want to create a patch between a cws and a milestone (the one the cws is based on ) 82 : [12:02] <@ericb2> For example, to extract the changes in helpcontent2, ab65 introduced 83 : [12:03] <@ericb2> ab65 is the cws name, and was based on DEV300_m35 84 : [12:03] <@ericb2> in one line : 85 : [12:03] <@ericb2> svn diff http://svn.services.openoffice.org/ooo/tags/DEV300_m35/helpcontent2 http://svn.services.openoffice.org/ooo/cws/ab65/helpcontent2 > mydiff.diff 86 : [12:04] <@ericb2> Comment : as you can see, we use URLs, means you need a working internet connexion, and subversion installed :-) 87 : [12:04] <@ericb2> Important: for the eventual commiters, svn 1.5.4 or more is *mandatory* to avoid creating garbage in the dev tree :) 88 : [12:04] <@ericb2> 1.3) you want to create a patch between two svn revisions for a given cws 89 : [12:05] <@ericb2> Tip : you can follow the recent commits there : http://cia.vc/stats/project/OOo 90 : [12:05] <Kamots> ab65 is the cws name, and was based on DEV300_m35 91 : [12:05] <@ericb2> Example of change (in one line) : 92 : [12:05] <@ericb2> Kamots: exactly 93 : [12:05] <@ericb2> svn diff http://svn.services.openoffice.org/ooo/cws/ooo31gsl2/vcl@268180 http://svn.services.openoffice.org/ooo/cws/ooo31gsl2/vcl@268182 94 : [12:05] <Kamots> oh sorry! my mouse slipped 95 : [12:06] <@ericb2> Remark : the revision syntax is @number 96 : [12:06] <@ericb2> Other possible syntax : dates are allowed 97 : [12:06] <@ericb2> 1.4) using svn log, you want to create the diff between two revisions of the same file 98 : [12:07] <@ericb2> For example : 99 : [12:07] <@ericb2> ordinateur-de-eric-b-2:~/Desktop/moz2seamonkey01 ericb$ svn log configure.in 100 : [12:07] <@ericb2> Means: I'm working in moz2seamonkey01 tree ( svn info will confirm ) 101 : [12:08] <@ericb2> Just some of the returned lines : 102 : [12:08] <@ericb2> (because the log is very long for some often modified files ) 103 : [12:08] <@ericb2> r267684 | ericb | 2009-02-12 18:13:52 +0100 (Thu, 12 Feb 2009) | 1 line 104 : [12:08] <@ericb2> #i94628# fix a path issue for finding seamonkey01 105 : [12:08] <@ericb2> ------------------------------------------------------------------------ 106 : [12:08] <@ericb2> r267656 | ericb | 2009-02-12 14:13:21 +0100 (Thu, 12 Feb 2009) | 1 line 107 : [12:08] <@ericb2> #i94628# other missing changes for Windows 108 : [12:08] <IZBot> porting DEFECT RESOLVED FIXED P3 make seamonkey 1.1.x buildable on Mac OS X http://qa.openoffice.org/issues/show_bug.cgi?id=94628 109 : [12:08] <IZBot> porting DEFECT RESOLVED FIXED P3 make seamonkey 1.1.x buildable on Mac OS X http://qa.openoffice.org/issues/show_bug.cgi?id=94628 110 : [12:10] <@ericb2> lol :) 111 : [12:10] <@ericb2> Practice : try to find the command line yourself ;) 112 : �01[12:10] <@fardad> :) 113 : [12:10] <@ericb2> That's enough for the first part, about create a diff 114 : [12:11] <@ericb2> and other possibilities do exist. What I wanted to show, is you'll have to experiment by yourself, and choose the most adapted to your case 115 : [12:11] <@ericb2> questions ? 116 : [12:12] <jPau> nope 117 : [12:12] <Kamots> so there is no patch command that will generate a .patch file for all modified files? 118 : [12:12] <daeseon_> no 119 : [12:12] <BartB> no questions here 120 : [12:13] <@ericb2> Kamots: diff or svn diff will create a patch. Patch is the next part, and this command will *apply* it 121 : [12:13] <achan66> ic, so far none 122 : [12:13] <@ericb2> I'd like to add an important information 123 : [12:14] <@ericb2> .diff or .patch are the most used suffixes 124 : [12:14] <l_zahir> what happens when a patch fails to be applied? 125 : [12:14] <Kamots> oh ok, thank you 126 : [12:14] <@ericb2> the reason is simple 127 : [12:14] <@ericb2> some editors, when they read .diff or .patch extension, have colored syntax, what is basically interesting 128 : [12:15] <@ericb2> means: you are free to rename your patch whatever you want, but use .diff or .patch as suffix, is generally a good idea 129 : [12:15] <@ericb2> l_zahir: I'll treat the case 130 : [12:15] <@ericb2> l_zahir: in the second part. 131 : [12:15] <l_zahir> ok thanks 132 : [12:16] <WFred__> does this apply to non-C++ code such as PERL?? 133 : [12:16] <@ericb2> WFred__: so far, diff can diff everything 134 : [12:16] <WFred__> :D 135 : [12:16] <@ericb2> WFred__: just use -a when you are diffing binary files 136 : [12:16] <@ericb2> WFred__: just try 137 : [12:17] <WFred__> what does the -a option do? 138 : [12:17] <@ericb2> WFred__: in OOo source tree we have makefiles, C++ , Java, Python , whatever 139 : [12:17] <@ericb2> WFred__: even .jpg or binaries blobs 140 : [12:18] <@ericb2> WFred__: man diff told me " treat all files as text" 141 : [12:18] <@ericb2> WFred__: usefull when binaries are diff'ed 142 : [12:18] <WFred__> oh ok thanks 143 : [12:18] <@ericb2> WFred__: to be sure, you can use diff -Naur old_tree new_tree 144 : [12:19] <@ericb2> WFred__: more precisely : diff -Naur old_tree new_tree W > my_patch.diff 145 : [12:19] <@ericb2> Part 2 : 146 : [12:19] <@ericb2> Apply a patch 147 : [12:19] <@ericb2> Essential options : 148 : [12:19] <@ericb2> --dry-run : fakes the patch application *extremely usefull* if you want to check whether a patch will apply, without create garbage in your tree 149 : [12:20] <@ericb2> -R : reverse it -> we suppose you already applied the patch, did no change and want to reverse the patch, to retrieve the same code as before 150 : [12:20] <@ericb2> -p0 : apply a patch using the exact path the files have. Important: your tree does match with the path of the file the patch will be applied, *AND* 151 : [12:20] <@ericb2> you apply it from the right location 152 : [12:20] <@ericb2> -p1 : you remove the first subdir of the path for every to be patched file listed in th patch 153 : [12:21] <@ericb2> -p2 you remove two .. and so on 154 : [12:21] <@ericb2> Correct way of application : 155 : [12:21] <@ericb2> Fake the application : 156 : [12:21] <@ericb2> patch --dry-run -p0 < my_patch.diff 157 : [12:21] <@ericb2> If nothing wrong occurs, remove the --dry-run option, and apply it for true : 158 : [12:21] <@ericb2> patch -p0 < my_patch.diff 159 : [12:22] <@ericb2> Other possibility, not recommended because of the UUOC (useless use of cat) : 160 : [12:22] <@ericb2> cat my_patch.diff | patch -p0 161 : [12:22] <@ericb2> Now, something important, people do not understand easely 162 : [12:22] <@ericb2> Depth of the application: 163 : [12:22] <@ericb2> e.g. let's suppose a patch has to modify 164 : [12:23] <@ericb2> vcl/source/aqua/source/window/salframeview.mm 165 : [12:23] <@ericb2> vcl/source/aqua/source/gdi/salprn.cxx 166 : [12:23] <@ericb2> vcl/source/aqua/inc/salframeview.h 167 : [12:23] <@ericb2> You can apply the patch from : 168 : [12:23] <@ericb2> 1) the root of the sources : 169 : [12:23] <@ericb2> patch -p0 < my_patch.diff 170 : [12:23] <@ericb2> 2) inside vcl : 171 : [12:23] <@ericb2> but you have to remove the first element of the path for every patched file 172 : [12:24] <@ericb2> patch -p1 < my_patch.diff 173 : [12:24] <@ericb2> (was -p0) 174 : [12:24] <@ericb2> 3) inside vcl/aqua 175 : [12:24] <@ericb2> patch -p2 < my_patch.diff 176 : [12:24] <@ericb2> BUT ... 177 : [12:24] <@ericb2> You cannot apply patch from elsewhere, because the paths will no longer match with the one every of the file contained in it. 178 : [12:25] <@ericb2> Other case 179 : [12:25] <@ericb2> 3) mix of applying patches + svn use 180 : [12:25] <@ericb2> e.g. you did a wrong change in a module, and you want to reverse it directly : 181 : [12:25] <@ericb2> cd module 182 : [12:25] <@ericb2> svn diff apath/afile.cxx | patch -R -p0 183 : [12:25] <@ericb2> will reverse the bad changes 184 : [12:25] <@ericb2> Other similar case : 185 : [12:26] <@ericb2> for the entire local tree this time 186 : [12:26] <@ericb2> svn diff . | patch -R -p0 187 : [12:27] <@ericb2> I'm sorry, but I'll have to stop for 15 to 20 minutes. 188 : [12:27] <@ericb2> So I ask you to prepare questions, experiment and so on for when I'll be back 189 : [12:27] <@ericb2> ok ? 190 : �01[12:27] <@fardad> thanks... 191 : �01[12:27] <@fardad> will do 192 : [12:28] <@ericb2> fardad: ok. See in later. and sorry again 193 : �01[12:28] <@fardad> thats very ok, this give us time to digest the info.... cu in 20 194 : [12:44] <@ericb2> Questions :-) 195 : [12:44] <@ericb2> ? 196 : [12:44] <arBraini> ericb2: wb 197 : �01[12:45] <@fardad> we are back too... 198 : [12:45] <l_zahir> I had problems applying a patch manually, could you please explain this 199 : [12:46] <l_zahir> the patch was : 200 : [12:46] <l_zahir> http://www.puppylinux.ca/puppyfiles/sources/kernel-2.6.25.11/patches-required.txt 201 : [12:47] <l_zahir> for this problem: 202 : [12:47] <l_zahir> http://www.puppylinux.ca/puppyfiles/sources/kernel-2.6.25.11/patches-required.txt 203 : [12:47] <l_zahir> sorry this: 204 : [12:47] <l_zahir> http://daeseonmoon.wordpress.com/2009/02/02/build-openoffice-phase-2-rhino-build-fail-with-openjdk/ 205 : [12:48] <@ericb2> l_zahir: this patch does have *extra* names in the path 206 : [12:49] <l_zahir> ok , I looked for the file and found them 207 : [12:49] <daeseon_> ericb2: so we need to use -p option 208 : [12:49] <@ericb2> l_zahir: so, what you have to do is 1) use -p option, with the right value AND apply the patch from the right place 209 : [12:49] <@ericb2> daeseon_: mandatory there 210 : [12:50] <l_zahir> is right place always one directory above the file? 211 : [12:50] <l_zahir> cause I noticed every body doing that 212 : [12:50] <l_zahir> <../ 213 : [12:51] <@ericb2> l_zahir: I think you can put the patch in rhino, and try to apply it directly, using -p0 214 : [12:51] <l_zahir> ok 215 : [12:51] <@ericb2> l_zahir: to be sure, I test with m40 216 : [12:51] <l_zahir> does the patch fail if the line numbers do not match the file? 217 : [12:52] <l_zahir> thanks 218 : [12:52] <l_zahir> cause the patch fails (half of it ) 219 : [12:52] <@ericb2> l_zahir: Please excuse me 220 : [12:53] <@ericb2> l_zahir: the patch must be applied using -p1 fomr inside rhino, and using -p0 from the root dir 221 : [12:53] <l_zahir> and I tried to apply it manually but the out come wouldn't make sense and laft me with open xml tags 222 : [12:53] <l_zahir> ok 223 : [12:53] <l_zahir> I did not use any -p 224 : [12:53] <@ericb2> l_zahir: in fact only -p0 from the root dir works 225 : [12:53] <@ericb2> l_zahir: and the patch gives garbage 226 : [12:53] <@ericb2> l_zahir: now to answer to your previosu question, a patch can cause disorder 227 : [12:53] <l_zahir> but the location of the code lines were wrong too 228 : [12:54] <l_zahir> ok 229 : [12:54] <@ericb2> l_zahir: yes, the patch does not apply, but I'll create a new one for you (if I can now) 230 : [12:54] <l_zahir> :) 231 : [12:54] <l_zahir> than you 232 : [12:54] <@ericb2> l_zahir: to summarize : 233 : [12:54] <@ericb2> patch --dry-run -p0 < buildfix-openjdk-6-no-rhino.diff 234 : [12:54] <@ericb2> is the right way to apply it 235 : [12:54] <@ericb2> but 236 : �01[12:55] <@fardad> ericb2: everyone is LOLing :) 237 : [12:55] <@ericb2> fardad: why ? 238 : [12:55] <mmu_man> our minister of culture looks nice on this pic: http://www.laquadrature.net/fr/hadopi-albanel-passe-son-oral-0-sur-20 239 : �01[12:55] <@fardad> ericb2: they are amazed that you can just fix the patch "right now" 240 : [12:55] <mmu_man> she likes DRM so probably doesn't like OOo :-( 241 : [12:56] <@ericb2> fardad: I'll try. This happens form time to time 242 : [12:56] <l_zahir> and I spent 3 days non stop and could not get it writ :( 243 : [12:56] <l_zahir> right 244 : [12:56] <@ericb2> two problems with this patch : 245 : [12:56] <@ericb2> patching file rhino/rhino1_5R5.patch 246 : [12:56] <@ericb2> Hunk #1 succeeded at 1206 (offset 32 lines). 247 : [12:56] <IZBot> no issue with number 1 248 : [12:56] <@ericb2> means on hunck will apply with "fuzz" , means will be applied, but cause the creation of file.orig 249 : [12:56] <IZBot> News from cws: hb17: nominated || fwk102: nominated || native226: nominated 250 : [12:57] <@ericb2> saying something not clean happened 251 : [12:57] <@ericb2> + the bad message : 252 : [12:57] <@ericb2> patching file scripting/java/build.xml 253 : [12:57] <@ericb2> Hunk #1 FAILED at 85. 254 : [12:57] <IZBot> no issue with number 1 255 : [12:57] <@ericb2> saying the result will be put in 256 : [12:57] <@ericb2> 1 out of 1 hunk FAILED -- saving rejects to file scripting/java/build.xml.rej 257 : [12:58] <@ericb2> to fix that, we need to apply it for true, and see what happened 258 : [12:58] <@ericb2> to the one who don't know how to proceed 259 : [12:59] <@ericb2> patches are created with the building environment 260 : [12:59] <l_zahir> the fixes to scripting/java/build.xml in the patch aws not clear for me 261 : [12:59] <@ericb2> e.g. on Mac OS X source MacOSXX86Env.Set.sh 262 : [12:59] <@ericb2> then, you have to go into rhino 263 : [12:59] <@ericb2> and type : 264 : [13:00] <@ericb2> dmake patch 265 : [13:01] <@ericb2> then, apply the changes you are supposed to apply in the new patch in the output tree -> unxmacxi.pro there 266 : [13:01] <@ericb2> (I'll continue after) 267 : [13:01] <@ericb2> then do : 268 : [13:01] <@ericb2> (once the changes are ok): : 269 : [13:01] <@ericb2> dmake create patch 270 : [13:01] <@ericb2> sorry 271 : [13:01] <@ericb2> dmake create_patch 272 : [13:01] <@ericb2> this command will create a new patch, replacing the previous one and including all the changes you did manually 273 : [13:01] <@ericb2> that's all 274 : [13:03] <@ericb2> l_zahir: now, maybe the change is obsolete, means cannot be applied. I'm not an .xml specialist, but I can have a look 275 : [13:03] <l_zahir> I would appreciate that 276 : [13:05] <l_zahir> So each successful Hunk means that 1 file has been modified? Or a part of a file? 277 : [13:05] <@ericb2> l_zahir: can be a part of a file, when several changes occur in the same file 278 : [13:05] <@ericb2> l_zahir: means it depends 279 : [13:05] <l_zahir> ok 280 : [13:06] <l_zahir> and after applying each patch should we dmake clean and build again? 281 : [13:06] <l_zahir> or we shoul apply all the patches from the beginning to the source code ? 282 : [13:06] <@ericb2> l_zahir: dmake create_patch will create a backup of the previous one ( .bak ) and build should be ok 283 : [13:07] <l_zahir> Ok , thanks 284 : [13:07] <@ericb2> l_zahir: no, so far, when you are inside a module, you just have to build it : build does it (supposing you sourced the environment file) 285 : [13:07] <@ericb2> l_zahir: deliver at the end, to put everything in the solver 286 : [13:07] <@ericb2> l_zahir and then you can continue the build 287 : [13:08] <@ericb2> l_zahir: back to this patch, the change look completely uncompatible 288 : [13:08] <l_zahir> yes but it worked for others 289 : [13:09] <@ericb2> l_zahir: interesting. Do you remember the milestone used for the build ? 290 : [13:09] <l_zahir> 40 and 41 291 : [13:10] <@ericb2> l_zahir: did the patch apply without garbage ? 292 : [13:10] <l_zahir> Daeseon did it manually 293 : �01[13:10] <@fardad> ericb2: intersting to know that for both build daeseon_ applied the patched manually :) 294 : [13:10] <l_zahir> but I couldn't 295 : [13:10] <l_zahir> He is the smartest here 296 : [13:11] <@ericb2> daeseon_: can yo please tell me more : did it break, then you applied the patch ? Or did you proceed differently ? 297 : [13:12] <daeseon_> ericb2:I saw the patch files and open the file which need to be changed using vi 298 : [13:12] <daeseon_> and then manuall I made change 299 : [13:12] <@ericb2> daeseon_: ok, then you fixed it manually 300 : [13:12] <@ericb2> daeseon_: that's the only solution I see 301 : [13:12] <daeseon_> ericb2:yes. I didn't know how to create patch file and 302 : [13:13] <@ericb2> daeseon_: ok, no problem 303 : [13:13] <daeseon_> how to apply patch using patch command 304 : [13:13] <daeseon_> Now I know... 305 : [13:13] <@ericb2> what I propose : I'll continue after with the patch and I'll finish the presentation. Still a little part to say 306 : [13:13] <@ericb2> ok ? 307 : [13:14] <l_zahir> Daeseon:good you did not know, otherwise you would be confused :) 308 : �01[13:14] <@fardad> ericb2: now that daeseon_ patched it and it worked, can't he diff the files and recreate the proper patch? 309 : �01[13:14] <@fardad> ericb2: sorry, please continue... 310 : [13:14] <@ericb2> fardad: yes, he can , but he'll have to backup the modified file, cleanup the tree, and restart dmake patch .. replace the modified files .. dmake create_patch 311 : [13:15] <@ericb2> fardad: thanks :) We suppose now we did a change, applied whatever patch 312 : [13:15] <@ericb2> Next part is : 313 : [13:15] <@ericb2> 4) Rebuild a module where a patch has been applied 314 : [13:15] <@ericb2> 4.1. Introduction 315 : [13:15] <@ericb2> We suppose we modified some files, and we need to rebuild a lib. The scheme is always the same, in every module concerned by the build 316 : [13:15] <@ericb2> - the first prj/build.lst does contain the modules dependencies, means all the listed modules are prerequisites 317 : [13:16] <@ericb2> - everything built inside a module is put in type_os_proc.pro 318 : [13:16] <@ericb2> e.g. on Mac OS X, type == unx , os == macx , I for Intel -> output dir is unxmacxi.pro in every module 319 : [13:17] <@ericb2> Note: have a look in solenv/inc -> all the possible arch/os have their own makefile, containing the essential for the build. unxlngi4.mk unxmacxi.mk unxmacxp.mk .. and so on : everything is there 320 : [13:17] <@ericb2> The last modification date is used to check the dependencies. 321 : [13:17] <@ericb2> Rule : If a .o is older than it's dependencies, it is rebuild 322 : [13:17] <@ericb2> -> once you modified a file ( touch file is enough) , build in a module will create a new lib 323 : [13:17] <@ericb2> or more generally, new binaries 324 : [13:18] <@ericb2> 4.2 ) Example : rebuild libvclmxi.dylib on Mac ( .so on Linux, .dll on Windows ) 325 : [13:18] <@ericb2> Hypothesis : we suppose the build is completed, and successfull. 326 : [13:18] <@ericb2> cd vcl 327 : [13:18] <@ericb2> touch aqua/source/gdi/sallayout.cxx 328 : [13:18] <@ericb2> -> even without a change, the matching .o will be rebuilt 329 : [13:19] <@ericb2> build 330 : [13:19] <@ericb2> ! not dmake inside a module 331 : [13:19] <@ericb2> but dmake can be used in a subdir containing a makefile.mk file 332 : [13:20] <@ericb2> e.g. dmake test will build whatever respecting the target "test" if there is one existing in the makefile.mk file located in the current dir 333 : [13:20] <@ericb2> Other tip : 334 : [13:20] <@ericb2> If you are in aqua/source/gdi , and you want to rebuild *only* the files listed in the makefile in the current dir, do : 335 : [13:20] <@ericb2> dmake killobj 336 : [13:20] <@ericb2> build 337 : [13:20] <@ericb2> Once done, and if you want to see the changes packaged, do : deliver 338 : [13:21] <@ericb2> cd ../instsetoo_native 339 : [13:21] <@ericb2> mv unxmacxi.pro 340 : [13:21] <@ericb2> unxmacxi.pro_back 341 : [13:21] <@ericb2> (in one line) 342 : [13:21] <@ericb2> build 343 : [13:21] <@ericb2> will recreate a new installset 344 : [13:21] <@ericb2> Else, if you just want to test your lib, put it in the right subdir 345 : [13:21] <@ericb2> (probably in <Install_dir>/OpenOffice.org.app/Contents/basis-link/program on Mac OS X ) 346 : [13:22] <@ericb2> same for any binary, or resource file ( .res ) when you modify the layout 347 : [13:22] <@ericb2> Now, we'll start the gdb part 348 : [13:22] <@ericb2> 5 ) Build including symbols. 349 : [13:22] <@ericb2> Example 350 : [13:22] <@ericb2> cd vcl 351 : [13:23] <@ericb2> mv unxmacxi.pro unxmacxi.pro_back # keep the normal build 352 : [13:23] <@ericb2> build debug="a_non_empty_sting" # means " build debug=t " is ok 353 : [13:23] <@ericb2> The final lib, including symbols for debugging, will be in unxmacxi.pro/lib (on Mac OS X ) 354 : [13:23] <@ericb2> Replace the one already in <Install_dir>/OpenOffice.org.app/Contents/basis-link/program on Mac OS X 355 : [13:23] <@ericb2> and the last thing for today (will prepare the next presentation) : 356 : [13:23] <@ericb2> To debug using gdb,do : 357 : [13:23] <@ericb2> cd <Install_dir>/OpenOffice.org.app/Contents/program 358 : [13:23] <@ericb2> gdb --args soffice apath/afile 359 : [13:23] <@ericb2> "r" (to start) .. and so on; 360 : [13:23] <@ericb2> Happy debugging ! 361 : [13:24] <@ericb2> Sorry for being long, but that's all for today :) 362 : [13:24] <tct13> hello everybody 363 : [13:24] <tct13> hello ericb2 364 : [13:24] <tct13> :-) 365 : [13:24] <@ericb2> tct13: hello 366 : [13:25] <l_zahir> Thanks 367 : [13:25] <tct13> i'm the romanian from fosdem that stated the implication of its organization in openoffice education 368 : [13:25] <Kamots> hello 369 : [13:25] <@ericb2> l_zahir: you're welcome 370 : [13:25] <Kamots> thank you very much eric 371 : [13:25] <@ericb2> tct13: hello :) 372 : [13:25] <tct13> :-) 373 : [13:25] <@ericb2> Kamots: you're welcome 374 : [13:25] <BartB> ericb2: where on the wiki will all of this be posted? 375 : [13:26] <@ericb2> @all : http://wiki.services.openoffice.org/wiki/Education_ClassRoom/Practice#SVN_use 376 : [13:26] <achan66> yey thanks 377 : [13:26] <achan66> i was gonna ask that 378 : [13:26] <@ericb2> I'll complete once possible 379 : [13:26] <@ericb2> this is not perfect, and everybody is welcome to improve, and add information ! 380 : [13:26] <@ericb2> thanks in advance 381 : [13:26] <@ericb2> :-) 382 : [13:27] <BartB> thank you 383 : [13:27] <daeseon_> thank you eric. It is really useful. 384 : [13:27] <@ericb2> l_zahir: I'll have a look at your patch 385 : [13:27] <@ericb2> daeseon_: you're welcome :) 386 : [13:27] <tct13> me and my associate continued the discussion with Sun officials. we plan a Sun event at the very beginning of the Campus Ambassador programme, at the end of February 387 : [13:27] <@ericb2> tct13: great. 388 : [13:27] <l_zahir> thank you , I'm looking forward to the result 389 : [13:27] <tct13> meanwhile, we document on ooo developing from education.ooo 390 : [13:27] <tct13> :-D 391 : [13:28] <@ericb2> l_zahir: just be a bit patient: it will be dinner time. But I'll be there afterwars 392 : [13:28] <@ericb2> afterwards 393 : [13:28] <l_zahir> :) 394 : [13:28] <l_zahir> thanks 395 : [13:28] <@ericb2> tct13: just to avoid misunderstanding: Sun does not provide me any information. Means does not really share ;) 396 : [13:28] <tct13> ericb2: just wanted to let you know, we'll probably ask some questions this days 397 : �01[13:29] <@fardad> ok, this ends the session for today, thanks again and see you on thursday same time :) 398 : [13:29] <tct13> well, this is why I told you :-) 399 : [13:29] <@ericb2> l_zahir: the probem you could have, is a working patch can be created, but can break the build 400 : [13:29] <@ericb2> tct13: thanks :) 401 : [13:29] <@ericb2> tct13: can we continue in say, 1h30 ? 402 : [13:29] <l_zahir> yes 403 : [13:29] <tct13> sure :-) 404 : [13:29] <@ericb2> tct13: I'm sorry, this is dinner time 405 : [13:29] <tct13> i already had 406 : [13:29] <@ericb2> tct13: ok, then later :) 407 : [13:29] <tct13> gmt + 2 :-P 408 : [13:29] <tct13> ok 409 : [13:30] <@ericb2> tct13: I'm sorry, but I really will have to stop 410 : [13:30] <tct13> bone a petit 411 : [13:30] <l_zahir> ericb2: have a good day 412 : [13:31] <Kamots> thanks again, take care everyone 413 : [13:31] <@ericb2> thanks to all :-)