Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / 000621.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: Building DBD::MySQL</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/000612.html" title="VOB UUIDs" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/000622.html" title="Clearcase License Graphs" />
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/000621.html"
24     trackback:ping="http://defaria.com/mt/mt-tb.cgi/10"
25     dc:title="Building DBD::MySQL"
26     dc:identifier="http://defaria.com/blogs/Status/archives/000621.html"
27     dc:subject="Texas Instruments"
28     dc:description=" Built DBD::MySQL for Solaris Having problems building DBD::MySQL for Linux..."
29     dc:creator=""
30     dc:date="2007-03-07T17:44:17-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/000612.html">&laquo; VOB UUIDs</a> |
57                         <a href="http://defaria.com/blogs/Status/">Main</a>
58                         | <a href="http://defaria.com/blogs/Status/archives/000622.html">Clearcase License Graphs &raquo;</a>
59                      </p>
60
61                      <a id="a000621"></a>
62                      <div class="entry" id="entry-621">
63                         <h3 class="entry-header">Building DBD::MySQL</h3>
64                         <div class="entry-content">
65                            <div class="entry-body">
66                               <ul>
67   <li>Built DBD::MySQL for Solaris</li>
68
69   <li>Having problems building DBD::MySQL for Linux</li>
70 </ul>
71
72                            </div>
73                            <div id="more" class="entry-more">
74                               <h2>How to build DBD::MySQL</h2>
75
76 <p>After downloading DBD::mysql from
77 <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>
78
79 <p>Then one needs to give the proper parameters to generate the Makefile:</p>
80
81 <div class=code><pre>
82 $ export PATH=$PATH:/apps/mysql/4.0.16/bin
83 $ /apps/cmpackages/perl/bin/perl Makefile.PL \
84 &gt;    --libs="-L/apps/mysql/4.0.16/lib/mysql -lmysqlclient -lz" \
85 &gt;    --cflags=-I/apps/mysql/4.0.16/include/mysql \
86 &gt;    --testhost=mysql01.dal.design.ti.com \&nbsp;&nbsp; <font
87  color="#ff0000"><i>These will not always be the same</i></font>
88 &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>
89 &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>
90 </pre></div>
91
92 <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>
93
94 <p>This will produce a Makefile which you then do:</p>
95
96 <div class=code><pre>
97 $ make
98 $ make test
99 </pre></div>
100
101 <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>
102
103 <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>
104
105 <div class=code><pre>
106 INSTALLPRIVLIB = /apps/cmpackages/perl/lib/5.8.0
107 INSTALLSITELIB = /apps/cmpackages/perl/lib/site_perl/5.8.0
108 INSTALLVENDORLIB = 
109 INSTALLARCHLIB = /apps/cmpackages/perl/lib/5.8.0/sun4-solaris-thread-multi
110 INSTALLSITEARCH = /apps/cmpackages/perl/lib/site_perl/5.8.0/sun4-solaris-thread-multi
111 INSTALLVENDORARCH = 
112 INSTALLBIN = /apps/cmpackages/perl/bin
113 INSTALLSITEBIN = /apps/cmpackages/perl/bin
114 INSTALLVENDORBIN = 
115 INSTALLSCRIPT = /apps/cmpackages/perl/bin
116 </pre></div>
117
118 <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>
119                            </div>
120                         </div>
121                         <p class="entry-footer">
122                            <span class="post-footers">Posted by  on March  7, 2007  5:44 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000621.html">Permalink</a>
123                         </p>
124                      </div>
125
126                      
127                      <div class="trackbacks">
128                         <h3 id="trackback" class="trackbacks-header">TrackBack</h3>
129                         <div id="trackbacks-info">
130                            <p>TrackBack URL for this entry:<br />http://defaria.com/mt/mt-tb.cgi/10</p>
131                         </div>
132                         <div class="trackbacks-content">
133                            
134                         </div>
135                      </div>
136                      
137
138                      
139                   </div>
140                </div>
141             </div>
142          </div>
143       </div>
144    </div>
145 </body>
146 </html>