There are two ways to do that,
- (a) with the freetds that the distro provides
- or, (b) installing the vanilla freetds upstream and building against that.
The second option (b) is always possible, but then your system may have two different versions of freetds.
The first option can not be done without some hacking and the author will not fix it. He is simply hard headed and wants to fix internal structures to match the OS he uses rather than making it accepting of other configurations.
Internally DBD::Sybase
expects there to be a directory, and a $libdir
(a subdirectory with lib
or lib64
). The directories DBD::Sybase
requires to build properly are not provided by the Debian package freetds-dev
; the Debian package installs to /usr/include
which doesn't have a lib
or a lib64
subdirectory. You can get around this by fooling make
and recreating that structure, first make sure you have freetds-dev
installed,
sudo apt-get install freetds-dev
Then link it to create a pseudo-package. On my 64 bit machine, it looks something like this.
mkdir /tmp/freetds
ln -s /usr/lib/x86_64-linux-gnu/ /tmp/freetds/lib64
ln -s /usr/include /tmp/freetds/include/freetds
Now, it should work and you can build DBD::Sybase
against system libraries.
sudo SYBASE=/tmp/freetds cpanp install DBD::Sybase
Viola.