Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / 2007_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: March 2007 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/2007_01.html" title="January 2007" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/2007_04.html" title="April 2007" />
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/2007_01.html">&laquo; January 2007</a> |
36                         <a href="http://defaria.com/blogs/Status/">Main</a>
37                         | <a href="http://defaria.com/blogs/Status/archives/2007_04.html">April 2007 &raquo;</a>
38                      </p>
39                      
40                      
41                      <!--
42 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
43          xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
44          xmlns:dc="http://purl.org/dc/elements/1.1/">
45 <rdf:Description
46     rdf:about="http://defaria.com/blogs/Status/archives/2007_03.html#entry-000628"
47     trackback:ping="http://defaria.com/mt/mt-tb.cgi/17"
48     dc:title="DLPActivity.pl/YELL"
49     dc:identifier="http://defaria.com/blogs/Status/archives/2007_03.html#entry-000628"
50     dc:subject="Texas Instruments"
51     dc:description=" Rewrote DLPAcctivity.pl, a Clearquest reporting tool that emails DLP engineers about Clearquest defects Look into YELL scripts..."
52     dc:creator=""
53     dc:date="2007-03-30T17:07:21-06:00" />
54 </rdf:RDF>
55 -->
56
57
58                      <h2 class="date-header">March 30, 2007</h2>
59                      <a id="a000628"></a>
60                      <div class="entry" id="entry-628">
61                         <h3 class="entry-header">DLPActivity.pl/YELL</h3>
62                         <div class="entry-content">
63                            <div class="entry-body">
64                               <ul>
65   <li>Rewrote DLPAcctivity.pl, a Clearquest reporting tool that emails DLP engineers about Clearquest defects</li>
66
67   <li>Look into YELL scripts</li>
68 </ul>
69                               
70                               <p class="entry-footer">
71                                  <span class="post-footers">Posted by  at  5:07 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000628.html">Permalink</a>
72                                  
73                                  | <a href="http://defaria.com/blogs/Status/archives/000628.html#trackback">TrackBacks (0)</a>
74                               </p>
75                            </div>
76                         </div>
77                      </div>
78                      
79                      <!--
80 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
81          xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
82          xmlns:dc="http://purl.org/dc/elements/1.1/">
83 <rdf:Description
84     rdf:about="http://defaria.com/blogs/Status/archives/2007_03.html#entry-000627"
85     trackback:ping="http://defaria.com/mt/mt-tb.cgi/16"
86     dc:title="mkview_linked/GPDB Login"
87     dc:identifier="http://defaria.com/blogs/Status/archives/2007_03.html#entry-000627"
88     dc:subject="Texas Instruments"
89     dc:description=" Finished work on mkview_linked for MySQL databasse Implemented login for GPDB with cookies..."
90     dc:creator=""
91     dc:date="2007-03-28T17:03:40-06:00" />
92 </rdf:RDF>
93 -->
94
95
96                      <h2 class="date-header">March 28, 2007</h2>
97                      <a id="a000627"></a>
98                      <div class="entry" id="entry-627">
99                         <h3 class="entry-header">mkview_linked/GPDB Login</h3>
100                         <div class="entry-content">
101                            <div class="entry-body">
102                               <ul>
103   <li>Finished work on mkview_linked for MySQL databasse</li>
104
105   <li>Implemented login for GPDB with cookies</li>
106 </ul>
107                               
108                               <p class="entry-footer">
109                                  <span class="post-footers">Posted by  at  5:03 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000627.html">Permalink</a>
110                                  
111                                  | <a href="http://defaria.com/blogs/Status/archives/000627.html#trackback">TrackBacks (0)</a>
112                               </p>
113                            </div>
114                         </div>
115                      </div>
116                      
117                      <!--
118 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
119          xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
120          xmlns:dc="http://purl.org/dc/elements/1.1/">
121 <rdf:Description
122     rdf:about="http://defaria.com/blogs/Status/archives/2007_03.html#entry-000626"
123     trackback:ping="http://defaria.com/mt/mt-tb.cgi/15"
124     dc:title="GPDB Login"
125     dc:identifier="http://defaria.com/blogs/Status/archives/2007_03.html#entry-000626"
126     dc:subject="GPDB"
127     dc:description=" Started implementing a login facility for GPDB..."
128     dc:creator=""
129     dc:date="2007-03-26T16:57:06-06:00" />
130 </rdf:RDF>
131 -->
132
133
134                      <h2 class="date-header">March 26, 2007</h2>
135                      <a id="a000626"></a>
136                      <div class="entry" id="entry-626">
137                         <h3 class="entry-header">GPDB Login</h3>
138                         <div class="entry-content">
139                            <div class="entry-body">
140                               <ul>
141   <li>Started implementing a login facility for GPDB</li>
142 </ul>
143                               
144                               <p>Just about the time we were getting the <em>Single Signon</em> working I realized that we also have command line or a script based API in which we allow others to call GPDB functionality. Part of that functionality is logging in with gpdb_login. Well since we didn't come through Single Signon nro a web page how do we get the authorization to log into the database? Answer is we don't. Single Signon is only good for web apps where the <b>only</b> way into the application is through the web.</p>
145
146 <p>The security guys did mention something about a command line alternative but it didn't seem like it would fit the bill. I believe that it only allows you to authenticate as your currently logged in user. What if, for example, user A wished to connect to GPDB as user B and knows user B's username and password? What when a script wished to login as an admin on behalf of all users. These questions need to be answered.</p>
147                               
148                               <p class="entry-footer">
149                                  <span class="post-footers">Posted by  at  4:57 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000626.html">Permalink</a>
150                                  
151                                  | <a href="http://defaria.com/blogs/Status/archives/000626.html#trackback">TrackBacks (0)</a>
152                               </p>
153                            </div>
154                         </div>
155                      </div>
156                      
157                      <!--
158 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
159          xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
160          xmlns:dc="http://purl.org/dc/elements/1.1/">
161 <rdf:Description
162     rdf:about="http://defaria.com/blogs/Status/archives/2007_03.html#entry-000625"
163     trackback:ping="http://defaria.com/mt/mt-tb.cgi/14"
164     dc:title="GPDB Web Update/Oracle testing"
165     dc:identifier="http://defaria.com/blogs/Status/archives/2007_03.html#entry-000625"
166     dc:subject="Texas Instruments"
167     dc:description=" Added menus to GPDB web Tested and documented access of Oracle databases, such as GPDB, using standard Perl and standard Oracle libraries from various architectures..."
168     dc:creator=""
169     dc:date="2007-03-21T16:52:37-06:00" />
170 </rdf:RDF>
171 -->
172
173
174                      <h2 class="date-header">March 21, 2007</h2>
175                      <a id="a000625"></a>
176                      <div class="entry" id="entry-625">
177                         <h3 class="entry-header">GPDB Web Update/Oracle testing</h3>
178                         <div class="entry-content">
179                            <div class="entry-body">
180                               <ul>
181   <li>Added menus to GPDB web</li>
182
183   <li>Tested and documented access of Oracle databases, such as GPDB, using standard Perl and standard Oracle libraries from various architectures</li>
184 </ul>
185                               
186                               <p>Joe Ramey had worked on getting the Oracle Linux client API library to work with Perl. I am trying to validate that this works on all supported architectures where <i>all supported architectures</i> is considered the subset of:</p>
187 <ol>
188   <li>Solaris (e.g. Stashu)</li>
189   <li>Linux 32-bit (e.g. Fad01)</li>
190   <li>Linux 64-bit AMD Opteron processor (e.g. DrTeeth)</li>
191   <li>Linux 64-bit Intel processor (e.g. Fad11)</li>
192 </ol>
193
194 <h3>How to properly code Perl to access an Oracle DB</h3>
195
196 <p>Normal access to SQL databases in Perl usually consists of use'ing two different Perl modules. First a DBI.pm module which is the<i> <b>D</b>ata<b>B</b>ase <b>I</b>ndependent</i> interface and the DBD or <b><i>D</i></b><i>ata<b>B</b>ase <b>D</b>river</i> module for the particular SQL database involved. We are interested in Oracle here but others include mSQL, MySQL, etc.</p>
197
198 <p>Couple this with the fact that we wish to use the standard Perl (e.g. /apps/perl/5.8.3/bin/perl) and standard Perl modules (/apps/perl/modules-&lt;<i>datecode</i>&gt; where <i>datecode</i> is some combination of a year/month date code whose apparent LCD seems to be modules-0412).</p>
199
200 <p>So first our Perl script should start with:</p>
201
202 <div class=code><pre>
203 <font color="#3333ff">#!/apps/perl/5.8.3/bin/perl</font>
204 <font color="#ff0000">use strict</font>;
205 <font color="#ff0000">use warnings</font>;
206
207 <font color="#3333ff"># Standard CDOE modules (Modules of the month!) - need this to pick up DBI.pm</font>
208 <font color="#ff0000">use lib</font> "<font color="#009900">/apps/perl/modules-0412/lib</font>";
209 </pre></div>
210
211 <p>So as the comment indicates we are picking up the DBI.pm module from here. Next, normally, we'd simply include the lib path for the Oracle DBD.pm (or in the special case of Oracle, the Oracle.pm file) as well as the supporting shared library Oracle.so (which is architecturally dependent) by coding the following:</p>
212
213 <div class=code><pre>
214 <font color="#3333ff"># Perl/Oracle libraries</font>
215 <font color="#ff0000">use lib</font> "<font color="#009900">/apps/oracle/perl/10.2.0.1.0/lib</font>";
216 </pre></div>
217
218 <p>However, since Linux client support is not included in /apps/oracle/perl/10.2.0.1.0/lib (yet) we need to pick up Joe's stuff:</p>
219
220 <div class=code><pre>
221 <font color="#3333ff"># Linux API is in Ramey's home dir...</font>
222 <font color="#ff0000">use lib</font> "<font color="#009900">/home/ramey/oracle/perl/10.2.0.1.0/lib</font>";
223 </pre></div>
224
225 <p>The next excerpt from my code, shown in it's entirety later, shows a lib path I used to use that allows Solaris clients to work correctly, however we wish to move away from this special cased library thus it's commented out here:</p>
226
227 <div class=code><pre>
228 <font color="#3333ff"># This is a non standard Oracle</font>
229 <font color="#3333ff">#use lib "/apps/perl/5.8.0/lib/perl5/site_perl/5.8.0";</font>
230 </pre></div>
231
232 <p>As the full code listing that follows shows I then use my current development libraries and attempt to log into the development version of GPDB, and Oracle database, and retrieve and display some rudimentary data:</p>
233
234 <p><font color="#999999">Entire code listing of ~x0062320/testgpdb.pl</font></p>
235
236 <div class=code><pre>
237 <font color="#3333ff">#!/apps/perl/5.8.3/bin/perl</font>
238 <font color="#ff0000">use strict</font>;
239 <font color="#ff0000">use warnings</font>;
240
241 <font color="#3333ff"># Standard CDOE modules (Modules of the month!) - need this to pick up DBI.pm</font>
242 <font color="#ff0000">use lib</font> "<font color="#009900">/apps/perl/modules-0412/lib</font>";
243
244 <font color="#3333ff"># Perl/Oracle libraries</font>
245 <font color="#ff0000">use lib</font> "<font color="#009900">/apps/oracle/perl/10.2.0.1.0/lib</font>";
246
247 <font color="#3333ff"># Linux API is in Ramey's home dir...</font>
248 <font color="#ff0000">use lib</font> "<font color="#009900">/home/ramey/oracle/perl/10.2.0.1.0/lib</font>";
249
250 <font color="#3333ff"># This is a non standard Oracle</font>
251 <font color="#3333ff">#use lib "/apps/perl/5.8.0/lib/perl5/site_perl/5.8.0";
252
253 # Current development GPDB modules</font>
254 <font color="#ff0000">use lib</font> "<font color="#009900">/web/gpdb/cgi-bin</font>";
255
256 <font color="#ff0000">use GPDB::gpdb</font>;
257
258 <font color="#3333ff"># Log into GPDB - read only</font>
259 gpdb_login (<font color="#33cc00">undef</font>, <font color="#33cc00">undef</font>, "<font color="#009900">OracleDevelopment</font>");
260
261 <font color="#3333ff"># Get a project</font>
262 <font color="#ff0000">my</font> <font color="#3333ff"><b>@projects</b></font> = gpdb_getProject ("<font color="#009900">uma</font>");
263
264 <font color="#3333ff"># Play with it a little bit...</font>
265 <font color="#ff0000">my</font> <i><font color="#ff0000">%project</font></i> = %{<font color="#3333ff"><b>$projects</b></font> [0][0]};
266
267 <font color="#33cc00">print</font> "<font color="#009900">Project: ${project {PROJECT}{NAME}}\n</font>";
268 <font color="#33cc00">print</font> "<font color="#009900">Site: ${project {PROJECT}{SITE_NAME}}\n</font>";
269
270 <font color="#33cc00">print</font> "<font color="#009900">Vobs:\n</font>";
271
272 <font color="#ff0000">foreach</font> (@{<font color="#ff0000">$project</font> {CLEARCASE}}) {
273 <font color="#ff0000">my</font> <i><font color="#ff0000">%cc</font></i> = %{$_};
274
275 <font color="#33cc00">print</font> "<font color="#009900">\t${cc {VOB_TAG}}\n</font>";
276 } <font color="#3333ff"># foreach</font>
277
278 <font color="#33cc00">print</font> "<font color="#009900">done\n</font>";
279 </pre></div>
280
281 <h3>Results</h3>
282
283 <p>Here's the results running on the target architectures:</p>
284
285 <div class=code><pre>
286 $ ssh stashu testgpdb.pl
287 DBI connect('host=dflorad01.itg.ti.com;sid=flddsync;port=1521','cm_gpdb_readonly',...) failed: ERROR OCIEnvNlsCreate. Check ORACLE_HOME env var, NLS settings, permissions, etc. at /web/gpdb/cgi-bin/GPDB/DBHelper.pm line 136
288 Could not connect to database. Check $ORACLE_HOME. at /web/gpdb/cgi-bin/GPDB/primitive.pm line 81
289 $ ssh fad01 testgpdb.pl
290 Project: uma
291 Site: Dallas
292 Vobs:
293         /cdb/dspumatdl
294         /cdb/uma
295         /cdb/uma_2.2
296         /cdb/uma_2.6a
297 done
298 $ ssh drteeth testgpdb.pl
299 Project: uma
300 Site: Dallas
301 Vobs:
302         /cdb/dspumatdl
303         /cdb/uma
304         /cdb/uma_2.2
305         /cdb/uma_2.6a
306 done
307 $ ssh fad11 testgpdb.pl
308 Can't load
309 '/home/ramey/oracle/perl/10.2.0.1.0/lib/i686-linux-thread-multi/auto/DBI/DBI.so' for module DBI: /lib/libc.so.6: version `GLIBC_2.3' not found (required by
310 /home/ramey/oracle/perl/10.2.0.1.0/lib/i686-linux-thread-multi/auto/DBI/DBI.so) at /apps/perl/5.8.3/lib/5.8.3/i686-linux-thread-multi/DynaLoader.pm line 229.
311 at /home/ramey/oracle/perl/10.2.0.1.0/lib/i686-linux-thread-multi/DBI.pm line 259
312 BEGIN failed--compilation aborted at /home/ramey/oracle/perl/10.2.0.1.0/lib/i686-linux-thread-multi/DBI.pm line 259.
313 Compilation failed in require at /web/gpdb/cgi-bin/GPDB/primitive.pm line 24.
314 BEGIN failed--compilation aborted at /web/gpdb/cgi-bin/GPDB/primitive.pm line 24.
315 Compilation failed in require at /web/gpdb/cgi-bin/GPDB/gpdb.pm line 38.
316 BEGIN failed--compilation aborted at /web/gpdb/cgi-bin/GPDB/gpdb.pm line 38.
317 Compilation failed in require at ./testgpdb.pl line 20.
318 BEGIN failed--compilation aborted at ./testgpdb.pl line 20.
319 </pre></div>
320
321 <p>So as we can see this is <b>not</b> working for Solaris or Linux 64-bit Intel.</p>
322                               
323                               <p class="entry-footer">
324                                  <span class="post-footers">Posted by  at  4:52 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000625.html">Permalink</a>
325                                  
326                                  | <a href="http://defaria.com/blogs/Status/archives/000625.html#trackback">TrackBacks (0)</a>
327                               </p>
328                            </div>
329                         </div>
330                      </div>
331                      
332                      <!--
333 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
334          xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
335          xmlns:dc="http://purl.org/dc/elements/1.1/">
336 <rdf:Description
337     rdf:about="http://defaria.com/blogs/Status/archives/2007_03.html#entry-000624"
338     trackback:ping="http://defaria.com/mt/mt-tb.cgi/13"
339     dc:title="MySQL Client Libraries"
340     dc:identifier="http://defaria.com/blogs/Status/archives/2007_03.html#entry-000624"
341     dc:subject="Texas Instruments"
342     dc:description=" Worked on solutions for MySQL client library problem..."
343     dc:creator=""
344     dc:date="2007-03-16T17:32:56-06:00" />
345 </rdf:RDF>
346 -->
347
348
349                      <h2 class="date-header">March 16, 2007</h2>
350                      <a id="a000624"></a>
351                      <div class="entry" id="entry-624">
352                         <h3 class="entry-header">MySQL Client Libraries</h3>
353                         <div class="entry-content">
354                            <div class="entry-body">
355                               <ul>
356   <li>Worked on solutions for MySQL client library problem</li>
357 </ul>
358                               
359                               Andrew DeFaria wrote:
360 <blockquote type="cite"> Chris Davey
361 wrote:
362   <blockquote type="cite">
363 <p>Andrew</p>
364     
365 <p>have update the /apps/cmpackages as per the web page ane try the new version of mkview_linked but faile to run:</p>
366
367 <h3>sunos</h3>
368
369 <div class=code><pre>
370 warmflash,a0741187&gt; ./mkview_linked 
371 install_driver(mysql) failed: Can't load
372 '/apps/cmpackages/perl/lib/site_perl/5.8.0/sun4-solaris-thread-multi/auto/DBD/mysql/mysql.so'
373 for module DBD::mysql: ld.so.1: mkview_linked: fatal:
374 libmysqlclient.so.12: open failed: No such file or directory at
375 /apps/cmpackages/perl/lib/5.8.0/sun4-solaris-thread-multi/DynaLoader.pm
376 line 229.
377 at (eval 1) line 3
378 Compilation failed in require at (eval 1) line 3.
379 Perhaps a required shared library or dll isn't installed where expected
380 at ./mkview_linked line 54
381
382 warmflash,a0741187&gt; ls -l
383 /apps/cmpackages/perl/lib/site_perl/5.8.0/sun4-solaris-thread-multi/auto/DBD/mysql
384 total 712
385 -r--r--r-- 1 amemgr ameadm 0 Mar 16 09:05 mysql.bs
386 -r-xr-xr-x 1 amemgr ameadm 360080 Mar 16 09:05 mysql.so*
387 </pre></div>
388
389 <h3>linux</h3>
390
391 <div class=code><pre>
392 ace.tiuk.ti.com,a0741187&gt; ./mkview_linked
393 install_driver(mysql) failed: Can't load
394 '/apps/cmpackages/perl/lib/site_perl/5.8.0/i686-linux-thread-multi/auto/DBD/mysql/mysql.so'
395 for module DBD::mysql: libmysqlclient.so.12: cannot open shared object
396 file: No such file or directory at
397 /apps/cmpackages/perl/lib/5.8.0/i686-linux-thread-multi/DynaLoader.pm
398 line 229.
399 at (eval 1) line 3
400 Compilation failed in require at (eval 1) line 3.
401 Perhaps a required shared library or dll isn't installed where expected
402 at ./mkview_linked line 54
403 ace.tiuk.ti.com,a0741187&gt; ls -l
404 /apps/cmpackages/perl/lib/site_perl/5.8.0/sun4-solaris-thread-multi/auto/DBD/mysql
405 ls:
406 /apps/cmpackages/perl/lib/site_perl/5.8.0/sun4-solaris-thread-multi/auto/DBD/mysql:
407 No such file or directory
408 </pre></div>
409   </blockquote>
410
411 <p>The problem seems to be that you lack /apps/mysql/&lt;version&gt; which is what we used to build the DBD::mysql package. We are working on alternate solutions. Meantime could you try the following:</p>
412
413   <ul>
414     <li>mkdir /apps/mysql</li>
415     <li>On Solaris (warmflash): rsync -rlz
416 stashu.dal.design.ti.com:/apps/mysql/4.0.16 /apps/mysql</li>
417     <li>On Linux (ace): rsync -rlz
418 drteeth.dal.design.ti.com:/apps/mysql/4.0.17 /app/mysql</li>
419   </ul>
420
421 <p>Try mkview_linked. Let us know.</p>
422
423 </blockquote>
424
425 <h1>Meantime back at the lab...</h1>
426
427 <h2>Short version:</h2>
428
429 <p>Nix the rsyncing of /apps/mysql and redo the rsync of /apps/cmpackages. We're put a copy of mysql under /apps/cmpackages. After refreshing your /apps/cmpackages area you should see an /apps/cmpackages/mysql directory. Then test mkview_linked again.</p>
430
431 <h2>Long version (AKA the gory details...)</h2>
432
433 <p>In order to get mkview_linked to use DBD::mysql, the Perl package of mysql must be compiled and installed. Perl packages often glue some subsystem's API (in this case MySQL), normally written in C or something like that to a Perl package (i.e. a .pm file). So on the one
434 end we have architecturally dependent code (usually a .a or .so library) and on the other we have (hopefully) architecturally neutral and interpreted Perl code (the .pm module). Therefore the process usually involves a makefile, execution of gcc to compile the <i>glue code</i> between the Perl and the subsystem's API as well as installing into the proper place, all of these files.</p>
435
436 <p>When Perl then calls the module DynaLoader.pm gets involved to load the appropriate architecturally dependent libraries so that calls to the Perl subroutines flow through the glue code and the appropriate API is called.</p>
437
438 <p>Since architecturally dependent code is involved we need to build this for the different architectures that we support. Further, MySQL in particular, has it's own library, libmysqlclient.a, which contains the API itself. So the glue code (mysql.so) needs to locate and load the appropriate libmysqlclient.a before it can successfully call an API. Finally there are issues of the version number of the, in this case, client software and the server software. Suffice to say, this is not always easy stuff!</p>
439
440 <p>Oh and we need mention that we are also talking about a large corporation here with various sites and the like; in most cases MySQL's client libraries will <b>not</b> be available locally nor of the right version - IOW we cannot trust that the MySQL client libraries will be local.</p>
441
442 <p>Oh and did I mention that mysql is not officially supported by TI...</p>
443
444 <p>We had hoped that /apps/mysql/&lt;version&gt;, while not officially supported, would be widely available but on our first guinea pi... ah... test subject, TI UK, we found that not to be the case. It looked like we had two ways to go: either 1) copy the /apps/mysql/&lt;version&gt; over to the remote sites or 2) include the /apps/mysql/&lt;version&gt; trees under /apps/cmpackages as our own mini distribution. I've implemented the latter. Now refreshing your /apps/cmpackages tree will carry along the necessary MySQL client libraries necessary to support mkview_linked and friends in most situations.</p>
445                               
446                               <p class="entry-footer">
447                                  <span class="post-footers">Posted by  at  5:32 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000624.html">Permalink</a>
448                                  
449                                  | <a href="http://defaria.com/blogs/Status/archives/000624.html#trackback">TrackBacks (0)</a>
450                               </p>
451                            </div>
452                         </div>
453                      </div>
454                      
455                      <!--
456 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
457          xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
458          xmlns:dc="http://purl.org/dc/elements/1.1/">
459 <rdf:Description
460     rdf:about="http://defaria.com/blogs/Status/archives/2007_03.html#entry-000623"
461     trackback:ping="http://defaria.com/mt/mt-tb.cgi/12"
462     dc:title="Remote sites/mkview"
463     dc:identifier="http://defaria.com/blogs/Status/archives/2007_03.html#entry-000623"
464     dc:subject="Texas Instruments"
465     dc:description=" Gained access to a few new remote sites. Updated GPDB. Alas there&apos;s no DesignSync info at these sites and none of the vobs have vobstorage paths that indicate a project! Got access to cmmgr but was unable to publish..."
466     dc:creator=""
467     dc:date="2007-03-13T17:26:14-06:00" />
468 </rdf:RDF>
469 -->
470
471
472                      <h2 class="date-header">March 13, 2007</h2>
473                      <a id="a000623"></a>
474                      <div class="entry" id="entry-623">
475                         <h3 class="entry-header">Remote sites/mkview</h3>
476                         <div class="entry-content">
477                            <div class="entry-body">
478                               <ul>
479   <li>Gained access to a few new remote sites. Updated GPDB. Alas there's no DesignSync info at these sites and none of the vobs have vobstorage paths that indicate a project!</li>
480
481   <li>Got access to cmmgr but was unable to publish new mysql from all architectures</li>
482
483   <li>Started incorporating the UK changes into mkview. Need to replicate these to mkview_linked (?)</li>
484 </ul>
485                               
486                               <p class="entry-footer">
487                                  <span class="post-footers">Posted by  at  5:26 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000623.html">Permalink</a>
488                                  
489                                  | <a href="http://defaria.com/blogs/Status/archives/000623.html#trackback">TrackBacks (0)</a>
490                               </p>
491                            </div>
492                         </div>
493                      </div>
494                      
495                      <!--
496 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
497          xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
498          xmlns:dc="http://purl.org/dc/elements/1.1/">
499 <rdf:Description
500     rdf:about="http://defaria.com/blogs/Status/archives/2007_03.html#entry-000622"
501     trackback:ping="http://defaria.com/mt/mt-tb.cgi/11"
502     dc:title="Clearcase License Graphs"
503     dc:identifier="http://defaria.com/blogs/Status/archives/2007_03.html#entry-000622"
504     dc:subject="Texas Instruments"
505     dc:description=" Worked on Clearcase License Graphs web page..."
506     dc:creator=""
507     dc:date="2007-03-08T18:52:25-06:00" />
508 </rdf:RDF>
509 -->
510
511
512                      <h2 class="date-header">March  8, 2007</h2>
513                      <a id="a000622"></a>
514                      <div class="entry" id="entry-622">
515                         <h3 class="entry-header">Clearcase License Graphs</h3>
516                         <div class="entry-content">
517                            <div class="entry-body">
518                               <ul>
519   <li>Worked on Clearcase License Graphs web page</lI>
520 </ul>
521                               
522                               <p>Seems this set of scripts didn't like the additional of the Make licensing because Make licensing often had 0 usage. The 0 was being carried forward and used as a denominator for some divisions causing divide by zero errors. I fixed up these errors which then caused it to loop indefinitely. Seems a for loop didn't properly anticipate having a usage of 0. Fixed</p>
523                               
524                               <p class="entry-footer">
525                                  <span class="post-footers">Posted by  at  6:52 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000622.html">Permalink</a>
526                                  
527                                  | <a href="http://defaria.com/blogs/Status/archives/000622.html#trackback">TrackBacks (0)</a>
528                               </p>
529                            </div>
530                         </div>
531                      </div>
532                      
533                      <!--
534 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
535          xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
536          xmlns:dc="http://purl.org/dc/elements/1.1/">
537 <rdf:Description
538     rdf:about="http://defaria.com/blogs/Status/archives/2007_03.html#entry-000621"
539     trackback:ping="http://defaria.com/mt/mt-tb.cgi/10"
540     dc:title="Building DBD::MySQL"
541     dc:identifier="http://defaria.com/blogs/Status/archives/2007_03.html#entry-000621"
542     dc:subject="Texas Instruments"
543     dc:description=" Built DBD::MySQL for Solaris Having problems building DBD::MySQL for Linux..."
544     dc:creator=""
545     dc:date="2007-03-07T17:44:17-06:00" />
546 </rdf:RDF>
547 -->
548
549
550                      <h2 class="date-header">March  7, 2007</h2>
551                      <a id="a000621"></a>
552                      <div class="entry" id="entry-621">
553                         <h3 class="entry-header">Building DBD::MySQL</h3>
554                         <div class="entry-content">
555                            <div class="entry-body">
556                               <ul>
557   <li>Built DBD::MySQL for Solaris</li>
558
559   <li>Having problems building DBD::MySQL for Linux</li>
560 </ul>
561
562                               
563                               <h2>How to build DBD::MySQL</h2>
564
565 <p>After downloading DBD::mysql from
566 <a href="http://search.cpan.org/~capttofu/DBD-mysql-4.003/lib/DBD/mysql.pm">http://search.cpan.org/~capttofu/DBD-mysql-4.003/lib/DBD/mysql.pm</a> I encountered some problems. First one needs to use the appropriate perl, one that has a compatible DBI module already. I found this in /app/cmpackages/perl/bin/perl. The more standard perl, /apps/perl/5.8.3/bin/perl seems to have a newer DBI module that is not compatible with the DBD::mysql that I downloaded.</p>
567
568 <p>Then one needs to give the proper parameters to generate the Makefile:</p>
569
570 <div class=code><pre>
571 $ export PATH=$PATH:/apps/mysql/4.0.16/bin
572 $ /apps/cmpackages/perl/bin/perl Makefile.PL \
573 &gt;    --libs="-L/apps/mysql/4.0.16/lib/mysql -lmysqlclient -lz" \
574 &gt;    --cflags=-I/apps/mysql/4.0.16/include/mysql \
575 &gt;    --testhost=mysql01.dal.design.ti.com \&nbsp;&nbsp; <font
576  color="#ff0000"><i>These will not always be the same</i></font>
577 &gt;    --testuser=ccprojects \&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#ff0000"><i>This will change</i></font>
578 &gt;    --testpassword=ccpr0jects &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#ff0000"><i>This will change (note the 0 not O)</i></font>
579 </pre></div>
580
581 <p>Note that we explicitly use /apps/cmpackages/perl/bin/perl here. I would rather use /apps/perl/5.8.3/bin/perl but it's DBI appears to be too new for this version of DBD::mysql (!).</p>
582
583 <p>This will produce a Makefile which you then do:</p>
584
585 <div class=code><pre>
586 $ make
587 $ make test
588 </pre></div>
589
590 <p>Alas, normally one would do a make install but that would attempt to install into /usr/local/perl, not something we wish to do. And there doesn't appear to be a way to pack into Makefile.PL where you want to eventually install this module when make install is run, so we need to actually modify the Makefile itself.</p>
591
592 <p>Turns out that perl Makefile.PL &lt;<i>options</i>&gt; specifies which perl to use thus the following appears in the generated Makefile:</p>
593
594 <div class=code><pre>
595 INSTALLPRIVLIB = /apps/cmpackages/perl/lib/5.8.0
596 INSTALLSITELIB = /apps/cmpackages/perl/lib/site_perl/5.8.0
597 INSTALLVENDORLIB = 
598 INSTALLARCHLIB = /apps/cmpackages/perl/lib/5.8.0/sun4-solaris-thread-multi
599 INSTALLSITEARCH = /apps/cmpackages/perl/lib/site_perl/5.8.0/sun4-solaris-thread-multi
600 INSTALLVENDORARCH = 
601 INSTALLBIN = /apps/cmpackages/perl/bin
602 INSTALLSITEBIN = /apps/cmpackages/perl/bin
603 INSTALLVENDORBIN = 
604 INSTALLSCRIPT = /apps/cmpackages/perl/bin
605 </pre></div>
606
607 <p>Thus this means a make install will install the module into whichever Perl installation we specified in the perl Makefile.PL &lt;<i>options</i>&gt;! Alas we cannot write to those areas yet...</p>
608                               
609                               <p class="entry-footer">
610                                  <span class="post-footers">Posted by  at  5:44 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000621.html">Permalink</a>
611                                  
612                                  | <a href="http://defaria.com/blogs/Status/archives/000621.html#trackback">TrackBacks (0)</a>
613                               </p>
614                            </div>
615                         </div>
616                      </div>
617                      
618                   </div>
619                </div>
620             </div>
621          </div>
622       </div>
623    </div>
624 </body>
625 </html>