Up Prev Next
From: "Jonathan Fine (IT- Borders Online)" <jfine at borders dot com>
Subject: Sybperl, DBD and RH 5.1 -- the answers!
Date: Aug 20 1998 3:12PM
This is how I got both Sybperl and the DBD::Sybase working with Red Hat
5.1. (This is for command-line scripts; this doesn't address the seg
fault problem with running these scripts via Apache, although I have a
workaround at the bottom.) I gathered this information from Philip
Jacob and Mihai Ibanescu:
(There may be some typos in the actual syntax because I'm writing this
from memory. As an aside, I primarily use DBD::Sybase, so I'm more
familiar with that installation, but I did get Sybperl working prior to
0. Install the correct Sybase libraries. You want the elf-dynamic
library from Michael Peppler's page, and you'll need to steal the
libblk.a file from the elf library.
1. If you've upgraded your RH 5.1 libtermcap libraries, downgrade back
to the libtermcap libraries that shipped with the RH 5.1. (This is true
for DBD::Sybase installations; I believe it's true for Sybperl also.)
2. In the CONFIG, uncomment the LINKTYPE=static. (i.e., you want the
linking to be static.) For DBD::Sybase, the EXTRA_LIBS should be
-lsybtcl and -linsck. With Sybperl, you'll also need to set one of the
variables in the CONFIG to 0. (It's documented in the CONFIG file.)
3. Don't forget to edit the PWD file for the testing, and you should
have your SYBASE environmental variable set correctly.
4. For DBD::Sybase, after you do your `make test', it will crash on you
(expectedly). Edit the blib/arch/*/*/extralibs.all file, and remove any
references to -ltcl. In some cases I had, I had more than one entry in
the extralibs.all file. In those cases, I had to insert -lsybtcl into a
line or two. Run `make test' again and this time it should work ok.
5. You'll end up with a static version of perl after running the `make
test' successfully. You'll want to install that over your
/usr/bin/perl, or have your Perl/Sybase scripts point to your new Perl.
The DBD `make test' will display the command for installing the new
executable; I don't remember if the Sybperl displays it or not. (It's
something like make -f Makefile.aperl; but anyways, just watch your
screen carefully. ;)
6. Don't forget to `make install' now. ;) (Yes, a few times I got
this confused with step 5 and forgot to do this. ;)
As others have been reporting, both Sybperl and DBD::Sybase Perl scripts
seg fault when run via the Apache web server. A workaround which works
for me is to just have another script run the CGI script. For example,
if I had Sybperl script called authenticate.cgi, to run it via Apache,
I'd have a wrapper script such as:
Yeah, it's ugly, but it works for now...