ID: 44462 Comment by: aaron at tenderlovemaking dot com Reported By: graham+php at nexopia dot com Status: No Feedback Bug Type: Compile Failure Operating System: OSX PHP Version: 5.2CVS-2009-03-25 New Comment:
This is happening for me as well: ld: duplicate symbol _yytext in Zend/.libs/zend_ini_scanner.o and Zend/.libs/zend_language_scanner.o collect2: ld returned 1 exit status make: *** [libphp5.la] Error 1 [apatter...@jordan2 php-5.2.9]$ I can attach my config.log if it helps. Previous Comments: ------------------------------------------------------------------------ [2009-06-05 19:27:45] ralph at smashlabs dot com I can confirm this is still an issue ld: duplicate symbol _spl_ce_SplDoublyLinkedList in ext/spl/.libs/spl_dllist.o and ext/spl/.libs/php_spl.o collect2: ld returned 1 exit status make: *** [libphp5.la] Error 1 I can compile statically though. Can you reopen? ------------------------------------------------------------------------ [2009-04-09 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2009-04-01 11:25:00] j...@php.net There is no working patch here. Or are you saying you can not compile PHP (without the experimental embed sapi)? FYI: it works fine for me. ------------------------------------------------------------------------ [2009-03-25 18:28:07] graham+php at nexopia dot com Incidentally, this bug is now a year old, has a functioning patch that resolves the issue, and has still not been fixed upstream. ------------------------------------------------------------------------ [2008-04-25 17:56:46] cthompson at nexopia dot com I just sent the following to the php-install mailing list for feedback. Modify php-5.2.5/Zend/zend_ini_scanner.c: --- /Users/cthompson/php-5.2.5.clean/Zend/zend_ini_scanner.c 2007-11-08 09:36:37.000000000 -0600 +++ ./zend_ini_scanner.c 2008-04-25 10:16:27.000000000 -0600 @@ -478,7 +478,7 @@ #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET -char *yytext; +//char *yytext; #define INITIAL 0 /* +----------------------------------------------------------------------+ Modify php-5.2.5/Zend/zend_language_scanner.c: --- /Users/cthompson/php-5.2.5.clean/Zend/zend_language_scanner.c 2007-11-08 09:36:37.000000000 -0600 +++ ./zend_language_scanner.c 2008-04-25 10:17:15.000000000 -0600 @@ -3009,7 +3009,7 @@ #define yymore() (yy_more_flag = 1) #define YY_MORE_ADJ yy_more_len #define YY_RESTORE_YY_MORE_OFFSET -char *yytext; +//char *yytext; #define INITIAL 0 /* This REMOVES the definition of yytext. I think this is okay because the various defines in those files actually end up using the yy_text in zend_global.h, at least as far as I can see. Certainly, this allows PHP to compile but I am not at all sure if this is going to cause other problems. Could someone please give me some feedback? Additionally, I believe php-5.2.5/sapi/cli/config.m4 should be modified to compile using libtool on OS X: --- /Users/cthompson/php-5.2.5.clean/sapi/cli/config.m4 2007-07-11 17:20:36.000000000 -0600 +++ ./config.m4 2008-04-25 11:51:57.000000000 -0600 @@ -17,7 +17,7 @@ BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)" ;; *darwin*) - BUILD_CLI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_CLI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)" + BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)" ;; *netware*) BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -Lnetware -lphp5lib -o \$(SAPI_CLI_PATH)" Of course, the shipping version of PHP 5.2.5 would then also need the php-5.2.5/configure file changing, though presumably this is autogenerated from the fragments: --- /Users/cthompson/php-5.2.5.clean/configure 2007-11-08 09:36:28.000000000 -0600 +++ ./configure 2008-04-25 11:27:46.000000000 -0600 @@ -9180,7 +9180,7 @@ BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)" ;; *darwin*) - BUILD_CLI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_CLI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)" + BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)" ;; *netware*) BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -Lnetware -lphp5lib -o \$(SAPI_CLI_PATH)" Again, I really welcome feedback on this. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/44462 -- Edit this bug report at http://bugs.php.net/?id=44462&edit=1