[MacPorts] #71338: php83 again cannot build with Xcode gcc: error: #pragma GCC diagnostic not allowed inside functions

MacPorts noreply at macports.org
Sun Nov 17 10:41:05 UTC 2024


#71338: php83 again cannot build with Xcode gcc: error: #pragma GCC diagnostic not
allowed inside functions
--------------------------+------------------------
 Reporter:  barracuda156  |      Owner:  ryandesign
     Type:  defect        |     Status:  assigned
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.10.4
 Keywords:                |       Port:  php83
--------------------------+------------------------
 I do not even know if the earlier bug was fixed, but now it fails on:
 {{{
 /bin/sh
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12/libtool
 --silent --preserve-dup-deps --tag=CC --mode=compile ccache
 /usr/bin/gcc-4.2 -std=gnu99 -Iext/zlib/
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12/ext/zlib/
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12/include
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12/main
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12/ext/date/lib
 -I/opt/local/include/libxml2 -I/opt/local/include
 -I/opt/local/include/editline
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12/TSRM
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12/Zend
 -I/opt/local/include -D_GNU_SOURCE  -fno-common -Wstrict-prototypes -Wall
 -Wextra -Wno-unused-parameter -Wno-sign-compare -pipe -Os -arch ppc
 -fvisibility=hidden -DZEND_SIGNALS   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1
 -c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12/ext/zlib/zlib.c
 -o ext/zlib/zlib.lo  -MMD -MF ext/zlib/zlib.dep -MT ext/zlib/zlib.lo
 In file included from
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12/ext/libxml/libxml.c:44:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12/ext/libxml/php_libxml.h:
 In function ‘php_libxml_sanitize_parse_ctxt_options’:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12/ext/libxml/php_libxml.h:200:
 error: #pragma GCC diagnostic not allowed inside functions
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12/ext/libxml/php_libxml.h:200:
 error: #pragma GCC diagnostic not allowed inside functions
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12/ext/libxml/php_libxml.h:208:
 error: #pragma GCC diagnostic not allowed inside functions
 make: *** [ext/libxml/libxml.lo] Error 1
 make: *** Waiting for unfinished jobs....
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12/ext/zlib/zlib.c:
 In function ‘zif_ob_gzhandler’:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12/ext/zlib/zlib.c:528:
 warning: missing initializer
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12/ext/zlib/zlib.c:528:
 warning: (near initialization for ‘ctx.in’)
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12/ext/zlib/zlib.c:
 In function ‘zif_deflate_init’:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12/ext/zlib/zlib.c:1168:
 warning: unused variable ‘success’
 make: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12'
 Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83/work/php-8.3.12"
 && /usr/bin/make -j6 -w all
 Exit code: 2
 Error: Failed to build php83: command execution failed
 }}}

 P. S. I am not suggesting to keep carrying a patch, rather blacklist old
 compilers or require C11.

-- 
Ticket URL: <https://trac.macports.org/ticket/71338>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list