php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42106 Build fails due to duplicate symbols (missing externs)
Submitted: 2007-07-25 21:30 UTC Modified: 2007-10-06 02:33 UTC
Votes:1
Avg. Score:2.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: chris at improbable dot org Assigned: jani (profile)
Status: Closed Package: Compile Failure
PHP Version: 5.2CVS-2007-07-26 OS: Mac OS X
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: chris at improbable dot org
New email:
PHP Version: OS:

 

 [2007-07-25 21:30 UTC] 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 



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-26 00:18 UTC] 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-26 17:27 UTC] jani@php.net
What compiler (and version) are you using?
Does this happen if you don't set the CFLAGS?
 [2007-10-03 00:49 UTC] chris at improbable dot org
This is still a problem with 5.2.4. This affects the stock gcc (i686-
apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367)) 
with or without CFLAGS=-fast
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Apr 28 08:01:28 2025 UTC