Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / week_2005_04_03.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  3, 2005 - April  9, 2005 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_2005_03_27.html" title="March 27, 2005 - April  2, 2005" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/week_2005_04_10.html" title="April 10, 2005 - April 16, 2005" />
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_2005_03_27.html">&laquo; March 27, 2005 - April  2, 2005</a> |
36                         <a href="http://defaria.com/blogs/Status/">Main</a>
37                         | <a href="http://defaria.com/blogs/Status/archives/week_2005_04_10.html">April 10, 2005 - April 16, 2005 &raquo;</a>
38                      </p>
39                      
40                      
41                      
42
43                      <h2 class="date-header">April  8, 2005</h2>
44                      <a id="a000332"></a>
45                      <div class="entry" id="entry-332">
46                         <h3 class="entry-header">LOS178 3.0.0</h3>
47                         <div class="entry-content">
48                            <div class="entry-body">
49                               <ul>
50   <li>Merged 2.1.0 -> 2.0.0</li>
51 </ul>
52                               
53                               <p>Ah, here's the deal, according to CR 491:</p>
54
55 <blockquote type=cite>
56 <p>Clarification on who removed the C++ libraries: Rockwell Collins distributed the official VMOS 8.4 packages without the libstdc++.a and it is not LW that removed the libstdc++.a.</p>
57
58 <p>Since LW doesn't build the toolchain. The C++ libraries will be taken from LynxOS 3.1.0a PPC (12000.devos.tar.gz) and package into ppc.cdksol.tar.gz the prebuilt solaris cdk. This package will get extracted before starting the build.</p>
59 </blockquote>
60
61 <p>So then the trick is to get the appropriate ppc.cdksol.tar.gz (revision 1.3.2.1).</p>
62
63 <p>So then summarizing what needs to be done:</p>
64
65 <ol>
66   <li>Resolve the issue with arinc653drv.import (i.e. delete the file since it's marked dead)</li>
67
68   <li>Resolve the issue with ENVIRONMENT (see below)</li>
69
70   <li>Merge REL_LOS178_2p1p0-branch -> REL_LOS178_2p0p0_ppc_20050228 for bin-image to get the right ppc.cdksol.tar.gz.</li>
71
72   <li>Build to insure that it builds</li>
73
74   <li>Checkin merges</li>
75 </ol>
76
77 <p>Regarding ENVIRONMENT: The conflict arise in 3 variables. The first variable, LYNXOS178_RELEASE is 2.0.0 in the old version and 2.1.0 in the new version. The new value will be 3.0.0.</p>
78
79 <p>The second variable is LYNXOS178_VERSION. In the old version it's 20050228 and the new version is 20050128. The new value will be today's date (20050408)</p>
80
81 <p>The third variable is also one of those time ones, RELEASE_TIMESTAMP. Old = "Mon Feb 28 11:00:00 2005" and New = "Fri Jan 28 11:00:00 2005". The new value will be "Fri Apr 8 11:00:00 2005".</p>
82                               
83                               <p class="entry-footer">
84                                  <span class="post-footers">Posted by  at  2:27 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000332.html">Permalink</a>
85                                  
86                                  
87                               </p>
88                            </div>
89                         </div>
90                      </div>
91                      
92                      
93
94                      <h2 class="date-header">April  7, 2005</h2>
95                      <a id="a000331"></a>
96                      <div class="entry" id="entry-331">
97                         <h3 class="entry-header">Bluecat RH 8.0 port</h3>
98                         <div class="entry-content">
99                            <div class="entry-body">
100                               <p>This status entry is to hold a log of the issues and resolutions for getting the Bluecat build process from the ancient RH 6.1 to the <i>a little less ancient</i> RH 8.0.</p>
101
102 <ol>
103   <li>Fun with eval, echo and new shell</li>
104
105   <li>Bug in rpm configure</li>
106
107   <li>Static vs. Shared</li>
108 </ol>
109
110                               
111                               <h3>Fun with eval, echo and new shell</h3>
112
113 <p>One of the things that the Bluecat do_it script does is to define the series of "steps" that need to be performed in terms of command lines in variables. Later on the $BUILD_STEP is evaluated to determine which set of commands need to be done as follows:</p>
114
115 <div class="code"><pre>
116 echo "---- Step $BUILD_STEP started at `date` ----"
117 su $BUILD_CMD_OWNER -c "mkdir -p $LOGS_PREFIX/step${BUILD_STEP}"
118 cmd=`eval echo $"STEP${BUILD_STEP}_CMD"`
119 su $BUILD_CMD_OWNER -c "$cmd $*"
120 </pre></div>
121
122 <p>Effectively the name of the environment variable holding the proper command(s) for the step is composed with the echo portion. The eval statement is used to "evaluate" that environment variable thus storing the string of commands into the environment variable cmd. This works well in past versions of the OS but it fails in RH 8.0. First here's the behavior on RH 6.1:</p>
123
124 <div class="code"><pre>
125 <font color="blue"><b>RH6.1:</b></font><u>export STEP1_CMD="ls /tmp"</u>
126 <font color="blue"><b>RH6.1:</b></font><u>export BUILD_STEP=1</u>
127 <font color="blue"><b>RH6.1:</b></font><u>echo $"STEP${BUILD_STEP}_CMD"</u>
128 $STEP1_CMD
129 </pre></div>
130
131 <p>However hears the same commands on RH8.0:</p>
132
133 <div class="code"><pre>
134 <font color="red"><b>RH8.0:</b></font><u>export STEP1_CMD="ls /tmp"</u>
135 <font color="red"><b>RH8.0:</b></font><u>export BUILD_STEP=1</u>
136 <font color="red"><b>RH8.0:</b></font><u>echo $"STEP${BUILD_STEP}_CMD"</u>
137 STEP1_CMD
138 </pre></div>
139
140 <p>As you can see the result is missing a $. Prepending a leading \ before the $ fixes this. Adding in the eval portion also works:</p>
141
142 <div class="code"><pre>
143 <font color="red"><b>RH8.0:</b></font><u>eval echo \$"STEP${BUILD_STEP}_CMD"</u>
144 ls /tmp
145 </pre></div>
146
147 <p>However when this is assigned to another environment variable (i.e. cmd) the result is not correct:</p>
148
149 <div class="code"><pre>
150 <font color="red"><b>RH8.0:</b></font><u>cmd=`eval echo \$"STEP${BUILD_STEP}_CMD"`</u>
151 <font color="red"><b>RH8.0:</b></font><u>echo $cmd</u>
152 STEP1_CMD
153 </pre></div>
154
155 <p>Subsituting the syntax of $(<command>) for `<command` however does work:</p>
156
157 <div class="code"><pre>
158 <font color="red"><b>RH8.0:</b></font><u>cmd=$(eval echo \$"STEP${BUILD_STEP}_CMD")</u>
159 <font color="red"><b>RH8.0:</b></font><u>echo $cmd</u>
160 ls /tmp
161 </pre></div>
162
163 <p>Note that the shell (bash) has been majorly updated for RH8.0:</p>
164
165 <div class="code"><pre>
166 <font color="blue"><b>RH6.1:</b></font><u>bash -version</u>
167 GNU bash, version 1.14.7(1)
168 </pre></div>
169
170 <p>Versus:</p>
171
172 <div class="code"><pre>
173 <font color="red"><b>RH8.0:</b></font><u>bash -version</u>
174 GNU bash, version 2.05b.0(1)-release (i686-pc-linux-gnu)
175 Copyright (C) 2002 Free Software Foundation, Inc.
176 </pre></div>
177
178 <p>Please note that this new syntax also works flawlessly on the older RH 6.1.</p>
179
180 <h3>Bug in rpm configure</h3>
181
182 <p>When trying to build Bluecat on RH 8.0 and running mktools (to build the local gnutools) I get the following:</p>
183
184 <div class="code"><pre>
185 [int@europa make]$ autoreconf -f -i
186 autoreconf: `aclocal.m4' is updated
187 Makefile.am: installing `./depcomp'
188 WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
189 WARNING: and `config.h.top', to define templates for `config.h.in'
190 WARNING: is deprecated and discouraged.
191
192 WARNING: Using the third argument of `AC_DEFINE' and
193 WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
194 WARNING: `acconfig.h':
195
196 WARNING:   AC_DEFINE([NEED_MAIN], 1,
197 WARNING:             [Define if a function `main' is needed.])
198
199 WARNING: More sophisticated templates can also be produced, see the
200 WARNING: documentation.
201 autoheader-2.53: `config.h.in' is updated
202 </pre></div>
203
204 <p>Further, after running configure I get the following odd file in /usr/local/bluecat/eng/bluecat/make/.deps: remote-$(REMOTE).Po which causes the make to fail:</p>
205
206 <div class="code"><pre>
207 [int@europa make]$ make
208 Makefile:329: .deps/remote-stub.Po: No such file or directory
209 make: *** No rule to make target `.deps/remote-stub.Po'.  Stop.
210 </pre></div>
211
212 <p>Renaming .deps/remote-$(REMOTE).Po -> .deps/remote-stub.Po allows the make to proceed.</p>
213
214 <h3>Static vs. Shared - Cannot find -lnss_dns</h3>
215
216 <p>During the first real build step, step 2, the build fails when trying to build rpm. ld is unable to find the library nss_dns. Initial investigation shows that there is a nss_dns libs under /usr/lib as .so files but there is no .a file on RH 8.0. There is a .a file on RH 6.1 in /usr/lib. Apparently RH 8.0 no longer offers archive libraries for this. The solution to this problem is to pass -shared to gcc.</p>
217
218 <p>The specific gcc command line is:</p>
219
220 <div class="code"><pre>
221 <font color="blue"><b>int@europa tools:</b></font><u>pwd</u>
222 /var/tmp/rpm-4.2/tools
223 <font color="blue"><b>int@europa tools:</b></font><u>gcc -Wl,--verbose -O2 -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -o rpmgraph <font color="red"><b>-static</b></font> rpmgraph.o  ../lib/.libs/librpm.a /var/tmp/rpm-4.2/rpmdb/.libs/librpmdb.a -L/var/tmp/rpm-4.2/zlib -L/usr/local/lib /var/tmp/rpm-4.2/rpmio/.libs/librpmio.a /var/tmp/rpm-4.2/popt/.libs/libpopt.a ../beecrypt/.libs/libbeecrypt.a -lrt -lpthread -lc -lnss_dns -lnss_files -lresolv</u>
224 ...
225 (/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libc.a)truncate64.o
226 (/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libc.a)truncate.o
227 attempt to open /var/tmp/rpm-4.2/zlib/libnss_dns.a failed
228 attempt to open /usr/local/lib/libnss_dns.a failed
229 attempt to open /usr/lib/gcc-lib/i386-redhat-linux/3.2/libnss_dns.a failed
230 attempt to open /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libnss_dns.a failed
231 attempt to open /usr/i386-redhat-linux/lib/libnss_dns.a failed
232 attempt to open /usr/lib/libnss_dns.a failed
233 attempt to open /usr/local/lib/libnss_dns.a failed
234 attempt to open /lib/libnss_dns.a failed
235 collect2: ld returned 1 exit status
236 </pre></div>
237
238 <p>This is probably due to the -static above. Removing -static fixes this. The question is: Is it OK to remove -static? Second question is how?</p>
239
240
241
242
243                               
244                               <p class="entry-footer">
245                                  <span class="post-footers">Posted by  at 10:39 AM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000331.html">Permalink</a>
246                                  
247                                  
248                               </p>
249                            </div>
250                         </div>
251                      </div>
252                      
253                      
254
255                      <h2 class="date-header">April  5, 2005</h2>
256                      <a id="a000330"></a>
257                      <div class="entry" id="entry-330">
258                         <h3 class="entry-header">Hybrid OS</h3>
259                         <div class="entry-content">
260                            <div class="entry-body">
261                               <ul>
262   <li>Checked in Hybrid OS, bin-image, toolbox and tst suite</li>
263
264   <li>Build both dev and pdn for HybridOS</li>
265
266   <li>Create packages for Hybrid OS</li>
267
268   <li>Updated ChangeSynergy</li>
269 </ul>
270                               
271                               <p class="entry-footer">
272                                  <span class="post-footers">Posted by  at  4:29 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000330.html">Permalink</a>
273                                  
274                                  
275                               </p>
276                            </div>
277                         </div>
278                      </div>
279                      
280                      
281
282                      <h2 class="date-header">April  4, 2005</h2>
283                      <a id="a000329"></a>
284                      <div class="entry" id="entry-329">
285                         <h3 class="entry-header">Building Bluecat on RH 8.0</h3>
286                         <div class="entry-content">
287                            <div class="entry-body">
288                               <ul>
289   <li>Build local GNUTools on RH 8.0</li>
290
291   <li>Fixed bug in do_it script WRT RH 8.0</li>
292 </ul>
293                               
294                               <h3>Building GNUTools on RH 8.0</h3>
295
296 <p>When trying to build Bluecat on RH 8.0 and running mktools (to build the local gnutools) I get the following:</p>
297
298 <div class="code"><pre>
299 [int@europa make]$ autoreconf -f -i
300 autoreconf: `aclocal.m4' is updated
301 Makefile.am: installing `./depcomp'
302 WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
303 WARNING: and `config.h.top', to define templates for `config.h.in'
304 WARNING: is deprecated and discouraged.
305
306 WARNING: Using the third argument of `AC_DEFINE' and
307 WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
308 WARNING: `acconfig.h':
309
310 WARNING:   AC_DEFINE([NEED_MAIN], 1,
311 WARNING:             [Define if a function `main' is needed.])
312
313 WARNING: More sophisticated templates can also be produced, see the
314 WARNING: documentation.
315 autoheader-2.53: `config.h.in' is updated
316 </pre></div>
317
318 <p>Further, after running configure I get the following odd file in /usr/local/bluecat/eng/bluecat/make/.deps: remote-$(REMOTE).Po which causes the make to fail:</p>
319
320 <div class="code"><pre>
321 [int@europa make]$ make
322 Makefile:329: .deps/remote-stub.Po: No such file or directory
323 make: *** No rule to make target `.deps/remote-stub.Po'.  Stop.
324 </pre></div>
325
326 <p>Renaming .deps/remote-$(REMOTE).Po -> .deps/remote-stub.Po allows the make to proceed.</p>
327
328 <h3>Fun with eval, echo and new shell</h3>
329
330 <p>One of the things that the Bluecat do_it script does is to define the series of "steps" that need to be performed in terms of command lines in variables. Later on the $BUILD_STEP is evaluated to determine which set of commands need to be done as follows:</p>
331
332 <div class="code"><pre>
333 echo "---- Step $BUILD_STEP started at `date` ----"
334 su $BUILD_CMD_OWNER -c "mkdir -p $LOGS_PREFIX/step${BUILD_STEP}"
335 cmd=`eval echo $"STEP${BUILD_STEP}_CMD"`
336 su $BUILD_CMD_OWNER -c "$cmd $*"
337 </pre></div>
338
339 <p>Effectively the name of the environment variable holding the proper command(s) for the step is composed with the echo portion. The eval statement is used to "evaluate" that environment variable thus storing the string of commands into the environment variable cmd. This works well in past versions of the OS but it fails in RH 8.0. First here's the behavior on RH 6.1:</p>
340
341 <div class="code"><pre>
342 <font color="blue"><b>RH6.1:</b></font><u>export STEP1_CMD="ls /tmp"</u>
343 <font color="blue"><b>RH6.1:</b></font><u>export BUILD_STEP=1</u>
344 <font color="blue"><b>RH6.1:</b></font><u>echo $"STEP${BUILD_STEP}_CMD"</u>
345 $STEP1_CMD
346 </pre></div>
347
348 <p>However hears the same commands on RH8.0:</p>
349
350 <div class="code"><pre>
351 <font color="red"><b>RH8.0:</b></font><u>export STEP1_CMD="ls /tmp"</u>
352 <font color="red"><b>RH8.0:</b></font><u>export BUILD_STEP=1</u>
353 <font color="red"><b>RH8.0:</b></font><u>echo $"STEP${BUILD_STEP}_CMD"</u>
354 STEP1_CMD
355 </pre></div>
356
357 <p>As you can see the result is missing a $. Prepending a leading \ before the $ fixes this. Adding in the eval portion also works:</p>
358
359 <div class="code"><pre>
360 <font color="red"><b>RH8.0:</b></font><u>eval echo \$"STEP${BUILD_STEP}_CMD"</u>
361 ls /tmp
362 </pre></div>
363
364 <p>However when this is assigned to another environment variable (i.e. cmd) the result is not correct:</p>
365
366 <div class="code"><pre>
367 <font color="red"><b>RH8.0:</b></font><u>cmd=`eval echo \$"STEP${BUILD_STEP}_CMD"`</u>
368 <font color="red"><b>RH8.0:</b></font><u>echo $cmd</u>
369 STEP1_CMD
370 </pre></div>
371
372 <p>Subsituting the syntax of $(<command>) for `<command` however does work:</p>
373
374 <div class="code"><pre>
375 <font color="red"><b>RH8.0:</b></font><u>cmd=$(eval echo \$"STEP${BUILD_STEP}_CMD")</u>
376 <font color="red"><b>RH8.0:</b></font><u>echo $cmd</u>
377 ls /tmp
378 </pre></div>
379
380 <p>Note that the shell (bash) has been majorly updated for RH8.0:</p>
381
382 <div class="code"><pre>
383 <font color="blue"><b>RH6.1:</b></font><u>bash -version</u>
384 GNU bash, version 1.14.7(1)
385 </pre></div>
386
387 <p>Versus:</p>
388
389 <div class="code"><pre>
390 <font color="red"><b>RH8.0:</b></font><u>bash -version</u>
391 GNU bash, version 2.05b.0(1)-release (i686-pc-linux-gnu)
392 Copyright (C) 2002 Free Software Foundation, Inc.
393 </pre></div>
394
395 <p>Please note that this new syntax also works flawlessly on the older RH 6.1.</p>
396                               
397                               <p class="entry-footer">
398                                  <span class="post-footers">Posted by  at  2:33 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000329.html">Permalink</a>
399                                  
400                                  
401                               </p>
402                            </div>
403                         </div>
404                      </div>
405                      
406                   </div>
407                </div>
408             </div>
409          </div>
410       </div>
411    </div>
412 </body>
413 </html>