php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44344 duplicate symbol error during make
Submitted: 2008-03-05 22:03 UTC Modified: 2008-03-14 12:15 UTC
Votes:2
Avg. Score:4.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: sam dot sjk at gmail dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.2.5 OS: OSX 10.5.2
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: sam dot sjk at gmail dot com
New email:
PHP Version: OS:

 

 [2008-03-05 22:03 UTC] sam dot sjk at gmail dot com
Description:
------------
I've tried to compile 5.2.5 and latest 5.2 snap.  I get an error 
during 
make:
ld: duplicate symbol _yytext in Zend/zend_ini_scanner.o and 
Zend/zend_language_scanner.o

collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1

I'm on OSX 10.5.2 build 9c31 Intel Core 2 Duo
gcc version 4.0.1 (Apple Inc. build 5465)

Bug 42106 states same problem.  Not sure if it was proper to re-open 
that bug (and how thats done)







Reproduce code:
---------------
$ ./configure --prefix=/usr/local/php5 \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--sysconfdir=/etc \
--with-pgsql=/Library/PostgreSQL8 \
--without-mysql \
--with-apxs2=/usr/sbin/apxs \
--without-sqlite \
--with-mime-magic=/etc/apache2/magic \
--enable-gd-native-ttf \
--with-pic \
--with-jpeg-dir=/opt/local \
--with-png-dir=/opt/local

$ make 

....

ld: duplicate symbol _yytext in Zend/zend_ini_scanner.o and 
Zend/zend_language_scanner.o

collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1

Expected result:
----------------
finish make with out error

Actual result:
--------------
$ make

   ...

t/standard/reg.o ext/standard/soundex.o ext/standard/string.o 
ext/standard/scanf.o ext/standard/syslog.o ext/standard/type.o 
ext/standard/uniqid.o ext/standard/url.o ext/standard/url_scanner.o 
ext/standard/var.o ext/standard/versioning.o ext/standard/assert.o 
ext/standard/strnatcmp.o ext/standard/levenshtein.o 
ext/standard/incomplete_class.o ext/standard/url_scanner_ex.o 
ext/standard/ftp_fopen_wrapper.o ext/standard/http_fopen_wrapper.o 
ext/standard/php_fopen_wrapper.o ext/standard/credits.o 
ext/standard/css.o ext/standard/var_unserializer.o ext/standard/ftok.o 
ext/standard/sha1.o ext/standard/user_filters.o 
ext/standard/uuencode.o ext/standard/filters.o 
ext/standard/proc_open.o ext/standard/streamsfuncs.o 
ext/standard/http.o ext/tokenizer/tokenizer.o 
ext/tokenizer/tokenizer_data.o ext/xml/xml.o ext/xml/compat.o 
ext/xmlreader/php_xmlreader.o ext/xmlwriter/php_xmlwriter.o 
TSRM/TSRM.o TSRM/tsrm_strtok_r.o TSRM/tsrm_virtual_cwd.o main/main.o 
main/snprintf.o main/spprintf.o main/php_sprintf.o main/safe_mode.o 
main/fopen_wrappers.o main/alloca.o main/php_scandir.o main/php_ini.o 
main/SAPI.o main/rfc1867.o main/php_content_types.o main/strlcpy.o 
main/strlcat.o main/mergesort.o main/reentrancy.o main/php_variables.o 
main/php_ticks.o main/network.o main/php_open_temporary_file.o 
main/php_logos.o main/output.o main/streams/streams.o 
main/streams/cast.o main/streams/memory.o main/streams/filter.o 
main/streams/plain_wrapper.o main/streams/userspace.o 
main/streams/transports.o main/streams/xp_socket.o main/streams/mmap.o 
Zend/zend_language_parser.o Zend/zend_language_scanner.o 
Zend/zend_ini_parser.o Zend/zend_ini_scanner.o Zend/zend_alloc.o 
Zend/zend_compile.o Zend/zend_constants.o Zend/zend_dynamic_array.o 
Zend/zend_execute_API.o Zend/zend_highlight.o Zend/zend_llist.o 
Zend/zend_opcode.o Zend/zend_operators.o Zend/zend_ptr_stack.o 
Zend/zend_stack.o Zend/zend_variables.o Zend/zend.o Zend/zend_API.o 
Zend/zend_extensions.o Zend/zend_hash.o Zend/zend_list.o 
Zend/zend_indent.o Zend/zend_builtin_functions.o Zend/zend_sprintf.o 
Zend/zend_ini.o Zend/zend_qsort.o Zend/zend_multibyte.o 
Zend/zend_ts_hash.o Zend/zend_stream.o Zend/zend_iterators.o 
Zend/zend_interfaces.o Zend/zend_exceptions.o Zend/zend_strtod.o 
Zend/zend_objects.o Zend/zend_object_handlers.o 
Zend/zend_objects_API.o Zend/zend_default_classes.o 
Zend/zend_execute.o sapi/apache2handler/mod_php5.o 
sapi/apache2handler/sapi_apache2.o sapi/apache2handler/apache_config.o 
sapi/apache2handler/php_functions.o main/internal_functions.o  -lpq -
liconv -liconv -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -
lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore 
-lm -lxml2 -lz -licucore -lm  -o libs/libphp5.bundle && cp 
libs/libphp5.bundle libs/libphp5.so
ld: duplicate symbol _yytext in Zend/zend_ini_scanner.o and 
Zend/zend_language_scanner.o

collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1







Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-05 22:07 UTC] sam dot sjk at gmail dot com
sorry had OSX10.5.1,  should be 10.5.2
 [2008-03-10 16:54 UTC] sam dot sjk at gmail dot com
i tried the suggested  http://snaps.php.net/php5.2-latest.tar.gz but 
with same results.

I tried dozens of compile tests and determined that the issue only 
arrises for me if I configure/compile with "--with-pic"

# with just --with-pic
# make fails
./configure --with-pic

# all my options except "--with-pic"
# configures and makes fine
./configure --prefix=/usr/local/php5 \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--sysconfdir=/etc \
--without-mysql \
--without-sqlite \
--with-apxs2=/usr/sbin/apxs \
--enable-gd-native-ttf \
--with-jpeg-dir=/sw \
--with-pgsql=/Library/PostgreSQL8 \
--with-mime-magic=/etc/apache2/magic \
--with-png-dir=/usr/X11R6
 [2008-03-14 12:15 UTC] jani@php.net
Don't use configure options when you don't know what they do..
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 29 02:00:03 2025 UTC