Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / week_2006_04_16.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">
4 <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6    <meta name="generator" content="Movable Type 5.2.3" />
7
8    <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles-site.css" type="text/css" />
9    <link rel="alternate" type="application/atom+xml" title="Atom" href="http://defaria.com/blogs/Status/atom.xml" />
10    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://defaria.com/blogs/Status/index.xml"$>" />
11
12    <title>Status for Andrew DeFaria: April 16, 2006 - April 22, 2006 Archives</title>
13
14    <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15    <link rel="prev" href="http://defaria.com/blogs/Status/archives/week_2006_04_09.html" title="April  9, 2006 - April 15, 2006" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/week_2006_04_23.html" title="April 23, 2006 - April 29, 2006" />
17 </head>
18 <body class="layout-one-column">
19    <div id="container">
20       <div id="container-inner" class="pkg">
21
22          <div id="banner">
23             <div id="banner-inner" class="pkg">
24                <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
25                <h2 id="banner-description">Searchable status reports and work log</h2>
26             </div>
27          </div>
28
29          <div id="pagebody">
30             <div id="pagebody-inner" class="pkg">
31                <div id="alpha">
32                   <div id="alpha-inner" class="pkg">
33                      
34                      <p class="content-nav">
35                         <a href="http://defaria.com/blogs/Status/archives/week_2006_04_09.html">&laquo; April  9, 2006 - April 15, 2006</a> |
36                         <a href="http://defaria.com/blogs/Status/">Main</a>
37                         | <a href="http://defaria.com/blogs/Status/archives/week_2006_04_23.html">April 23, 2006 - April 29, 2006 &raquo;</a>
38                      </p>
39                      
40                      
41                      
42
43                      <h2 class="date-header">April 19, 2006</h2>
44                      <a id="a000546"></a>
45                      <div class="entry" id="entry-546">
46                         <h3 class="entry-header">Successful Build on sons-sc-cc</h3>
47                         <div class="entry-content">
48                            <div class="entry-body">
49                               <ul>
50   <li>Tracked down the problem with building on sons-sc-cc. Turns out Tornado-2.0 is slightly different</li>
51 </ul>
52
53 <p><b>TIme Spent:</b> 2 Hours</p>
54                               
55                               <p>Here's what I see. Looking into why I'm getting this error I searched
56 Tornado-2.0 for the definition of endEtherAddressForm and I find it in
57 Tornado-2.0/host/resource/synopsis/drv.syn ~line 42. On sons-clearcase
58 I see:</p>
59
60 <div class=code><pre>
61 endEtherAddressForm() - form an Ethernet address into a packet
62
63 M_BLK_ID endEtherAddressForm
64     (
65     M_BLK_ID pMblk,    /* pointer to packet mBlk */
66     M_BLK_ID pSrcAddr, /* pointer to source address */
67     M_BLK_ID pDstAddr  /* pointer to destination address */
68     )
69 </pre></div>
70
71 <p>However on sons-sc-cc I see:</p>
72
73 <div class=code><pre>
74 endEtherAddressForm() - form an Ethernet address into a packet
75
76 M_BLK_ID endEtherAddressForm
77     (
78     M_BLK_ID pMblk,    /* pointer to packet mBlk */
79     M_BLK_ID pSrcAddr, /* pointer to source address */
80     M_BLK_ID pDstAddr, /* pointer to destination address */
81     BOOL     bcastFlag /* use link-level broadcast? */
82     )
83 </pre></div>
84
85 <p>Note the extra parm. Now I copied //sons-clearcase/Tools -&gt; //sons-sc-cc/Tools but I know that Simon was doing something WRT WindRiver. Perhaps that changed Tools on sons-sc-cc? Here's what I tried:</p>
86
87 <ul>
88   <li>Renamed //sons-sc-cc/Tools/Tornado-2.0 -&gt;
89 //sons-sc-cc/Tools/Tornado-2.0.save</li>
90
91   <li>Recopied //sons-clearcase/Tools/Tornado-2.0 -&gt;
92 //sons-sc-cc/Tools/Tornado-2.0</li>
93
94   <li><font color="#009900"><b>Performed build - it worked! All of it!
95 Not just olc!</b></font></li>
96 </ul>
97
98 <p>I noticed that there is a Tornado-2.0 folder in the D drive, a
99 Tornado-2.0 folder in D:\Tools and a Tornado-2.0+ in D:\Tools.</p>
100                               
101                               <p class="entry-footer">
102                                  <span class="post-footers">Posted by  at 11:31 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000546.html">Permalink</a>
103                                  
104                                  
105                               </p>
106                            </div>
107                         </div>
108                      </div>
109                      
110                      
111
112                      <h2 class="date-header">April 18, 2006</h2>
113                      <a id="a000545"></a>
114                      <div class="entry" id="entry-545">
115                         <h3 class="entry-header">Building on sons-sc-cc (Fixing smake)</h3>
116                         <div class="entry-content">
117                            <div class="entry-body">
118                               <ul>
119   <li>Looked into build issues on sons-sc-cc</li>
120
121   <li>Adjusted smake</li>
122 </ul>
123
124 <p><b>Time Spent:</b> 2 hours</p>
125                               
126                               <p>This problem with drive letters being unavailable when one remotely
127 logs in is one that I had battled with for a while in the past as <a href="http://sourceware.org/cgi-bin/search.cgi?cmd=Search!&fmt=long&form=extended&GroupBySite=no&m=all&ps=10&q=network+drive+unavailable+2003&sp=1&sy=1&type=&ul=/ml/cygwin/%25&wf=2221&wm=wrd">history shows</a>.
128
129 <p>Unfortunately I don't have a great solution yet except to say that most people do not log into the server directly to do a build as you are doing. However there's a light at the end of the tunnel and that light is smake. Smake makes an optimization by setting TOOLS_DIR to the local disk drive instead of the T drive when building on sons-clearcase (and sons-cc for that matter as well as a sonsbld1 that we were once trying to set up). As a result I've changed smake to add sons-sc-cc to the list:</p>
130
131 <div class=code><pre>
132 if [ $myhost = "sons-sc-cc" ]; then
133   export TOOLS_ROOT=D:/Tools &amp;&amp; nice make -e "$@"
134 elif [ $myhost = "sons-clearcase" ]; then
135   export TOOLS_ROOT=E:/Tools &amp;&amp; nice make -e "$@"
136 elif [ $myhost = "sons-cc" -o $myhost = "sonsbld1" ]; then
137   export TOOLS_ROOT=C:/Tools &amp;&amp; nice make -e "$@"
138 else
139   nice make "$@"
140 fi
141 </pre></div>
142
143 <p>So if you use smake instead of just make on sons-sc-cc TOOLS_ROOT will
144 be set to D:/Tools (where Tools are locally on sons-sc-cc) and then it will call make. This should solve this problem for local makes. For remove smakes (an smake you invoke from your desktop - you guys still do that right?) the following code changes fix that:</p>
145
146 <div class=code><pre>
147 if [ $build_server = "sons-sc-cc" ]; then
148   rsh -n $build_server "ct $(pwd) &amp;&amp; export TOOLS_ROOT=D:/Tools
149 &amp;&amp; nice make -e $@"
150 elif [ $build_server = "sons-cc" -o $build_server = "sonsbld1" ]; then
151   rsh -n $build_server "cd $(pwd) &amp;&amp; export TOOLS_ROOT=C:/Tools
152 &amp;&amp; nice make -e $@"
153 else
154   rsh -n $build_server "cd $(pwd) &amp;&amp; export TOOLS_ROOT=E:/Tools
155 &amp;&amp; nice make -e $@"
156 fi
157 </pre></div>
158
159 <p>The added benefit of this approach is that builds a <font  color="#ff0000"><b>a lot</b></font> faster since you are not loading the compiler over the network connection of the T drive (even though the T drive points back to the local machine in the case of sons-sc-cc).</p>
160
161 <p>Oh, another optimization I did on sons-sc-cc - I change the share cache to cache programs that are run. So for users running builds locally on there desktops (well not yet but when we get fully switched over) and they load say the C compiler from vxWorks, it will be cached on their local desktop and subsequent compilations should also run a lot faster!</p>
162
163 <p>I'm still not able to build, however. Here's a build from a clean view. Note that I removed the * from your /etc/passwd line szhu so I could use rsh to switch users from ccadmin -&gt; szhu:</p>
164
165 <div class=code><pre>
166 <font color="#3366ff"><b>[ccadmin] sons-sc-cc:</b></font><u>rsh -l szhu sons-sc-cc</u>
167 No directory /us/SZhu!
168 Logging in with home = "/".
169 Last login: Tue Apr 18 11:06:10 from sc-szhu.salira.com
170 CYGWIN_NT-5.2 SONS-SC-CC 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin
171 WARNING: HOME directory did not exist! Logging in with HOME = /tmp
172
173 <b><font color="#009900">SZhu@SONS-SC-CC</font></b> <font
174  color="#cc9933">~</font>
175 $ <u>id</u>
176 uid=1143(SZhu) gid=513(Domain Users) groups=513(Domain Users)
177   
178 <b><font color="#009900">SZhu@SONS-SC-CC</font></b> <font  color="#cc9933">~</font>
179 $ <u>cd /dview/3.1.ccadmin/salira/neopon/build/</u>
180 <b><font color="#009900">SZhu@SONS-SC-CC</font></b>
181 <font color="#cc9933">/dview/3.1.ccadmin/salira/neopon/build</font>
182 $ <u>which smake</u>
183 /view/official/Tools/bin/smake
184 <b><font color="#009900">SZhu@SONS-SC-CC</font></b>
185 <font color="#cc9933">/dview/3.1.ccadmin/salira/neopon/build</font>
186 $ <u>smake</u>
187 Build server: sons-sc-cc View: 3.1.ccadmin [local]
188 User: SZhu Dir: /dview/3.1.ccadmin/salira/neopon/build
189 Performing build locally on sons-sc-cc
190 sons-sc-cc:make 
191
192 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +---------------------------+
193 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S a l i r a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /|
194 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NEOPON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; / |
195 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /---------------------------/&nbsp; |
196 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |O|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp; /
197 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Building... |L|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | /
198 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |C|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |/
199 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +---------------------------+
200 -------------------------------------- (neopon/src/bsp) olc
201 [ASSEMBLE]&nbsp;&nbsp;&nbsp;&nbsp; sysALib.s
202 [COMPILE C]&nbsp;&nbsp;&nbsp; sysLib.c
203 [COMPILE C]&nbsp;&nbsp;&nbsp; sysTffs.c
204 D:/TOols/Tornado-2.0/target/src/drv/tffs/tffsConfig.c: In function `tffsShowAll':
205 In file included from sysTffs.c:63:
206 D:/TOols/Tornado-2.0/target/src/drv/tffs/tffsConfig.c:205: warning: comparison between signed and unsigned
207 D:/TOols/Tornado-2.0/target/src/drv/tffs/tffsConfig.c: In function `tffsBootImagePut':
208 D:/TOols/Tornado-2.0/target/src/drv/tffs/tffsConfig.c:389: warning: comparison between signed and unsigned
209 [COMPILE C]&nbsp;&nbsp;&nbsp; 8260I2C.c
210 8260I2C.c: In function `i2cInit':
211 8260I2C.c:260: warning: cast from pointer to integer of different size
212 8260I2C.c:261: warning: cast from pointer to integer of different size
213 8260I2C.c:265: warning: cast from pointer to integer of different size
214 8260I2C.c:266: warning: cast from pointer to integer of different size
215 [COMPILE C]&nbsp;&nbsp;&nbsp; Fpga_download.c
216 [COMPILE C]&nbsp;&nbsp;&nbsp; usrConfig_st.c
217 D:/TOols/Tornado-2.0/target/src/config/../../src/config/usrTffs.c: In function `usrTffsLnConfig':
218 In file included from usrExtra.c:203,
219 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from usrConfig_st.c:123:
220 D:/TOols/Tornado-2.0/target/src/config/../../src/config/usrTffs.c:154: warning: implicit declaration of function `dosFsMkfsOptionsSet'
221 D:/TOols/Tornado-2.0/target/src/config/../../src/config/usrWdb.c: In function `vxTaskCreate':
222 In file included from usrExtra.c:236,
223 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from usrConfig_st.c:123:
224 D:/TOols/Tornado-2.0/target/src/config/../../src/config/usrWdb.c:581: warning: unused parameter `stackBase'
225 D:/TOols/Tornado-2.0/target/src/config/../../src/config/usrWindview.c: In function `wvOn':
226 D:/TOols/Tornado-2.0/target/src/config/../../src/config/usrWindview.c:269: warning: unused parameter `arg4'
227 [COMPILE C]&nbsp;&nbsp;&nbsp; usrConfig.c
228 D:/TOols/Tornado-2.0/target/src/config/../../src/config/usrTffs.c: In function `usrTffsLnConfig':
229 In file included from usrExtra.c:203,
230 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from usrConfig.c:123:
231 D:/TOols/Tornado-2.0/target/src/config/../../src/config/usrTffs.c:154: warning: implicit declaration of function `dosFsMkfsOptionsSet'
232 D:/TOols/Tornado-2.0/target/src/config/../../src/config/usrWdb.c: In function `vxTaskCreate':
233 In file included from usrExtra.c:236,
234 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from usrConfig.c:123:
235 D:/TOols/Tornado-2.0/target/src/config/../../src/config/usrWdb.c:581: warning: unused parameter `stackBase'
236 D:/TOols/Tornado-2.0/target/src/config/../../src/config/usrWindview.c: In function `wvOn':
237 D:/TOols/Tornado-2.0/target/src/config/../../src/config/usrWindview.c:269: warning: unused parameter `arg4'
238 [COMPILE C]&nbsp;&nbsp;&nbsp; fpd_end.c
239 fpd_end.c: In function `np3400EndAddressForm':
240 fpd_end.c:1247: too few arguments to function `endEtherAddressForm'
241 make[2]: *** [../../../build/olc/obj/fpd_end.o] Error 1
242 make[1]: *** [obj/bsp/olc.olist] Error 2
243 make: *** [olc/vxWorks_st.elf] Error 2
244 </pre></div>
245
246 <blockquote type="cite">
247   Regarding checkin and bug ID labeling, when you check into Clearcase using sons-clearcase you are saying that the trigger that is supposed to label the check in with the bug ID is failing to do so. I will look into this later too.
248 </blockquote>
249
250 <p>I'm not seeing this. In fact I'm seeing evidence saying it's working. The triggers log to /view/official/Tools/logs/triggers.log. Looking at the bottom of that file (tail -f works nicely) shows me:</p>
251
252 <div class=code><pre>
253 CheckinPreop.pl: 4/18/2006@17:38: vdsouza: Checkin checks started for V:\vdsouza3.1\salira\neopon\src\gdb\gdb_csr_dump.c on rel_3.1 branch
254 CheckinPreop.pl: 4/18/2006@17:38: vdsouza: Successful precheckin of V:\vdsouza3.1\salira\neopon\src\gdb\gdb_csr_dump.c on rel_3.1 branch with bug ID
255 CheckinPostop.pl: 4/18/2006@17:38: vdsouza: Created label for BUGS200006029
256 CheckinPostop.pl: 4/18/2006@17:38: vdsouza: Attached label BUGS200006029 to V:\vdsouza3.1\salira\neopon\src\gdb\gdb_csr_dump.c
257 CheckinPostop.pl: 4/18/2006@17:38: vdsouza: Successful postcheckin of V:\vdsouza3.1\salira\neopon\src\gdb\gdb_csr_dump.c on rel_3.1 branch with bug ID BUGS200006029</tt>
258 </pre></div>
259
260 <p>And indeed gdb_csr_dump.c has a label of BUGS200006029:</p>
261
262 <div class=code><pre>
263 [ccadmin] sons-clearcase:files4bug 6029
264 Files involved in bug ID BUGS200006029:
265 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /salira/neopon/src/gdb/main/rel_2.0/hainan_integration/rel_2.2/rel_3/1/gdb_csr_dump.c<br>
266 1 file involved in bug ID BUGS200006029
267 </pre></div>
268
269 <p>Do you have an example of where this is failing?</p>
270                               
271                               <p class="entry-footer">
272                                  <span class="post-footers">Posted by  at  7:45 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000545.html">Permalink</a>
273                                  
274                                  
275                               </p>
276                            </div>
277                         </div>
278                      </div>
279                      
280                      
281
282                      <h2 class="date-header">April 17, 2006</h2>
283                      <a id="a000544"></a>
284                      <div class="entry" id="entry-544">
285                         <h3 class="entry-header">gethostbyaddr fails</h3>
286                         <div class="entry-content">
287                            <div class="entry-body">
288                               <ul>
289   <li>Researched problem with Tony and Bingchun's machines WRT cqd/cqc</li>
290
291   <li>Attempted to fix problems with Clearquest Desktop Installation</li>
292 </ul>
293
294 <p><b>Time Spent:</b> 2 Hours</p>
295                               
296                               <p>Here's the progress I made last night:</p>
297
298 <ul>
299   <li>Determined that part of the problem with Tony Liu's machine and Bingchun's machines was due to the fact that Clearquest was not even installed on their machines. Installed Clearquest 2002.05.00 on Tony's machine - Bingchun installed Clearquest on his own machine.</li>
300
301   <li>Despite the above cqc was still unable to connect to cqd. Determined that a call to gethostbyaddr in cqd was failing for some still unknown reason. The subsequent called to get the host's name would fail in Perl. Not sure why that causes the server to hang, however getting the hostname is only really so that cqd could report nice hostnames. So instead I changed the code to do:</li>
302
303   <div class=code><pre>
304 # Service this client
305 my $hostinfo = gethostbyaddr ($cqclient-&gt;peeraddr);
306 my $host = !defined $hostinfo ? "Unknown" : $hostinfo-&gt;name || $cqclient-&gt;peerhost;
307   </pre></div>
308    
309 <p>So if the hostinfo is not attainable with the gethostbyaddr call we'll simply use the host of "unknown". This means that Tony and Bingchun should be able to at least checkin their files.</p>
310
311   <li>Fixed shortcut in //sons-sc-cc/Rational/Clearquest to be named "Install Clearquest" so people can update to the new version of Clearquest.</li>
312
313   <li>Attempted to update the machine adefaria with the new version of Clearquest. Need to uninstall the old version of Clearquest first. Bummer.</li>
314
315   <li>Uninstalled Clearquest on adefaria and installed new version of Clearquest. I was able to make a connection to the new Clearquest server (sons-sc-cc) but I was unable to make a connection to the old and current production version of Clearquest on sons-clearcase!</li>
316
317   <li>I was unable to make a connection to the old version of Clearquest on sons-clearcase on either of Tony's or Bingchun's machines. To summarize, I installed CQ Version 2003.06.00 on adefaria and CQ Version 2002.05.00 on Tony's and Bingchun's machines but none of these were able to establish a CQ connection (via the Clearquest Maintenance Tool) to the current production Clearquest SQL Anywhere database on sons-clearcase! For Clearquest, people in China usually use the web interface anyway. I need to talk to Rational about why I am unable to connect to the old, production Clearquest database.</li>
318
319   <li>Uninstalled CQ 2003.06.00 on adefaria and reinstalled CQ 2002.05.00. Alas even after reinstalling CQ Version 2002.05.00 I still can't create a connection to sons-clearcase on adefaria! Must be something I'm doing wrong but I'm too tired to figure it out.</li>
320
321   <li>I was unable to look into rsh/telnet issues and build issues that Simon reported.<br>
322   </li>
323 </ul>
324                               
325                               <p class="entry-footer">
326                                  <span class="post-footers">Posted by  at  7:38 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000544.html">Permalink</a>
327                                  
328                                  
329                               </p>
330                            </div>
331                         </div>
332                      </div>
333                      
334                      
335
336                      
337                      <a id="a000543"></a>
338                      <div class="entry" id="entry-543">
339                         <h3 class="entry-header">Ant Rant</h3>
340                         <div class="entry-content">
341                            <div class="entry-body">
342                               <ul>
343   <li>Studying Ant</li>
344 </ul>
345                               
346                               <p>Recently I started looking into Ant more seriously. Seems like it'd be a good thing to do for my career. But I must tell you, I'm not quite convinced that Ant's a solution to anything except to say that it's probably a more comfortable make for people who think in terms of Java only.</p>
347
348 <p>Here's some quotes from the main <a href="http://ant.apache.org/">Ant page</a>:</p>
349
350 <blockquote>
351   Apache Ant is a Java-based build tool. In theory, it is kind of like Make, but without Make's wrinkles.
352 </blockquote>
353
354 <p>Make wrinkles?!? What wrinkles? Wrinkles are the sign of age and wisedom. Just because you don't understand it do not play it off as if it's bad.</p>
355
356 <blockquote>
357   Why another build tool when there is already make, gnumake, nmake, jam, and others? Because all those tools have limitations that Ant's original author couldn't live with when developing software across multiple platforms. Make-like tools are inherently shell-based -- they evaluate a set of dependencies, then execute commands not unlike what you would issue in a shell. This means that you can easily extend these tools by using or writing any program for the OS that you are working on. However, this also means that you limit yourself to the OS, or at least the OS type such as Unix, that you are working on.
358 </blockquote>
359
360 <p>That's true. But no more true than the fact that if you want to run make on any other system you also need to have make available on that other system! I take the above to mean that you have a tendency to extend your build to what is natural on the OS in question and thus you start using Unix shell commands and the like. OK. However where, in the scheme of things, can one not run Unix shell commands now a days? Surely Unix and Linux have that covered, and Mac OS/X is basically Unix under the hood too. What  you mean Windows? Well <a href="http://cygwin.com">Cygwin</a> also has that pretty much covered. So then, why avoid a well known, well understood and time test utilitiy such as make?
361
362 <blockquote>
363   Makefiles are inherently evil as well. Anybody who has worked on them for any time has run into the dreaded tab problem. "Is my command not executing because I have a space in front of my tab!!!" said the original author of Ant way too many times. Tools like Jam took care of this to a great degree, but still have yet another format to use and remember.
364 </blockquote>
365
366 Ah so now we see the real motivation that the original author had for discarding make! He couldn't remember to start his lines with a tab character!
367
368 <blockquote>
369   Ant is different. Instead of a model where it is extended with shell-based commands, Ant is extended using Java classes. Instead of writing shell commands, the configuration files are XML-based, calling out a target tree where various tasks get executed. Each task is run by an object that implements a particular Task interface.
370 </blockquote>
371
372 <p>Which I guess would be find if you are better at writing Java classes instead of shell commands or other scripts. And why is it that all new, improved, better things must incorporate whatever is in vogue at the time? Do we really need XML files instead of just straightforward ASCII text? And must everything be an object?</p>
373
374 <blockquote>
375   Granted, this removes some of the expressive power that is inherent by being able to construct a shell command such as `find . -name foo -exec rm {}`, but it gives you the ability to be cross platform -- to work anywhere and everywhere. And hey, if you really need to execute a shell command, Ant has an <exec> task that allows different commands to be executed based on the OS that it is executing on. 
376 </blockquote>
377
378 <p>Ant is only as cross platform as the platforms that ant has been ported to! With things like Cygwin there no need to throw the baby out with the bath water over a few misplaced tabs. Still I guess ant has it's place and I'm sure it's comfortable for Java developers. Sure having an object oriented design probably isn't bad but now people need to learn yet another language - Java - even if they are not developing in Java. And they need to learn XML, etc. And you don't only lose the power and expressiveness of the shell but it seems to me you just lost support for just about all the other langauges as well. AFAICT I see no built in support for Ada, FORTRAN, Pascal, etc.</p>
379                               
380                               <p class="entry-footer">
381                                  <span class="post-footers">Posted by  at  5:06 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000543.html">Permalink</a>
382                                  
383                                  
384                               </p>
385                            </div>
386                         </div>
387                      </div>
388                      
389                   </div>
390                </div>
391             </div>
392          </div>
393       </div>
394    </div>
395 </body>
396 </html>