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">
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Movable Type 5.2.3" />
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" />
12 <title>Status for Andrew DeFaria: MySQL Client Libraries</title>
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" />
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/">
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..."
30 dc:date="2007-03-16T17:32:56-06:00" />
37 <script type="text/javascript" src="http://defaria.com/blogs/Status/mt-site.js"></script>
39 <body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
41 <div id="container-inner" class="pkg">
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>
51 <div id="pagebody-inner" class="pkg">
53 <div id="alpha-inner" class="pkg">
55 <p class="content-nav">
56 <a href="http://defaria.com/blogs/Status/archives/000623.html">« 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 »</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">
67 <li>Worked on solutions for MySQL client library problem</li>
70 <div id="more" class="entry-more">
72 <blockquote type="cite"> Chris Davey
74 <blockquote type="cite">
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>
82 warmflash,a0741187> ./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
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
94 warmflash,a0741187> ls -l
95 /apps/cmpackages/perl/lib/site_perl/5.8.0/sun4-solaris-thread-multi/auto/DBD/mysql
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*
103 <div class=code><pre>
104 ace.tiuk.ti.com,a0741187> ./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
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> ls -l
116 /apps/cmpackages/perl/lib/site_perl/5.8.0/sun4-solaris-thread-multi/auto/DBD/mysql
118 /apps/cmpackages/perl/lib/site_perl/5.8.0/sun4-solaris-thread-multi/auto/DBD/mysql:
119 No such file or directory
123 <p>The problem seems to be that you lack /apps/mysql/<version> which is what we used to build the DBD::mysql package. We are working on alternate solutions. Meantime could you try the following:</p>
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>
133 <p>Try mkview_linked. Let us know.</p>
137 <h1>Meantime back at the lab...</h1>
139 <h2>Short version:</h2>
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>
143 <h2>Long version (AKA the gory details...)</h2>
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>
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>
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>
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>
154 <p>Oh and did I mention that mysql is not officially supported by TI...</p>
156 <p>We had hoped that /apps/mysql/<version>, 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/<version> over to the remote sites or 2) include the /apps/mysql/<version> 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>
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>
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>
170 <div class="trackbacks-content">