Re: [MacPorts] #70456: pngloss: error: ‘for’ loop initial declaration used outside C99 mode

MacPorts noreply at macports.org
Mon Aug 26 18:10:06 UTC 2024


#70456: pngloss: error: ‘for’ loop initial declaration used outside C99 mode
---------------------------+-----------------------------------------
  Reporter:  barracuda156  |      Owner:  herbygillot
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.9.3
Resolution:                |   Keywords:  tiger, leopard, snowleopard
      Port:  pngloss       |
---------------------------+-----------------------------------------

Comment (by barracuda156):

 Replying to [comment:2 herbygillot]:
 > This can be verified to see whether that last commit has fixed the
 issue.

 Unfortunately, looks like it did not help:
 {{{
 --->  Applying patches to pngloss
 --->  Applying patch-Makefile.diff
 Executing:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/pngloss-1.0"
 && /usr/bin/patch -p0 <
 '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/graphics/pngloss/files
 /patch-Makefile.diff'
 patching file ./Makefile
 --->  Configuring pngloss
 --->  Building pngloss
 Executing:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/pngloss-1.0"
 && /usr/bin/make -j6 -w pngloss
 CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/compwrap/cc/usr/bin/gcc-4.2"
 CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/compwrap/cxx/usr/bin/g++-4.2"
 OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/compwrap/objc/usr/bin/gcc-4.2"
 OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/compwrap/objcxx/usr/bin/g++-4.2"
 INSTALL="/opt/x86_64/bin/ginstall -c"
 make: Entering directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/pngloss-1.0'
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/compwrap/cc/usr/bin/gcc-4.2
 -Os -arch ppc -I/opt/local/include  -c -o src/color_delta.o
 src/color_delta.c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/compwrap/cc/usr/bin/gcc-4.2
 -Os -arch ppc -I/opt/local/include  -c -o src/optimize_state.o
 src/optimize_state.c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/compwrap/cc/usr/bin/gcc-4.2
 -Os -arch ppc -I/opt/local/include  -c -o src/pngloss_image.o
 src/pngloss_image.c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/compwrap/cc/usr/bin/gcc-4.2
 -Os -arch ppc -I/opt/local/include  -c -o src/pngloss_opts.o
 src/pngloss_opts.c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/compwrap/cc/usr/bin/gcc-4.2
 -Os -arch ppc -I/opt/local/include  -c -o src/pngloss.o src/pngloss.c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/compwrap/cc/usr/bin/gcc-4.2
 -Os -arch ppc -I/opt/local/include  -c -o src/rwpng.o src/rwpng.c
 src/color_delta.c: In function ‘color_distance’:
 src/color_delta.c:54: error: ‘for’ loop initial declaration used outside
 C99 mode
 src/color_delta.c: In function ‘color_delta_distance’:
 src/color_delta.c:62: error: ‘for’ loop initial declaration used outside
 C99 mode
 make: *** [src/color_delta.o] Error 1
 make: *** Waiting for unfinished jobs....
 src/optimize_state.c: In function ‘optimize_state_init’:
 src/optimize_state.c:39: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/optimize_state.c:59: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/optimize_state.c:66: error: redefinition of ‘filter’
 src/optimize_state.c:39: error: previous definition of ‘filter’ was here
 src/optimize_state.c:66: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/optimize_state.c:67: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/optimize_state.c:68: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/optimize_state.c:69: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/optimize_state.c: In function ‘optimize_state_destroy’:
 src/optimize_state.c:92: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/optimize_state.c: In function ‘optimize_state_run’:
 src/optimize_state.c:131: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/optimize_state.c:214: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/optimize_state.c: In function ‘optimize_state_row’:
 src/optimize_state.c:327: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/optimize_state.c:328: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/optimize_state.c: In function ‘diffuse_color_error’:
 src/optimize_state.c:397: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/pngloss_image.c: In function ‘optimize_with_stride’:
 src/pngloss_image.c:45: error: ‘for’ loop initial declaration used outside
 C99 mode
 src/pngloss_image.c: In function ‘optimize_with_rows’:
 src/pngloss_image.c:67: error: ‘for’ loop initial declaration used outside
 C99 mode
 src/pngloss_image.c:68: error: ‘for’ loop initial declaration used outside
 C99 mode
 src/pngloss_image.c:106: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/pngloss_image.c:108: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/pngloss_image.c:126: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/pngloss_image.c:127: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/pngloss.c: In function ‘pngloss_main_internal’:
 src/pngloss.c:173: error: ‘for’ loop initial declaration used outside C99
 mode
 src/optimize_state.c: In function ‘adaptive_filter_for_rows’:
 src/optimize_state.c:498: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/pngloss_image.c: In function ‘optimize_image’:
 src/pngloss_image.c:213: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/pngloss_image.c:317: error: ‘for’ loop initial declaration used
 outside C99 mode
 src/pngloss.c: In function ‘prepare_output_image’:
 src/pngloss.c:478: error: ‘for’ loop initial declaration used outside C99
 mode
 make: *** [src/optimize_state.o] Error 1
 src/rwpng.c: In function ‘rwpng_create_row_pointers’:
 src/rwpng.c:122: error: ‘for’ loop initial declaration used outside C99
 mode
 make: *** [src/pngloss_image.o] Error 1
 make: *** [src/pngloss.o] Error 1
 src/rwpng.c: In function ‘rwpng_write_end’:
 src/rwpng.c:491: error: ‘for’ loop initial declaration used outside C99
 mode
 src/rwpng.c: In function ‘rwpng_write_image24’:
 src/rwpng.c:560: error: ‘for’ loop initial declaration used outside C99
 mode
 src/rwpng.c:561: error: ‘for’ loop initial declaration used outside C99
 mode
 src/rwpng.c:583: error: ‘for’ loop initial declaration used outside C99
 mode
 src/rwpng.c:584: error: ‘for’ loop initial declaration used outside C99
 mode
 make: *** [src/rwpng.o] Error 1
 make: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/pngloss-1.0'
 Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/pngloss-1.0"
 && /usr/bin/make -j6 -w pngloss
 CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/compwrap/cc/usr/bin/gcc-4.2"
 CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/compwrap/cxx/usr/bin/g++-4.2"
 OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/compwrap/objc/usr/bin/gcc-4.2"
 OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/work/compwrap/objcxx/usr/bin/g++-4.2"
 INSTALL="/opt/x86_64/bin/ginstall -c"
 Exit code: 2
 Error: Failed to build pngloss: command execution failed
 Error: See
 /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pngloss/pngloss/main.log
 for details.
 Error: Follow https://guide.macports.org/#project.tickets if you believe
 there is a
 bug.
 Error: Processing of port pngloss failed
 }}}

 This is on 10.6.8 Rosetta (I am away from the PowerMac), but compiler is
 the same.

-- 
Ticket URL: <https://trac.macports.org/ticket/70456#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list