php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26321 'ld: warning multiple definitions' problem
Submitted: 2003-11-19 12:05 UTC Modified: 2004-01-02 20:37 UTC
Votes:3
Avg. Score:4.0 ± 0.8
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: grayw at mail dot montclair dot edu Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5CVS-2004-01-2 OS: Mac OS X 10.3.2
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: grayw at mail dot montclair dot edu
New email:
PHP Version: OS:

 

 [2003-11-19 12:05 UTC] grayw at mail dot montclair dot edu
Description:
------------
Compiling PHP5.0.0b2 on Mac OS X Panther 10.3.1, make 
fails.  I took a look at similar bugs in php 4 in the 
bug search, but nothing seems to match this well enough 
to provide a workaround.  also tried latest cvs 
snapshot, see below.

Reproduce code:
---------------
configure:
./configure 
--includedir=/usr/include  
--mandir=/usr/share/man  
--infodir=/usr/share/info  
--with-apxs2=/Library/Apache2/bin/apxs  
--with-openssl  
--with-zlib  
--with-zlib-dir=/usr/lib  
--with-bz2  
--enable-calendar   
--with-libxml-dir=/usr/local  
--with-gd  
--with-ldap  
--enable-mbstring  
--with-mcrypt  
--with-openssl-dir=/usr/include/openssl  
--with-mhash  
--with-mime-magic=/usr/share/file/magic.mime  
--with-mysql=/Library/MySQL  
--with-pgsql=/usr/local/postgres  
--enable-sockets  
--with-xsl=/Library/PHP4 
--prefix=/Library/PHP5 
--with-png-dir=/usr/local
--with-jpeg-dir=/usr/local

configure succeeds,

then plain old 'make'

Expected result:
----------------
to run sudo make install afterwards ;)

Actual result:
--------------
this seems to be the relevant make crash part:
ld: warning multiple definitions of symbol _pcre_free
ext/pcre/pcrelib/pcre.o definition of _pcre_free in 
section (__DATA,__data)
/Library/Apache2/bin/httpd definition of _pcre_free
ld: warning multiple definitions of symbol _pcre_malloc
ext/pcre/pcrelib/pcre.o definition of _pcre_malloc in 
section (__DATA,__data)
/Library/Apache2/bin/httpd definition of _pcre_malloc
ld: warning multiple definitions of symbol _regerror
ext/mbstring/oniguruma/regposerr.o definition of 
_regerror in section (__TEXT,__text)
/Library/Apache2/bin/httpd definition of _regerror
ld: warning multiple definitions of symbol _regcomp
/Library/Apache2/bin/httpd definition of _regcomp
/usr/lib/libm.dylib(regcomp.So) definition of _regcomp
ld: warning multiple definitions of symbol _regexec
/Library/Apache2/bin/httpd definition of _regexec
/usr/lib/libm.dylib(regexec.So) definition of _regexec
ld: warning multiple definitions of symbol _regfree
/Library/Apache2/bin/httpd definition of _regfree
/usr/lib/libm.dylib(regfree.So) definition of _regfree
ld: Undefined symbols:
_PQparameterStatus
_PQprotocolVersion
_PQtransactionStatus
_pg_encoding_to_char
_pg_char_to_encoding
_pg_encoding_mblen
make: *** [libs/libphp5.bundle] Error 1


what may also be interesting, i've also tried my 
configure and make with what was the lastest Cvs 
snapshot - php5-200311191430, and this produced a 
similar, tho not quite, crash during the make:

ld: ext/openssl/xp_ssl.o illegal reference to symbol: 
_SSL_connect defined in indirectly referenced dynamic 
library /usr/lib/libssl.0.9.7.dylib
ld: warning multiple definitions of symbol _pcre_free
ext/pcre/pcrelib/pcre.o definition of _pcre_free in 
section (__DATA,__data)
/Library/Apache2/bin/httpd definition of _pcre_free
ld: warning multiple definitions of symbol _pcre_malloc
ext/pcre/pcrelib/pcre.o definition of _pcre_malloc in 
section (__DATA,__data)
/Library/Apache2/bin/httpd definition of _pcre_malloc
ld: warning multiple definitions of symbol _regerror
ext/mbstring/oniguruma/regposerr.o definition of 
_regerror in section (__TEXT,__text)
/Library/Apache2/bin/httpd definition of _regerror
ld: warning multiple definitions of symbol _regcomp
/Library/Apache2/bin/httpd definition of _regcomp
/usr/lib/libm.dylib(regcomp.So) definition of _regcomp
ld: warning multiple definitions of symbol _regexec
/Library/Apache2/bin/httpd definition of _regexec
/usr/lib/libm.dylib(regexec.So) definition of _regexec
ld: warning multiple definitions of symbol _regfree
/Library/Apache2/bin/httpd definition of _regfree
/usr/lib/libm.dylib(regfree.So) definition of _regfree
make: *** [libs/libphp5.bundle] Error 1

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-12-01 11:59 UTC] sniper@php.net
What was the configure line used to configure Apache?

 [2003-12-01 12:51 UTC] grayw at mail dot montclair dot edu
DOH!  sorry about that! Apache configure:
./configure \
--enable-so \
--prefix=/Library/Apache2 \
--enable-cache \
--enable-disk-cache \
--enable-ldap \
--enable-auth-ldap \
--enable-mime-magic \
--enable-expires \
--enable-headers \
--enable-ssl \
--enable-http \
--enable-info \
--enable-cgi \
--enable-vhost-alias \
--enable-rewrite
 [2003-12-02 00:14 UTC] sniper@php.net
Does the problem go away if you add --without-pcre-regex to your PHP configure line..? (remember to delete config.cache before reconfigure)

 [2003-12-02 10:19 UTC] grayw at mail dot montclair dot edu
Well, I didn't get past the configure --without-pcre-
regex:
[OUTPUT]
Configuring PEAR
checking whether to install PEAR... yes
configure: error:  
                    PEAR requires PCRE to be enabled.    
Add --with-pcre-regex to the configure line.
[/OUTPUT]

Trying configure --without-pcre-regex and --without-
pear... well it seems the make bonked again (this seems 
to happen right when the final libphp5.so is being 
built):

ld: ext/openssl/openssl.o illegal reference to symbol: 
_SSL_get_privatekey defined in indirectly referenced 
dynamic library /usr/lib/libssl.0.9.7.dylib
ld: warning multiple definitions of symbol _regerror
ext/mbstring/oniguruma/regposerr.o definition of 
_regerror in section (__TEXT,__text)
/Library/Apache2/bin/httpd definition of _regerror
ld: warning multiple definitions of symbol _regcomp
/Library/Apache2/bin/httpd definition of _regcomp
/usr/lib/libm.dylib(regcomp.So) definition of _regcomp
ld: warning multiple definitions of symbol _regexec
/Library/Apache2/bin/httpd definition of _regexec
/usr/lib/libm.dylib(regexec.So) definition of _regexec
ld: warning multiple definitions of symbol _regfree
/Library/Apache2/bin/httpd definition of _regfree
/usr/lib/libm.dylib(regfree.So) definition of _regfree
make: *** [libs/libphp5.bundle] Error 1
 [2003-12-15 10:29 UTC] grayw at mail dot montclair dot edu
I have the time to put more work into this bug, so if there's anything I can do (I understand how busy the bugs people are!), please let me know.  I'll give it another whack with the latest CVS snapshot.

Bill
 [2004-01-02 10:48 UTC] sniper@php.net
Does adding --disable-mbstring into configure line make this work?

 [2004-01-02 13:15 UTC] grayw at mail dot montclair dot edu
I removed my beta 2 sources last week, and so I'm trying 
this now with beta 3.  Also, I have updated my 
development host to Mac OS X 10.3.2.  I don't believe 
that the beta2 source is still available via 
www.php.net (can't find it).  My results (for what it's 
worth) are quite similar, tried --disable-mbstring like 
you asked.  If you would like me to keep working with 
the beta 2 source, I need some access to it.

Output where make fails: (for beta 3 and latest beta 3 
snapshot):

ld: warning multiple definitions of symbol _pcre_free
ext/pcre/pcrelib/pcre.o definition of _pcre_free in 
section (__DATA,__data)
/Library/Apache2.panther/bin/httpd definition of 
_pcre_free
ld: warning multiple definitions of symbol _pcre_malloc
ext/pcre/pcrelib/pcre.o definition of _pcre_malloc in 
section (__DATA,__data)
/Library/Apache2.panther/bin/httpd definition of 
_pcre_malloc
ld: warning multiple definitions of symbol _regcomp
/Library/Apache2.panther/bin/httpd definition of 
_regcomp
/usr/lib/libm.dylib(regcomp.So) definition of _regcomp
ld: warning multiple definitions of symbol _regexec
/Library/Apache2.panther/bin/httpd definition of 
_regexec
/usr/lib/libm.dylib(regexec.So) definition of _regexec
ld: warning multiple definitions of symbol _regfree
/Library/Apache2.panther/bin/httpd definition of 
_regfree
/usr/lib/libm.dylib(regfree.So) definition of _regfree
ld: Undefined symbols:
_PQparameterStatus
_PQprotocolVersion
_PQtransactionStatus
_pg_encoding_to_char
_pg_char_to_encoding
_pg_encoding_mblen
make: *** [libs/libphp5.bundle] Error 1
 [2004-01-02 13:36 UTC] grayw at mail dot montclair dot edu
I tried it one more time with all three previous tests:
--without-pcre-regex
--without-pear
--disable-mbstring
which gives a slightly different output during make.

so the config now looks like:
./configure --mandir=/usr/share/man  --infodir=/usr/
share/info  --with-apxs2=/Library/Apache2/bin/apxs  --
with-openssl  --with-zlib  --with-zlib-dir=/usr/lib  --
with-bz2  --enable-calendar   --with-libxml-dir=/usr/
local  --with-gd  --with-ldap  --disable-mbstring  --
with-mcrypt  --with-openssl-dir=/usr/include/openssl  --
with-mhash  --with-mime-magic=/usr/share/file/magic.mime  
--with-mysql=/Library/MySQL  --with-pgsql=/usr/local/
postgres  --enable-sockets  --with-xsl=/Library/PHP4 --
prefix=/Library/PHP5 --with-png-dir=/usr/local --with-
jpeg-dir=/usr/local/ --without-pcre-regex --without-pear

and the output error is:
ld: warning multiple definitions of symbol _regcomp
/Library/Apache2.panther/bin/httpd definition of 
_regcomp
/usr/lib/libm.dylib(regcomp.So) definition of _regcomp
ld: warning multiple definitions of symbol _regexec
/Library/Apache2.panther/bin/httpd definition of 
_regexec
/usr/lib/libm.dylib(regexec.So) definition of _regexec
ld: warning multiple definitions of symbol _regfree
/Library/Apache2.panther/bin/httpd definition of 
_regfree
/usr/lib/libm.dylib(regfree.So) definition of _regfree
ld: Undefined symbols:
_PQparameterStatus
_PQprotocolVersion
_PQtransactionStatus
_pg_encoding_to_char
_pg_char_to_encoding
_pg_encoding_mblen
make: *** [libs/libphp5.bundle] Error 1
 [2004-01-02 20:37 UTC] sniper@php.net
This is some Apache bug. As you can see, the conflict is between httpd and some system libs. Not PHP.

 [2004-07-24 01:29 UTC] gmclachl at cis dot strath dot ac dot uk
I have tried the default version of Apache in OSX 
(10.3.4) and 1.3.31 and each time it returns this error. 
However other users have managed to compile it 
successfully with 1.3.31.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 09:01:27 2024 UTC