ID:               44462
 Updated by:       [EMAIL PROTECTED]
 Reported By:      graham+php at nexopia dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Compile Failure
 Operating System: OSX
 PHP Version:      5.2CVS-2008-03-18
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/




Previous Comments:
------------------------------------------------------------------------

[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.

------------------------------------------------------------------------

[2008-04-25 15:00:36] cthompson at nexopia dot com

Problem still exists with latest snapshot on OS X.  Any pointers on
where I can look to resolve this problem would be appreciated.

------------------------------------------------------------------------

[2008-03-19 00:19:06] graham+php at nexopia dot com

Yes, we have been using the embed sapi with great success on linux for
a while now. As far as I know, the bug is isolated to OSX.

------------------------------------------------------------------------

[2008-03-18 22:06:55] graham+php at nexopia dot com

Tried that out, still fails in the same way.

------------------------------------------------------------------------

[2008-03-17 22:06:38] graham+php at nexopia dot com

Description:
------------
If you try to compile php with the embed sapi on OSX, you get an error
about duplicate symbols for yytext.

Reproduce code:
---------------
./configure --enable-embed
make




Expected result:
----------------
Finish compiling

Actual result:
--------------
make: *** [sapi/cli/php] Error 1
make: *** Waiting for unfinished jobs....
ld: warning, duplicate dylib /usr/lib/libm.dylib
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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=44462&edit=1

Reply via email to