Bug #2574 Updated: DSO module fails link (dupe symbols _pcre*)
| From: | Bug Database | Date: | Wed, 15 Dec 1999 06:26:21 +0000 |
| Subject: | Bug #2574 Updated: DSO module fails link (dupe symbols _pcre*) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-13704@lists.php.net to get a copy of this message | ||
ID: 2574
User Update by: jkrage@buser.net
Status: Open
Bug Type: Compile Failure
Description: DSO module fails link (dupe symbols _pcre*)
Problem reproduced on OpenBSD 2.6-RELEASE and -current.
The following patches correct the problems. The first is applied
php-3.0.12/Makefile.in and the second to
php-3.0.12/pcrelib/Makefile.in. Both patches in diff -u format.
The first patch clears up redundant inclusion of libpcre symbols
in the Makefile. The second patch force -fPIC to be used for
the pcre library build. This isn't the proper approach (it
should be automatically set by the configure script), but I
couldn't convince configure to do it properly (didn't spend a
lot of time on it either).
$PHP-DIST/Makefile.in
################################################################################
--- Makefile.in.orig Tue Jul 13 09:43:01 1999
+++ Makefile.in Wed Dec 8 01:27:50 1999
@@ -114,21 +114,21 @@
$(CC) $(CFLAGS) -o $(BINNAME) $(LDFLAGS) $(OBJS) $(FUNCTIONS) $(LIBS)
libphp3.a: $(OBJS) $(FUNCTIONS) @PCRE_LIB@ @DBASE_LIB@
- $(AR) $(BINNAME) $(OBJS) $(FUNCTIONS) @PCRE_OBJS@ @DBASE_OBJS@
+ $(AR) $(BINNAME) $(OBJS) $(FUNCTIONS) @DBASE_OBJS@
$(RANLIB) $(BINNAME)
libmodphp3.a: $(OBJS) $(FUNCTIONS) @PCRE_LIB@ @DBASE_LIB@
- $(AR) $(BINNAME) $(OBJS) $(FUNCTIONS) @PCRE_OBJS@ @DBASE_OBJS@
+ $(AR) $(BINNAME) $(OBJS) $(FUNCTIONS) @DBASE_OBJS@
$(RANLIB) $(BINNAME)
libmodphp3-so.a: $(OBJS) $(FUNCTIONS) @PCRE_LIB@ @DBASE_LIB@
- $(AR) libmodphp3-so.a $(OBJS) $(FUNCTIONS) @PCRE_OBJS@ @DBASE_OBJS@
+ $(AR) libmodphp3-so.a $(OBJS) $(FUNCTIONS) @DBASE_OBJS@
$(RANLIB) libmodphp3-so.a
libphp3.so: mod_php3.c libmodphp3-so.a @DBASE_LIB@ @PCRE_LIB@
-@test -f ./mod_php3.c || test -L ./mod_php3.c || $(LN_S) $(srcdir)/mod_
php3.c ./mod_ph.c
-@test -f ./mod_php3.c || test -h ./mod_php3.c || $(LN_S) $(srcdir)/mod_
php3.c ./mod_php3.c
- $(APXS) -c -o libphp3.so -I$(srcdir) -I. @RPATHS@ ./mod_php3.c libmodphp
3-so.a $(APXS_LDFLAGS) @APXS_EXP@ @PCRE_LIBS@
+ $(APXS) -c -o libphp3.so -I$(srcdir) -I. @RPATHS@ ./mod_php3.c libmodphp
3-so.a $(APXS_LDFLAGS) @APXS_EXP@
pcrelib/libpcre.a:
(cd pcrelib; $(MAKE))
################################################################################
$PHP-DIST/pcrelib/Makefile.in
################################################################################
--- Makefile.in.orig Wed Jun 2 07:28:01 1999
+++ Makefile.in Wed Dec 8 02:47:32 1999
@@ -2,7 +2,7 @@
AR = ar cq
CC = @CC@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -fPIC
RANLIB = @RANLIB@
VPATH = @srcdir@
################################################################################
Full Bug description available at: http://bugs.php.net/?id=2574