Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / 000624.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: MySQL Client Libraries</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/000623.html" title="Remote sites/mkview" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/000625.html" title="GPDB Web Update/Oracle testing" />
17
18    <!--
19 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
20          xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
21          xmlns:dc="http://purl.org/dc/elements/1.1/">
22 <rdf:Description
23     rdf:about="http://defaria.com/blogs/Status/archives/000624.html"
24     trackback:ping="http://defaria.com/mt/mt-tb.cgi/13"
25     dc:title="MySQL Client Libraries"
26     dc:identifier="http://defaria.com/blogs/Status/archives/000624.html"
27     dc:subject="Texas Instruments"
28     dc:description=" Worked on solutions for MySQL client library problem..."
29     dc:creator=""
30     dc:date="2007-03-16T17:32:56-06:00" />
31 </rdf:RDF>
32 -->
33
34
35    
36
37    <script type="text/javascript" src="http://defaria.com/blogs/Status/mt-site.js"></script>
38 </head>
39 <body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
40    <div id="container">
41       <div id="container-inner" class="pkg">
42
43          <div id="banner">
44             <div id="banner-inner" class="pkg">
45                <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
46                <h2 id="banner-description">Searchable status reports and work log</h2>
47             </div>
48          </div>
49
50          <div id="pagebody">
51             <div id="pagebody-inner" class="pkg">
52                <div id="alpha">
53                   <div id="alpha-inner" class="pkg">
54
55                      <p class="content-nav">
56                         <a href="http://defaria.com/blogs/Status/archives/000623.html">&laquo; Remote sites/mkview</a> |
57                         <a href="http://defaria.com/blogs/Status/">Main</a>
58                         | <a href="http://defaria.com/blogs/Status/archives/000625.html">GPDB Web Update/Oracle testing &raquo;</a>
59                      </p>
60
61                      <a id="a000624"></a>
62                      <div class="entry" id="entry-624">
63                         <h3 class="entry-header">MySQL Client Libraries</h3>
64                         <div class="entry-content">
65                            <div class="entry-body">
66                               <ul>
67   <li>Worked on solutions for MySQL client library problem</li>
68 </ul>
69                            </div>
70                            <div id="more" class="entry-more">
71                               Andrew DeFaria wrote:
72 <blockquote type="cite"> Chris Davey
73 wrote:
74   <blockquote type="cite">
75 <p>Andrew</p>
76     
77 <p>have update the /apps/cmpackages as per the web page ane try the new version of mkview_linked but faile to run:</p>
78
79 <h3>sunos</h3>
80
81 <div class=code><pre>
82 warmflash,a0741187&gt; ./mkview_linked 
83 install_driver(mysql) failed: Can't load
84 '/apps/cmpackages/perl/lib/site_perl/5.8.0/sun4-solaris-thread-multi/auto/DBD/mysql/mysql.so'
85 for module DBD::mysql: ld.so.1: mkview_linked: fatal:
86 libmysqlclient.so.12: open failed: No such file or directory at
87 /apps/cmpackages/perl/lib/5.8.0/sun4-solaris-thread-multi/DynaLoader.pm
88 line 229.
89 at (eval 1) line 3
90 Compilation failed in require at (eval 1) line 3.
91 Perhaps a required shared library or dll isn't installed where expected
92 at ./mkview_linked line 54
93
94 warmflash,a0741187&gt; ls -l
95 /apps/cmpackages/perl/lib/site_perl/5.8.0/sun4-solaris-thread-multi/auto/DBD/mysql
96 total 712
97 -r--r--r-- 1 amemgr ameadm 0 Mar 16 09:05 mysql.bs
98 -r-xr-xr-x 1 amemgr ameadm 360080 Mar 16 09:05 mysql.so*
99 </pre></div>
100
101 <h3>linux</h3>
102
103 <div class=code><pre>
104 ace.tiuk.ti.com,a0741187&gt; ./mkview_linked
105 install_driver(mysql) failed: Can't load
106 '/apps/cmpackages/perl/lib/site_perl/5.8.0/i686-linux-thread-multi/auto/DBD/mysql/mysql.so'
107 for module DBD::mysql: libmysqlclient.so.12: cannot open shared object
108 file: No such file or directory at
109 /apps/cmpackages/perl/lib/5.8.0/i686-linux-thread-multi/DynaLoader.pm
110 line 229.
111 at (eval 1) line 3
112 Compilation failed in require at (eval 1) line 3.
113 Perhaps a required shared library or dll isn't installed where expected
114 at ./mkview_linked line 54
115 ace.tiuk.ti.com,a0741187&gt; ls -l
116 /apps/cmpackages/perl/lib/site_perl/5.8.0/sun4-solaris-thread-multi/auto/DBD/mysql
117 ls:
118 /apps/cmpackages/perl/lib/site_perl/5.8.0/sun4-solaris-thread-multi/auto/DBD/mysql:
119 No such file or directory
120 </pre></div>
121   </blockquote>
122
123 <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>
124
125   <ul>
126     <li>mkdir /apps/mysql</li>
127     <li>On Solaris (warmflash): rsync -rlz
128 stashu.dal.design.ti.com:/apps/mysql/4.0.16 /apps/mysql</li>
129     <li>On Linux (ace): rsync -rlz
130 drteeth.dal.design.ti.com:/apps/mysql/4.0.17 /app/mysql</li>
131   </ul>
132
133 <p>Try mkview_linked. Let us know.</p>
134
135 </blockquote>
136
137 <h1>Meantime back at the lab...</h1>
138
139 <h2>Short version:</h2>
140
141 <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>
142
143 <h2>Long version (AKA the gory details...)</h2>
144
145 <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
146 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>
147
148 <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>
149
150 <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>
151
152 <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>
153
154 <p>Oh and did I mention that mysql is not officially supported by TI...</p>
155
156 <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>
157                            </div>
158                         </div>
159                         <p class="entry-footer">
160                            <span class="post-footers">Posted by  on March 16, 2007  5:32 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000624.html">Permalink</a>
161                         </p>
162                      </div>
163
164                      
165                      <div class="trackbacks">
166                         <h3 id="trackback" class="trackbacks-header">TrackBack</h3>
167                         <div id="trackbacks-info">
168                            <p>TrackBack URL for this entry:<br />http://defaria.com/mt/mt-tb.cgi/13</p>
169                         </div>
170                         <div class="trackbacks-content">
171                            
172                         </div>
173                      </div>
174                      
175
176                      
177                   </div>
178                </div>
179             </div>
180          </div>
181       </div>
182    </div>
183 </body>
184 </html>