|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7792 -lsybctl failure at FreeTDS
Submitted: 2000-11-13 15:02 UTC Modified: 2002-06-18 18:16 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: alex at quad dot com dot ar Assigned: joey (profile)
Status: Not a bug Package: Sybase-ct (ctlib) related
PHP Version: 4.0.3pl1 OS: Debian 2.2 (kernel 2.2.16)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: alex at quad dot com dot ar
New email:
PHP Version: OS:


 [2000-11-13 15:02 UTC] alex at quad dot com dot ar
php4.0.3pl1 'make' fails when using ./configure --with-sybase-ct=/usr/local/freetds with the following error:

make[1]: Entering directory `/src/php-4.0.3pl1'
/bin/sh /src/php-4.0.3pl1/libtool --silent --mode=link gcc  -I. -I/src/php-4.0.3pl1/ -I/src/php-4.0.3pl1 -I/src/php-4.0.3pl1/main -I/www/include -I/src/php-4.0.3pl1/Zend -I/src/php-4.0.3pl1 -I/usr/local/include/mysql -I/usr/local/freetds/include -I/src/php-4.0.3pl1/ext/xml/expat/xmltok -I/src/php-4.0.3pl1/ext/xml/expat/xmlparse -I/src/php-4.0.3pl1/TSRM  -DXML_BYTE_ORDER=12 -g -O2   -o -rpath /src/php-4.0.3pl1/libs -avoid-version -L/usr/local/lib/mysql -L/usr/local/pgsql/lib -L/usr/local/freetds/lib  -R /usr/local/lib/mysql -R /usr/local/pgsql/lib -R /usr/local/freetds/lib stub.lo  Zend/ sapi/apache/ main/ regex/ ext/gettext/ ext/mysql/ ext/pcre/ ext/pgsql/ ext/posix/ ext/session/ ext/standard/ ext/sybase_ct/ ext/xml/ TSRM/ -ldl -lsybtcl -lintl -lcomn -lct -lcs -lpq -lmysqlclient -lresolv -lm -ldl -lcrypt -lnsl -lresolv
/usr/bin/ld: cannot find -lsybtcl
collect2: ld returned 1 exit status
make[1]: *** [] Error 1
make[1]: Leaving directory `/src/php-4.0.3pl1'
make: *** [all-recursive] Error 1

here's the details of my installation:

freeTDS from cvs (version 0.51)
was compiled with:
./configure --with-tdserver=4.2 --enable-msdblib --enable-dbmfix --with-gnu-ld --enable-shared --enable-static
make && make install
(everything went ok, no errors)

then at php4.0.3pl1 src dir:
./configure --with-apxs=/www/bin/apxs --with-mysql=/usr/local --with-ftp --with-gettext --with-config-file-path=/etc --disable-debug --enable-track-vars --with-pgsql=/usr/local/pgsql --with-sybase-ct=/usr/local/freetds

as far as I can tell that required libsybctl file is not available at the freetds distribution, it is available though, at the sybase-common-11.9.2-3.i386.rpm (from 

I'll now try to mix files from freetds and sybase-common but I never really liked to play Mr. Frankenstein. 

anyway, any feedback would be great :)

Alex Verstraeten


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-13 21:08 UTC] alex at quad dot com dot ar
ok, I had to patch php-4.0.3pl1 in order to compile php --with-sybase-ct using freetds libs (patch at the end of this report)

the problem is that FreeTDS does not have a couple of files that php looks for when compiling --with-sybase-ct support, those files (if I'm not mistaken) are:

now, I've read the bug report #7595 which is directly related to this issue, in fact the patch I built is strictly based on the patch laszlo talks about on that bug-report. But this one works on 4.0.3pl1 

Basically: freeTDS is useless on php4 unless you patch php, so It's more a php issue than a freetds issue, would be possible for you guys to help in the next releases of php by including something like --with-freetds instead of --with-sybase-ct (or something like it) in a way that it wont look for those missing files?

Well, unless php team incorporates a way to compile freetds support without hacking php we'll just have to patch php from version to version, (which is not bad for me since I already learned how to do it, but for the rest of the guys who are starting with php... well it can be a real pain!)

and here's the patch I've used to succesfully compile freeTDS as --with-sybase-ct (maybe it has some errors, it's my first patch EVER.. go figure :))

diff -u -r php-4.0.3pl1/configure php-4.0.3pl1-patched/configure
--- php-4.0.3pl1/configure	Sun Oct 15 08:47:10 2000
+++ php-4.0.3pl1-patched/configure	Mon Nov 13 21:55:17 2000
@@ -16720,7 +16720,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
-LIBS="-lintl  $LIBS"
+#LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 16726 "configure"
 #include "confdefs.h"
@@ -39336,7 +39336,7 @@
-  LIBS="-lcs $LIBS"
+  #LIBS="-lcs $LIBS"
@@ -39360,7 +39360,7 @@
-  LIBS="-lcomn $LIBS"
+  #LIBS="-lcomn $LIBS"
@@ -39372,7 +39372,7 @@
-  LIBS="-lintl $LIBS"
+  #LIBS="-lintl $LIBS"
@@ -39388,7 +39388,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 cat > conftest.$ac_ext <<EOF
 #line 39394 "configure"
 #include "confdefs.h"
@@ -39422,7 +39422,7 @@
-  LIBS="-ltcl $LIBS"
+  #LIBS="-ltcl $LIBS"
@@ -39436,7 +39436,7 @@
-  LIBS="-lsybtcl $LIBS"
+  #LIBS="-lsybtcl $LIBS"
@@ -39451,7 +39451,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
-LIBS="-linsck  $LIBS"
+#LIBS="-linsck  $LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 39457 "configure"
 #include "confdefs.h"
@@ -39485,7 +39485,7 @@
-  LIBS="-linsck $LIBS"
+  #LIBS="-linsck $LIBS"
@@ -39502,7 +39502,7 @@
   echo $ac_n "(cached) $ac_c" 1>&6
-LIBS="-linsck  $LIBS"
+#LIBS="-linsck  $LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 39508 "configure"
 #include "confdefs.h"
@@ -39536,7 +39536,7 @@
-  LIBS="-linsck $LIBS"
+  #LIBS="-linsck $LIBS"
diff -u -r php-4.0.3pl1/ext/sybase_ct/config.m4 php-4.0.3pl1-patched/ext/sybase_ct/config.m4
--- php-4.0.3pl1/ext/sybase_ct/config.m4	Sat Jun 24 06:01:51 2000
+++ php-4.0.3pl1-patched/ext/sybase_ct/config.m4	Mon Nov 13 21:57:19 2000
@@ -20,21 +20,11 @@
-	SYBASE_CT_LIBS="-lcs -lct -lcomn -lintl"
-    AC_CHECK_LIB(tcl, netg_errstr,
-              [ AC_ADD_LIBRARY(tcl) ],
-              [ AC_ADD_LIBRARY(sybtcl) ],
-              [ $SYBASE_CT_LIBS ])
-    AC_CHECK_LIB(insck, insck__getVdate,
-              [ AC_ADD_LIBRARY(insck) ])
-    AC_CHECK_LIB(insck, bsd_tcp,
-              [ AC_ADD_LIBRARY(insck) ])

 [2001-05-14 12:08 UTC]
Again, I plan on working on this during the coming months.
 [2002-06-18 18:16 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Dec 06 17:04:05 2021 UTC