Opened 10 months ago

Closed 7 months ago

#69114 closed defect (fixed)

php81 fails to build with gcc-4.2: cc1: error: unrecognized command line option "-Wno-implicit-fallthrough"

Reported by: barracuda156 Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.9.1
Keywords: tiger, leopard, snowleopard Cc:
Port: php81, php82, php83

Description

cc1: error: unrecognized command line option "-Wno-implicit-fallthrough"
cc1: error: unrecognized command line option "-Wno-implicit-fallthrough"
make: *** [ext/date/php_date.lo] Error 1
make: *** Waiting for unfinished jobs....
make: *** [ext/date/lib/parse_date.lo] Error 1
cc1: error: unrecognized command line option "-Wno-implicit-fallthrough"
cc1: error: unrecognized command line option "-Wno-implicit-fallthrough"
make: *** [ext/date/lib/dow.lo] Error 1
cc1: error: unrecognized command line option "-Wno-implicit-fallthrough"
make: *** [ext/date/lib/parse_posix.lo] Error 1
make: *** [ext/date/lib/parse_tz.lo] Error 1
cc1: error: unrecognized command line option "-Wno-implicit-fallthrough"
make: *** [ext/date/lib/astro.lo] Error 1

I guess either old gcc is to be blacklisted or flags patched out?

Change History (8)

comment:1 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

The first step would be to report it to the developers to see what they say the solution is. php 8.1 is only getting security fixes at this point, so first check if php82 or php83 have this problem, and if so report it to them.

comment:2 in reply to:  1 Changed 10 months ago by barracuda156

Replying to ryandesign:

The first step would be to report it to the developers to see what they say the solution is. php 8.1 is only getting security fixes at this point, so first check if php82 or php83 have this problem, and if so report it to them.

Ok, will do that.

For the record, gcc13 builds it fine with no changes to the port.

comment:3 in reply to:  1 Changed 9 months ago by barracuda156

Replying to ryandesign:

so first check if php82 or php83 have this problem, and if so report it to them.

Yes, php83 is affected:

/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.2/libtool --silent --preserve-dup-deps --tag CC --mode=compile /usr/bin/gcc-4.2 -std=gnu99 -Iext/date/ -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.2/ext/date/ -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.2/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.2/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.2 -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.2/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.2/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.2/Zend  -I/opt/local/include -D_GNU_SOURCE  -fno-common -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -pipe -Os -arch ppc -fvisibility=hidden -DZEND_SIGNALS   -Wno-implicit-fallthrough -Iext/date/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=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.2/ext/date/lib/parse_tz.c -o ext/date/lib/parse_tz.lo  -MMD -MF ext/date/lib/parse_tz.dep -MT ext/date/lib/parse_tz.lo
/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.2/libtool --silent --preserve-dup-deps --tag CC --mode=compile /usr/bin/gcc-4.2 -std=gnu99 -Iext/date/ -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.2/ext/date/ -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.2/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.2/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.2 -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.2/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.2/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.2/Zend  -I/opt/local/include -D_GNU_SOURCE  -fno-common -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -pipe -Os -arch ppc -fvisibility=hidden -DZEND_SIGNALS   -Wno-implicit-fallthrough -Iext/date/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=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.2/ext/date/lib/parse_posix.c -o ext/date/lib/parse_posix.lo  -MMD -MF ext/date/lib/parse_posix.dep -MT ext/date/lib/parse_posix.lo
cc1: error: unrecognized command line option "-Wno-implicit-fallthrough"
make: *** [ext/date/php_date.lo] Error 1
make: *** Waiting for unfinished jobs....
cc1: error: unrecognized command line option "-Wno-implicit-fallthrough"
make: *** [ext/date/lib/parse_date.lo] Error 1
cc1: error: unrecognized command line option "-Wno-implicit-fallthrough"
make: *** [ext/date/lib/parse_posix.lo] Error 1
cc1: error: unrecognized command line option "-Wno-implicit-fallthrough"
make: *** [ext/date/lib/parse_tz.lo] Error 1
cc1: error: unrecognized command line option "-Wno-implicit-fallthrough"
make: *** [ext/date/lib/dow.lo] Error 1
cc1: error: unrecognized command line option "-Wno-implicit-fallthrough"
make: *** [ext/date/lib/astro.lo] Error 1

comment:4 Changed 9 months ago by barracuda156

Port: php82 php83 added
Version: 2.8.12.9.1

comment:5 Changed 9 months ago by barracuda156

Opened an issue with upstream: https://github.com/php/php-src/issues/13330

comment:6 in reply to:  1 Changed 9 months ago by barracuda156

Replying to ryandesign:

The first step would be to report it to the developers to see what they say the solution is.

Here is the suggested fix: https://github.com/php/php-src/pull/13331 However it assumes autotools build. So we either need to use autotools too, or otherwise patch existing configure scripts. What is the way to go?

comment:7 in reply to:  1 Changed 8 months ago by barracuda156

Replying to ryandesign:

Ryan, could you please update on this? I am not asking you to fix it yourself, I just need to know which way to adopt. (We only need to backport a fix from upstream.)

comment:8 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In 6010db5e55c286c71e1c41ce71205a749771aea6/macports-ports (master):

php8*: Add -Wno-implicit-fallthrough conditionally

Closes: #69114

Note: See TracTickets for help on using tickets.