php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13474 --with-sybase-ct=shared,[DIR] does not result in shared php_sybase_ct.so module
Submitted: 2001-09-28 05:56 UTC Modified: 2002-06-18 05:57 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: nick at marden dot org Assigned:
Status: Closed Package: Sybase-ct (ctlib) related
PHP Version: 4.0.6 OS: Redhat 6/2 Linux
Private report: No CVE-ID: None
 [2001-09-28 05:56 UTC] nick at marden dot org
If you configure PHP 4.0.6 with the configure option

--with-sybase-ct=shared,[DIR]

e.g.

--with-sybase-ct=shared,$SYBASE

You see this output from configure:

./configure: shared,/opt/sybase-11.9.2: No such file or directory
./configure: shared,/opt/sybase-11.9.2: No such file or directory

and static php_sybase_ct is built. This is incongruous with the behavior of other database modules.

Attached is a patch to sybase_ct's config.m4 and Makefile.in that fixes the problem - sort of. The shared module that gets built from this configuration crashes at start-up time, I think due to a bug in Sybase shared libraries for Linux.

Anyway, the patch is attached:

---------------- snip --------------------

--- Makefile.in.dist	Thu Sep 27 14:09:47 2001
+++ Makefile.in	Thu Sep 27 14:18:53 2001
@@ -1,5 +1,7 @@
 
 LTLIBRARY_NAME    = libsybase_ct.la
 LTLIBRARY_SOURCES = php_sybase_ct.c
+LTLIBRARY_SHARED_NAME = php_sybase_ct.la
+LTLIBRARY_SHARED_LIBADD = $(SYBASE_CT_SHARED_LIBADD)
 
 include $(top_srcdir)/build/dynlib.mk
--- config.m4.dist	Thu Sep 27 13:40:04 2001
+++ config.m4	Thu Sep 27 16:21:40 2001
@@ -1,44 +1,41 @@
 dnl $Id: config.m4,v 1.5 2001/03/27 20:34:43 sniper Exp $
 
-AC_MSG_CHECKING(for Sybase-CT support)
-AC_ARG_WITH(sybase-ct,
-[  --with-sybase-ct[=DIR]  Include Sybase-CT support.  DIR is the Sybase home
-                          directory, defaults to /home/sybase.],
-[
-  if test "$withval" != "no"; then
-    AC_MSG_RESULT(yes)
-    if test -z "$SYBASE_LIBS"; then
-      PHP_EXTENSION(sybase_ct)
-    fi
-    AC_DEFINE(HAVE_SYBASE_CT,1,[ ])
-    if test "$withval" = "yes"; then
-      SYBASE_CT_INCDIR=/home/sybase/include
-      SYBASE_CT_LIBDIR=/home/sybase/lib
-    else
-      SYBASE_CT_INCDIR=$withval/include
-      SYBASE_CT_LIBDIR=$withval/lib
-    fi
-	PHP_ADD_INCLUDE($SYBASE_CT_INCDIR)
-	PHP_ADD_LIBPATH($SYBASE_CT_LIBDIR)
-	PHP_ADD_LIBRARY(cs)
-	PHP_ADD_LIBRARY(ct)
-	PHP_ADD_LIBRARY(comn)
-	PHP_ADD_LIBRARY(intl)
-	SYBASE_CT_LIBS="-lcs -lct -lcomn -lintl"
-    old_LDFLAGS=$LDFLAGS
-    LDFLAGS="$LDFLAGS -L$SYBASE_CT_LIBDIR"
-    AC_CHECK_LIB(tcl, netg_errstr,
-              [ PHP_ADD_LIBRARY(tcl) ],
-              [ PHP_ADD_LIBRARY(sybtcl) ],
-              [ $SYBASE_CT_LIBS ])
-    AC_CHECK_LIB(insck, insck__getVdate,
-              [ PHP_ADD_LIBRARY(insck) ])
-    AC_CHECK_LIB(insck, bsd_tcp,
-              [ PHP_ADD_LIBRARY(insck) ])
-      LDFLAGS=$old_LDFLAGS
+PHP_ARG_WITH(sybase-ct,for Sybase-CT support,
+[  --with-sybase-ct[=DIR]     Include Sybase-CT support.  DIR is the Sybase home
+                             directory, defaults to /home/sybase.])
+
+if test "$PHP_SYBASE_CT" != "no"; then
+
+  if test "$PHP_SYBASE_CT" = "yes"; then
+    SYBASE_CT_INCDIR=/home/sybase/include
+    SYBASE_CT_LIBDIR=/home/sybase/lib
   else
-    AC_MSG_RESULT(no)
+    SYBASE_CT_INCDIR=$PHP_SYBASE_CT/include
+    SYBASE_CT_LIBDIR=$PHP_SYBASE_CT/lib
   fi
-],[
-  AC_MSG_RESULT(no)
-])
+
+  PHP_ADD_INCLUDE($SYBASE_CT_INCDIR)
+  PHP_ADD_LIBPATH($SYBASE_CT_LIBDIR,SYBASE_CT_SHARED_LIBADD)
+  PHP_ADD_LIBRARY(cs,1,SYBASE_CT_SHARED_LIBADD)
+  PHP_ADD_LIBRARY(ct,1,SYBASE_CT_SHARED_LIBADD)
+  PHP_ADD_LIBRARY(comn,1,SYBASE_CT_SHARED_LIBADD)
+  PHP_ADD_LIBRARY(intl,1,SYBASE_CT_SHARED_LIBADD)
+
+  SYBASE_CT_LIBS="-lcs -lct -lcomn -lintl"
+  old_LDFLAGS=$LDFLAGS
+  LDFLAGS="$LDFLAGS -L$SYBASE_CT_LIBDIR"
+  AC_CHECK_LIB(tcl, netg_errstr,
+                    [ PHP_ADD_LIBRARY(tcl,1,SYBASE_CT_SHARED_LIBADD) ],
+                    [ PHP_ADD_LIBRARY(sybtcl,1,SYBASE_CT_SHARED_LIBADD) ],
+                    [ $SYBASE_CT_LIBS ])
+  AC_CHECK_LIB(insck, insck__getVdate,
+                    [ PHP_ADD_LIBRARY(insck,1,SYBASE_CT_SHARED_LIBADD) ])
+  AC_CHECK_LIB(insck, bsd_tcp,
+                    [ PHP_ADD_LIBRARY(insck,1,SYBASE_CT_SHARED_LIBADD) ])
+  LDFLAGS=$old_LDFLAGS
+
+  PHP_EXTENSION(sybase_ct, $ext_shared)
+  AC_DEFINE(HAVE_SYBASE_CT,1,[ ])
+  PHP_SUBST_OLD(SYBASE_CT_SHARED_LIBADD)
+
+fi




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-18 05:57 UTC] derick@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.

Most likely fixed with the new build system in CVS, please reopen if it is not fixed.

Derick
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC