You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2004/08/10 08:52:49 UTC

DO NOT REPLY [Bug 27550] - pcre symbol issues for apache modules

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27550>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27550

pcre symbol issues for apache modules





------- Additional Comments From apache-bugs.20.openmacnews@spamgourmet.com  2004-08-10 06:52 -------
hi all,

this problem's been around for awhile ... for at least a couple of years!
	http://groups.google.com/groups?hl=en&lr=&ie=UTF
-8&scoring=d&q=pcre+apache+%22multiple+definitions+of+symbol%22&btnG=Search

it keeps getting reported primarily to the php boards, and repeatedly referred *back* as an Apache bug.

bottom line:
	
######################################################################
Andres' patch (http://nagoya.apache.org/bugzilla/showattachment.cgi?attach_id=10734) 
seems to fix the problem.  can this get integrated into HEAD & the 2.0.50 RELEASE?
######################################################################

on OSX, for quite awhile, i've been able to get around it by buildg httpd with its internal/included 
pcre39, building an external build of pcre39, and linking php against the external lib via the LDFLACGS 
& CPPFLAGS

however, with recent (for me, since yesterday)  httpd-head, building php --with-apxs aagain causes 
conflicts with apache's included pcre.  any inclusion/combination of any other (later) version, OR the 
inclusion of the php config param "--with-pcre-regex=..." results in 'make' errors/failures.

reading thru Andres' patch submission here, i tried the 'replace-namespace' patch (link above).  per 
Andres, it seems to do the trick for Debian ...

as for me, with patch applied in OSX, i'm now able to successfully build httpd w/ internal pcre -- now in 
its own namespace -- and build php500 --with-pcre against an external build of pcre45.

here _my_ 'recipe' for success ...

three 'pieces':
(1) pcre 45
(2) httpd 2.0.50 (there's a few other issues i'm having with latest HEAD, so i dropped back to 2.0.50 for 
this)
(3) php 500 release

also:
	% uname -v
		Darwin Kernel Version 7.5.0: Thu Aug  5 19:26:16 PDT 2004; root:xnu/xnu-517.7.21.obj~3/
RELEASE_PPC 
	% glibtool --version
		ltmain.sh (GNU libtool) 1.5.8 (1.1220.2.117 2004/08/04 14:12:05)
	% automake --version
		automake (GNU automake) 1.9
	% autoconf --version
		autoconf (GNU Autoconf) 2.59
	% gcc --version
		gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1666)
	% /usr/local/ssl/bin/openssl version
		OpenSSL 0.9.7d 17 Mar 2004


############################################################
pcre-4.5
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-4.5.tar.gz
gnutar zxf pcre-4.5.tar.gz
cd /usr/ports/pcre-4.5
unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS LD_PREBIND LINGUAS LC_ALL LANG
glibtoolize --force --copy && aclocal && autoconf
./configure \
--prefix=/usr/local/pcre45 \
--enable-shared --disable-static
make
make install

############################################################
httpd-2.0.50

wget ftp://apache.secsup.org/pub/apache/dist/httpd/httpd-2.0.50.tar.gz
gnutar zxf httpd-2.0.50.tar.gz
cd /usr/ports/httpd-2.0.50

curl -f -L -o patch.pcre.txt "http://nagoya.apache.org/bugzilla/showattachment.cgi?attach_id=10734"
patch -p2 < patch.pcre.txt
unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS LD_PREBIND LC_ALL LANG LINGUAS
./buildconf

# enable linking against dlcompat's libdl
=============================================================
(EDITOR) /usr/ports/httpd-2.0.50/srclib/apr/configure
@10433
---	enable_dlopen=no
+++	enable_dlopen=yes
	enable_win32_dll=no
=============================================================

./configure \
--with-mpm=worker \
--enable-layout=Darwin --with-port=80 \
--enable-mods-shared=all --enable-so --disable-static \
--sysconfdir=/etc/apache2 \
--enable-dav --enable-dav-fs --enable-dav-lock \
--enable-ssl --with-ssl=/usr/local/ssl \
--disable-suexec \
--with-z \
--enable-cgi \
--enable-proxy \
--enable-proxy-connect \
--enable-proxy-ftp \
--enable-proxy-http \
--enable-logio \
--enable-authn-dbm --enable-authz-dbm \
--with-imap


# these lib links won't pick up from cmd line ... do it manually for now
=============================================================
(EDITOR) /usr/ports/httpd-2.0.50/build/config_vars.mk
	EXTRA_CFLAGS = -g -O2
	EXTRA_CXXFLAGS =
---	EXTRA_LDFLAGS = -L/usr/local/lib  -L/usr/local/ssl/lib
+++	EXTRA_LDFLAGS = -bind_at_load -L/usr/local/lib  -L/usr/local/ssl/lib
---	EXTRA_LIBS = -lssl -lcrypto
+++	EXTRA_LIBS = -lssl -lcrypto -lz -ldl -lexpat
=============================================================

make
make install

#################################################################
php-5.0.0
wget http://us2.php.net/distributions/php-5.0.0.tar.gz
gnutar zxf php-5.0.0.tar.gz

unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS LD_PREBIND EXTRA_LDFLAGS 
EXTRA_LIBS LC_ALL LANG LINGUAS ;\
setenv LC_ALL C ;\
setenv LANG C ;\
setenv CPPFLAGS "-I/usr/local/ssl/include -I/usr/local/pcre45/include -I/usr/local/include" ;\
setenv LDFLAGS "-bind_at_load  -L/usr/local/ssl/lib -lssl -lcrypto -L/usr/local/pcre45/lib -lpcre"

=============================================================
(EDITOR) /usr/ports/php-5.0.0/configure.in
---	AC_PROG_RANLIB
+++	AC_PROG_LIBTOOL
=============================================================

cd /usr/ports/php-5.0.0
autoconf
ranlib /usr/local/pgsql/lib/libpq.a

./configure \
--disable-debug \
--prefix=/usr --with-layout=PHP \
--with-config-file-path=/etc/php5 --sysconfdir=/etc/php5 \
--enable-shared --disable-static \
--libdir=/System/Library/PHP \
--includedir=/usr/include \
--mandir=/usr/local/man \
--localstatedir=/var/php4 \
--with-db4=/usr \
--with-pgsql=/usr/local/pgsql --without-mysql \
--enable-cli --with-pear=/System/Library/PHP \
--disable-cgi \
--with-apxs2=/usr/sbin/apxs \
--disable-dmalloc \
--with-tsrm-pthreads \
--enable-shmop --enable-sockets \
--enable-inline-optimization \
--enable-xml --enable-libxml --with-libxml-dir=/usr \
--with-java=/Library/Java/Home \
--with-openssl=/usr/local/ssl --with-openssl-dir=/usr/local/ssl \
--with-zlib --with-zlib-dir=/usr \
--with-imap=/usr/local/imap --enable-mailparse \
--with-imap-ssl=/usr/local/ssl \
--with-mcrypt --with-mhash \
--with-gmp=/usr/local \
--with-gd=/usr/local/gd \
--with-png-dir=/usr/local \
--with-jpeg-dir=/usr/local \
--with-tiff-dir=/usr/local \
--enable-magic-quotes \
--enable-calendar \
--disable-mbstring \
--with-kerberos=/usr \
--with-freetype-dir=/usr/X11R6 \
--with-xpm-dir=/usr/X11R6 \
--enable-exif \
--enable-ftp \
--enable-bcmath \
--with-pcre-regex=/usr/local/pcre45

make
make install

cheers,

richard

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org