Edit report at https://bugs.php.net/bug.php?id=7792&edit=1
ID: 7792 Comment by: good821 at 126 dot com Reported by: alex at quad dot com dot ar Summary: -lsybctl failure at FreeTDS Status: Bogus Type: Bug Package: Sybase-ct (ctlib) related Operating System: Debian 2.2 (kernel 2.2.16) PHP Version: 4.0.3pl1 Assigned To: joey Block user comment: N Private report: N New Comment: http://www.vikingsjerseysstore.com/ Minnesota Vikings Jersey http://www.vikingsjerseysstore.com/adrian-peterson-jersey-c-14_19.html Adrian Peterson Jersey http://www.vikingsjerseysstore.com/alan-page-jersey-c-14_26.html Alan Page Throwback Jersey Previous Comments: ------------------------------------------------------------------------ [2002-06-18 18:16:41] [email protected] 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 http://www.php.net/downloads.php 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. ------------------------------------------------------------------------ [2001-05-14 12:08:49] [email protected] Again, I plan on working on this during the coming months. ------------------------------------------------------------------------ [2000-11-13 21:08:48] 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: libcs.so libcomn.so libintl.so libtcl.so libsybtcl.so libinsck.so now, I've read the bug report #7595 http://bugs.php.net/bugs.php?id=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 else ac_save_LIBS="$LIBS" -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 else ac_save_LIBS="$LIBS" -LIBS="-ltcl $SYBASE_CT_LIBS $LIBS" +#LIBS="-ltcl $SYBASE_CT_LIBS $LIBS" 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 else ac_save_LIBS="$LIBS" -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 else ac_save_LIBS="$LIBS" -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 @@ fi AC_ADD_INCLUDE($SYBASE_CT_INCDIR) AC_ADD_LIBPATH($SYBASE_CT_LIBDIR) - AC_ADD_LIBRARY(cs) AC_ADD_LIBRARY(ct) - AC_ADD_LIBRARY(comn) - AC_ADD_LIBRARY(intl) - SYBASE_CT_LIBS="-lcs -lct -lcomn -lintl" + SYBASE_CT_LIBS="-lct" old_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -L$SYBASE_CT_LIBDIR" - 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) ]) + LDFLAGS=$old_LDFLAGS else AC_MSG_RESULT(no) ------------------------------------------------------------------------ [2000-11-13 15:02:54] 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 libphp4.la -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/libZend.la sapi/apache/libsapi.la main/libmain.la regex/libregex.la ext/gettext/libgettext.la ext/mysql/libmysql.la ext/pcre/libpcre.la ext/pgsql/libpgsql.la ext/posix/libposix.la ext/session/libsession.la ext/standard/libstandard.la ext/sybase_ct/libsybase_ct.la ext/xml/libxml.la TSRM/libtsrm.la -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]: *** [libphp4.la] 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 sybase.com) 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 :) regards, Alex Verstraeten ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=7792&edit=1
