#42106 [Opn->Fbk]: Build fails due to duplicate symbols (missing externs)
ID: 42106
Updated by: jani@php.net
Reported By: chris at improbable dot org
-Status: Open
+Status: Feedback
Bug Type: Compile Failure
Operating System: Mac OS X
PHP Version: 5.2.3
New Comment:
What compiler (and version) are you using?
Does this happen if you don't set the CFLAGS?
Previous Comments:
------------------------------------------------------------------------
[2007-07-26 00:18:03] chris at improbable dot org
5.2-latest fails in exactly the same fashion:
ld64-74.4 failed: duplicate symbol _php_bz2_filter_factory in
ext/bz2/bz2_filter.o and ext/bz2/bz2.o
The fix is identical.
------------------------------------------------------------------------
[2007-07-25 21:30:55] chris at improbable dot org
Description:
------------
The build failed with a duplicate symbol error:
ld64-74.4 failed: duplicate symbol _php_bz2_filter_factory in
ext/bz2/bz2_filter.o and ext/bz2/bz2.o
This was solved by adding extern to the php_bz2_filter_factory
declaration in ext/bz2/php_bz2.h
An identical problem happened with Zend/zend_ini_scanner.c with the
yytext declaration on line 478 (there is an earlier declaration in the
same file which is already declared extern).
Reproduce code:
---------------
CFLAGS=-fast ./configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --disable-dependency-tracking
--with-apxs2=/usr/sbin/apxs --with-ldap=/usr --enable-cli
--with-zlib-dir=/usr --with-xml --enable-exif --enable-mbstring
--enable-mbregex --enable-sockets --with-curl=/usr
--with-config-file-path=/etc --sysconfdir=/private/etc
--with-mysql-sock=/tmp/mysql --with-mysql=shared,/usr/local/mysql
--with-mysqli=shared,which mysql_config --with-pdo-mysql=shared,`which
mysql_config` --with-openssl --with-xmlrpc --with-xsl=/usr
--with-pear=/Library/PHP --with-bz2 --enable-bcmath --disable-cgi
--enable-zip --enable-memory-limit --enable-pcntl --with-zlib=/usr
--with-zlib-dir=/usr --with-ldap --enable-memcache
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42106&edit=1
Thread (6 messages)