DBD::Sybase under Cygwin

From: Michael Peppler (mpeppler_at_peppler.org)
Date: 11/25/04


To: Sybperl-L Mailing List <sybperl-l@peppler.org>, dbi-users@perl.org
Date: Thu, 25 Nov 2004 14:49:14 +0100

Here's a little how-to to build DBD::Sybase in the Cygwin
(http://www.cygwin.com) environment under Windows.

First - you need to have Sybase OpenClient installed. This is pretty
easy to get from http://www.sybase.com/ase_1252devel/.

Second, you need to map the entry points to the Sybase DLLs to something
that gcc can use. I've built a set of .a files (libcs.a, libct.a and
libblk.a) that provide these entry points - you can get them from
http://www.peppler.org/downloads/cygwin.tar.gz. Install the .a files in
/usr/local/lib so that the build will find them easily.

Third, grab the most recent "dev" release of DBD::Sybase 1.04_14 or
later, available from http://www.peppler.org/downloads/).
Now build this as usual (perl Makefile.PL, etc) making sure that the
SYBASE and SYBASE_OCS environment variables are set correctly.

Et voilą!

If you don't want to download/use the dev release, you can achieve the
same result like this:

After installing the cygwin libct/cs/blk.a files, run perl Makefile.PL
in the DBD::Sybase source directory. Now edit the generated Makefile,
and add -D_MSC_VER=800 to the CCFLAGS macro, and change the EXTRALIBS
and LDLOADLIBS macros to
EXTRALIBS= -lcs -lct -lblk
LDLOADLIBS= -lcs -lct -lblk

and now run make.

For those of us who prefer a Unix-like feel this gives a nice
alternative to the ActiveState version of perl.

Michael

-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org                       http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or 
long term contract positions - http://www.peppler.org/resume.html


Relevant Pages

  • Installing DBD::Sybase on MAC
    ... But before that I need to install the 'Sybase OpenClient ... Sybase server to use: undef ... (ranlib struct 0 library member offset not a multiple of 4 bytes, ...
    (comp.lang.perl.misc)
  • Re: trouble loading DBD sybase, 1_07_01 -found out problem
    ... I was using DBI 1.5 and DBD 1_07_1. ... In order to set the sybase env variables, I had sourced a copy of the SYBASE.sh file in the .bash_profile file in each each users home directory. ... Once I resolved this issue,, the install went without a hitch. ... Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. ...
    (perl.dbi.users)
  • Re: Replication Steps - rs_init
    ... REP-12_5/ folder from the replication server, ... The SYBASE environment variable is being temporarily reset to '/ ... its data became from periodic MARS ...
    (comp.databases.sybase)
  • Re: DBD::Sybase question
    ... EXCEPT following the Sybase SDK 15 documentation and running ... So the short answer is that you can keep your current environment and add ... received to the sender and delete all copies from your system. ... Toute utilisation de ce ...
    (perl.dbi.users)
  • Re: Replication Steps - rs_init
    ... REP-12_5/ folder from the replication server, ... The SYBASE environment variable is being temporarily reset to '/ ... Your sybase home directory is /sybase. ...
    (comp.databases.sybase)