php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33212 [GCC 4]: 'zend_error_noreturn' aliased to external symbol 'zend_error'
Submitted: 2005-06-01 17:14 UTC Modified: 2005-06-17 20:47 UTC
From: daniel at comentar dot com dot br Assigned: dmitry
Status: Closed Package: Compile Failure
PHP Version: 5CVS-2005-06-01 (dev) OS: *
Private report: No CVE-ID:
 [2005-06-01 17:14 UTC] daniel at comentar dot com dot br
Description:
------------
Compile of PHP5CVS-200506011430 fails with:

/bin/sh /compartilhado/downloads/php/php5-200506011430/libtool --silent --preserve-dup-deps --mode=compile gcc  -IZend/ -I/compartilhado/downloads/php/php5-200506011430/Zend/ -DPHP_ATOM_INC -I/compartilhado/downloads/php/php5-200506011430/include -I/compartilhado/downloads/php/php5-200506011430/main -I/compartilhado/downloads/php/php5-200506011430 -I/usr/include/libxml2 -I/compartilhado/downloads/php/php5-200506011430/TSRM -I/compartilhado/downloads/php/php5-200506011430/Zend    -g -O2  -c /compartilhado/downloads/php/php5-200506011430/Zend/zend_execute.c -o Zend/zend_execute.lo
/compartilhado/downloads/php/php5-200506011430/Zend/zend_execute.c:47: error: 'zend_error_noreturn' aliased to external symbol 'zend_error'
make: *** [Zend/zend_execute.lo] Error 1

Reproduce code:
---------------
[root@elza php5-200506011430]# ./configure --prefix=/usr/local/php5 --enable-cli --disable-cgi
(View output in http://www.comentar.com.br/daniel/php5/configure-PHP5-200506011430.txt)
[root@elza php5-200506011430]# make

[root@elza php5-200506011430]# gcc --version
gcc (GCC) 4.0.0 20050519 (Red Hat 4.0.0-8)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-01 17:48 UTC] daniel at comentar dot com dot br
Problem solved with changes on lines 47 and 48 of file zend_execute.c.


Line 47: void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((alias("zend_error"),noreturn));
Line 48: /*extern void zend_error_noreturn(int type, const char *format, ...) __asm__("zend_error") __attribute__ ((noreturn));*/

Changed to:

Line 47: /*void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((alias("zend_error"),noreturn));*/
Line 48: extern void zend_error_noreturn(int type, const char *format, ...) __asm__("zend_error") __attribute__ ((noreturn));
 [2005-06-10 11:46 UTC] nlopess@php.net
this is the same probem reported in #30641.

As I've stated in that bug report, the code isn't standard compatible, so we will get much more bug reports if you continue to just add the special cases that fail to the #if statement.
Why not fix it properly? You just need to move that declaration to the zend.c file (http://news.php.net/php.internals/15768).
 [2005-06-13 12:27 UTC] sebastian@php.net
The patch worked for me, too.

Index: zend.c
===================================================================
RCS file: /repository/ZendEngine2/zend.c,v
retrieving revision 1.303
diff -u -B -r1.303 zend.c
--- zend.c      9 Jun 2005 16:57:43 -0000       1.303
+++ zend.c      13 Jun 2005 10:26:48 -0000
@@ -1025,6 +1025,7 @@
        }
 }

+void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((alias("zend_error"),noreturn));

 ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ...)
 {
Index: zend_execute.c
===================================================================
RCS file: /repository/ZendEngine2/zend_execute.c,v
retrieving revision 1.700
diff -u -B -r1.700 zend_execute.c
--- zend_execute.c      10 Jun 2005 09:54:36 -0000      1.700
+++ zend_execute.c      13 Jun 2005 10:26:49 -0000
@@ -44,7 +44,6 @@

 #if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__sun__) && !defined(ZEND_VM_OLD_EXECUTOR)
 #  define ZEND_VM_ALWAYS_INLINE  __attribute__ ((always_inline))
-void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((alias("zend_error"),noreturn));
 /*extern void zend_error_noreturn(int type, const char *format, ...) __asm__("zend_error") __attribute__ ((noreturn));*/
 #else
 #  define ZEND_VM_ALWAYS_INLINE
 [2005-06-16 23:56 UTC] nlopess@php.net
Please try using this CVS snapshot:

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


 [2005-06-17 20:47 UTC] daniel at comentar dot com dot br
Ok, compiled!

tks!
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Mon Apr 21 00:02:04 2014 UTC