<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>UseStrict Consulting &#187; Cygwin</title>
	<atom:link href="http://usestrict.net/category/cygwin/feed/" rel="self" type="application/rss+xml" />
	<link>http://usestrict.net</link>
	<description>Professional IT Solutions &#38; Training</description>
	<lastBuildDate>Sat, 07 Jan 2012 14:05:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>DBD::Oracle + Cygwin: Undefined reference error during make</title>
		<link>http://usestrict.net/2009/01/dbdoracle-cygwin-error-during-make/</link>
		<comments>http://usestrict.net/2009/01/dbdoracle-cygwin-error-during-make/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 20:57:14 +0000</pubDate>
		<dc:creator>vinny</dc:creator>
				<category><![CDATA[Cygwin]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dbd::oracle]]></category>
		<category><![CDATA[dbi]]></category>
		<category><![CDATA[_OCILobGetChunkSize]]></category>
		<category><![CDATA[_OCINlsCharSetIdToName]]></category>

		<guid isPermaLink="false">http://usestrict.net/?p=138</guid>
		<description><![CDATA[Yesterday I found myself in a position of having to re-master my computer &#8211; hence having to reinstall most of the applications including my trusty Cygwin &#8211; which always becomes somewhat of a headache when I reach the point of installing DBD::Oracle in it. This time I got a undefined symbol error. A quick look [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I found myself in a position of having to re-master my computer &#8211; hence having to reinstall most of the applications including my trusty Cygwin &#8211; which always becomes somewhat of a headache when I reach the point of installing DBD::Oracle in it.</p>
<p>This time I got a undefined symbol error. A quick look in <a href="http://www.nntp.perl.org/group/perl.dbi.users/2008/09/msg33238.html" target="_blank">Google</a> showed me that Erik Squires had the same exact problem. Lots of searching later, I find that Google can&#8217;t find a handy solution anywhere&#8230; So I send Erik an email asking about the solution and to my surprise, he answers only 1 (!!)  minute after I click send. Talk about a fast reply!!</p>
<p>Hats off to Erik! You will find the solution here: http://cpae.typepad.com/capacity_planning_and_eng/</p>
<p><strong>Hint:</strong> the <em>oci.def</em> that he mentions in his post is inside your DBD::Oracle build directory. Don&#8217;t get it confused with ocidef.h file in your $ORACLE_HOME/oci/include directory (that&#8217;s where I looked first).</p>
<p>I&#8217;m adding the error message below with a big SOLUTION header for any Googler out there having the same problem. No need to keep reading if the text above was enough to solve your problem.</p>
<p><span id="more-138"></span></p>
<p>Oracle 10g + DBD::Oracle + Cygwin issue</p>
<p>Make error:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<pre>cp Oracle.pm blib/lib/DBD/Oracle.pm
cp oraperl.ph blib/lib/oraperl.ph
cp dbdimp.h blib/arch/auto/DBD/Oracle/dbdimp.h
cp ocitrace.h blib/arch/auto/DBD/Oracle/ocitrace.h
cp Oraperl.pm blib/lib/Oraperl.pm
cp Oracle.h blib/arch/auto/DBD/Oracle/Oracle.h
cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm
cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm
/usr/bin/perl.exe -p -e "s/~DRIVER~/Oracle/g" /usr/lib/perl5/site_perl/
5.10/i686
-cygwin/auto/DBI/Driver.xst &gt; Oracle.xsi
/usr/bin/perl.exe /usr/lib/perl5/5.10/ExtUtils/xsubpp  -typemap /usr/
lib/perl5/5
.10/ExtUtils/typemap -typemap typemap  Oracle.xs &gt; Oracle.xsc &amp;&amp; mv
Oracle.xsc O
racle.c
gcc -c  -IC:/oracle/product/10.2.0/client_1/oci/include -IC:/oracle/
product/10.2
.0/client_1/rdbms/demo -I/usr/lib/perl5/site_perl/5.10/i686-cygwin/
auto/DBI -DPE
RL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing -pipe -I/usr/
local/inc
lude -DUSEIMPORTLIB -O3   -DVERSION="1.22" -DXS_VERSION="1.22"  "-
I/usr/lib/
perl5/5.10/i686-cygwin/CORE"  -Wall -Wno-comment -DUTF8_SUPPORT -
DNEW_OCI_INIT -
DORA_OCI_VERSION="10.2.0.1" Oracle.c
gcc -c  -IC:/oracle/product/10.2.0/client_1/oci/include -IC:/oracle/
product/10.2
.0/client_1/rdbms/demo -I/usr/lib/perl5/site_perl/5.10/i686-cygwin/
auto/DBI -DPE
RL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing -pipe -I/usr/
local/inc
lude -DUSEIMPORTLIB -O3   -DVERSION="1.22" -DXS_VERSION="1.22"  "-
I/usr/lib/
perl5/5.10/i686-cygwin/CORE"  -Wall -Wno-comment -DUTF8_SUPPORT -
DNEW_OCI_INIT -
DORA_OCI_VERSION="10.2.0.1" dbdimp.c
dbdimp.c: In function `ora_db_login6':
dbdimp.c:450: warning: cast to pointer from integer of different size

{ A bunch more cast and int format warnings from oci8.c}

rm -f blib/arch/auto/DBD/Oracle/Oracle.dll
LD_RUN_PATH="C:/oracle/product/10.2.0/client_1/lib:C:/oracle/product/
10.2.0/clie
nt_1/rdbms/lib" g++  --shared  -Wl,--enable-auto-import -Wl,--export-
all-symbols
 -Wl,--stack,8388608 -Wl,--enable-auto-image-base -L/usr/local/lib
Oracle.o dbdi
mp.o oci8.o  -o blib/arch/auto/DBD/Oracle/Oracle.dll
          /usr/lib/perl5/5.10/i686-cygwin/CORE/libperl.dll.a -L/
cygdrive/c/cpan/
5.10.0/build/DBD-Oracle-1.22 -loci      

Oracle.o:Oracle.c:(.text+0x6ba9): undefined reference to
`_OCILobGetChunkSize'
dbdimp.o:dbdimp.c:(.text+0x10e3): undefined reference to
`_OCINlsCharSetIdToName
'
dbdimp.o:dbdimp.c:(.text+0x110f): undefined reference to
`_OCINlsCharSetIdToName
'
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/DBD/Oracle/Oracle.dll] Error 1</pre>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>[ad#middle_end]</p>
<p><strong>!!! HERE IS THE SOLUTION !!!</strong></p>
<p><strong>Taken from http://cpae.typepad.com/capacity_planning_and_eng/ </strong></p>
<p><strong>Thanks to Erik Squires!</strong></p>
<p>[Quote]</p>
<p><span style="font-size: 17px; font-family: Trebuchet MS;"><span id=":i7" class="VrHWId">undefined reference to `_OCILobGetChunkSize&#8217; </span></span></p>
<p>Several people helped me with a fix, but this text below is thanks to Jerry Reed.  Thanks Jerry!</p>
<p>Please note this problem ONLY occurs under Windows.  If you are running Perl under Unix/Linux/MacOS you should be fine.</p>
<p>Jerry Wrote:</p>
<p>The make of DBD Oracle builds an intermediate lib, liboci.a.  Functions defined in this lib are somehow culled from the appropriate cygwin distro dll by the line that reads:</p>
<p>system(&#8220;dlltool &#8211;input-def oci.def &#8211;output-lib liboci.a&#8221;) at line 235 in Makefile.PL.</p>
<p>But oci.def lacks entries for the two undefined symbols -<br />
_OCILobGetChunkSize</p>
<p>and</p>
<p>_OCINlsCharSetIdToName</p>
<p>(the later is named twice in the linker output).</p>
<p>Strip the leading underscore and insert them into a copy of oci.def. (I inserted them in alpha order, but I do not know if this is really required.)</p>
<p>rm, or use make clean to remove liboci.a and cause it to be rebuilt.</p>
<p>perl Makefile.PL<br />
make</p>
<p>You should get no unresolved symbols now.  You can check that liboci.a now contains the correct entries by:</p>
<p>nm liboci.a | egrep -i &#8216;(chunk|nls)&#8217;</p>
<p>[/Quote]</p>
<p>[ad#middle_end] </p>
]]></content:encoded>
			<wfw:commentRss>http://usestrict.net/2009/01/dbdoracle-cygwin-error-during-make/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

