Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Matthew O dot Persico" <persicom at acedsl dot com>
Subject: Re: Bad compilation
Date: Nov 27 2002 6:21PM

On 27 Nov 2002 08:07:33 -0800, Michael Peppler wrote:
>On Tue, 2002-11-26 at 19:09, Matthew O. Persico wrote:
>>Ok: Step one - recompile DBi1.30 and install it into /opt/perl Step
>>two - modify PERL5LIB to pick up /opt/per Step three - find DBI:
>>[910] $ perl_version DBI DBI 1.30 =>
>>Step four find Driver_xst.h:
>>[911] $ find /opt/perl -name Driver_xst.h
>>Step five - Recompile DBD::Sybase 0.95 BZZZZZZT:
>>[906] $ make
>>cp blib/lib/DBD/
>>cp dbd-sybase.pod blib/lib/DBD/dbd-sybase.pod
>>/usr/bin/perl -p -e "s/~DRIVER~/Sybase/g" <
>>/usr/bin/perl -I/usr/lib/perl5/5.6.1/i386-linux -
>>I/usr/lib/perl5/5.6.1 /usr/lib/perl5/5.6.1/ExtUtils/xsubpp  -
>>typemap /usr/lib/perl5/5.6.1/ExtUtils/typemap Sybase.xs >
>>Sybase.xsc && mv Sybase.xsc Sybase.c
>>cc -c -I/opt/sybase-12.5/OCS/include -
>>I/usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/DBI -fno-strict-
>>aliasing -I/usr/local/include -O3 -fomit-frame-pointer -pipe -
>>mcpu=pentiumpro -march=i586 -ffast-math -fno-strength-reduce   -
>>DVERSION=\"0.95\" -DXS_VERSION=\"0.95\" -fpic -
>>I/usr/lib/perl5/5.6.1/i386-linux/CORE  Sybase.c
>>Sybase.c:218:24: Driver_xst.h: No such file or directory
>Hmmm.... I think I see where the problem lies. DBD::Sybase's
>tries to find the proper location of the DBI include files, and does
>by *first* searching in $Config{sitearchexp} and *then* in @INC. And
>looks for DBIXS.h, not for Driver_xst.h. Hence the -I entry in the cc
>command above that refers to the /usr/lib/perl5/.../DBI directory.
>On line 155 of Makefile.PL try changing
>my @try = ($Config{sitearchexp}, @INC);
>my @try = (@INC, $Config{sitearchexp});
>and see if that fixes things.

Not only does it work, it seems backward compatible. I just ripped out 1.30 and recompiled using DBI 1.20 and everything still works.
Matthew O. Persico