Is it possible to build DBD::Sybase on an intel based mac Pro (running10.4.8)
am 04.03.2007 22:14:09 von terry.young
Hi,
Has anyone been able to run or compile DBD::Sybase on an intel based
apple computer.
Open client middleware is compiled to be be used on the PPC arch.
I assume that isql from a terminal is able to use the middleware because
it runs in some form of rosetta; I am able to run a universal binary
client app (Studio) with the open client software if I run the app in
rosetta.
Is there a way to run or compile perl such that it is able to allow
DBD::Sybase to do a build against the non-intel based open client SDk
that comes with 12.5.3 or 12.5.4 versions of ASE on the mac?
terry
Re: Is it possible to build DBD::Sybase on an intel based mac Pro(running 10.4.8)
am 08.03.2007 06:49:11 von arifsaha
On Sun, 4 Mar 2007, Terence J. Young, D.C. wrote:
> Has anyone been able to run or compile DBD::Sybase on an intel
> based apple computer.
> Open client middleware is compiled to be be used on the PPC
> arch.
Never done it myself, but apparently DBD::Sybase can be compiled
using FreeTDS , and FreeTDS - being
FOSS - most likely can be compiled natively in your intel Mac.
--
(stephan paul) Arif Sahari Wibowo
_____ _____ _____ _____
/____ /____/ /____/ /____
_____/ / / / _____/ http://www.arifsaha.com/
Re: Is it possible to build DBD::Sybase on an intel based mac Pro(running 10.4.8)
am 08.03.2007 23:31:25 von terry.young
Hi,
As luck would have it, I just did this this morning.
First, I compiled DBI, then freetds, and then DBD.
During the DBD compile, I set my $SYBASE variable to
'/usr/local/freetds' (the value I used in the --prefix flag to
../configure); $SYBASE_OCS to '' ; prefixed my $PATH variable with
/usr/local/freetds/bin:; and prefixed $DYLD_LIBRARY_PATH variable with
/usr/local/freetds/lib:. The DBD compiled just fine; some tests failed,
but this was expected according the the README for FREEDTS that comes
with the DBD install.
When running perl from the terminal. I was then able to restore my old
$SYBASE variables back to their original values; this was good because
it allows me to backtick execution of BCP from within my perlscripts.
The BCP usses the installed sybase open clientware pointed to by the
restored $SYBASE variable. I also don't have to give up on using isql
from the command line.
There were three things I did do..
1) I prefixed my $PATH variable with /usr/local/freetds/bin:
2) I changed the time format in /usr/local/freetds/etc/locales to
default to '%m/%d%Y' because DBD seemed to be unable to use it's date
formatting function properly (syb_date_fmt => "MDY1_YYYY" seems
to have no effect). Initially I reset the scripts to get date data with
a convert(char(10),datefield,101) syntax. Setting the default in
usr/local/freetds/etc/locales to the same saved me from having to search
down alot of code in my scripts.
3) I created a ~/.freetds.conf file with $SYBASE/interfaces file equivalents
When compiling freetds, I only used the --prefix flag. The docs mention
several more flags I might consider using; if justified...
--disable-odbc
--enable-sybase-compat
With some minor annoyances, I think I can make freetds work for my needs.
terry
S P Arif Sahari Wibowo wrote:
> On Sun, 4 Mar 2007, Terence J. Young, D.C. wrote:
>
>> Has anyone been able to run or compile DBD::Sybase on an intel based
>> apple computer.
>> Open client middleware is compiled to be be used on the PPC arch.
>
>
> Never done it myself, but apparently DBD::Sybase can be compiled using
> FreeTDS , and FreeTDS - being FOSS - most
> likely can be compiled natively in your intel Mac.
>