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 <http://www.freetds.org/>, and FreeTDS - being FOSS - most likely can be compiled natively in your intel Mac.

Reply via email to