Opened 6 weeks ago
Last modified 12 days ago
#70456 assigned defect
pngloss: error: ‘for’ loop initial declaration used outside C99 mode
Reported by: | barracuda156 | Owned by: | herbygillot (Herby Gillot) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.9.3 |
Keywords: | tiger, leopard, snowleopard | Cc: | |
Port: | pngloss |
Description
The build needs -std=c99
:
---> 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 all 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="/usr/bin/install -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 -O3 -Wall -Wextra -I/usr/local/include -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 -O3 -Wall -Wextra -I/usr/local/include -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 -O3 -Wall -Wextra -I/usr/local/include -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 -O3 -Wall -Wextra -I/usr/local/include -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 -O3 -Wall -Wextra -I/usr/local/include -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 -O3 -Wall -Wextra -I/usr/local/include -I/opt/local/include -c -o src/rwpng.o src/rwpng.c 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/optimize_state.c: In function ‘adaptive_filter_for_rows’: src/optimize_state.c:498: error: ‘for’ loop initial declaration used outside C99 mode make: *** [src/optimize_state.o] Error 1 make: *** Waiting for unfinished jobs.... 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 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_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 make: *** [src/pngloss_image.o] Error 1 src/pngloss.c: In function ‘pngloss_main_internal’: src/pngloss.c:173: 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/pngloss.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 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
However it does not respect MacPorts flags, and neither configure.cflags
nor build.env CFLAGS
has an effect.
Change History (4)
comment:1 Changed 13 days ago by herbygillot (Herby Gillot)
comment:2 follow-ups: 3 4 Changed 12 days ago by herbygillot (Herby Gillot)
This can be verified to see whether that last commit has fixed the issue.
comment:3 Changed 12 days ago by barracuda156
Replying to herbygillot:
This can be verified to see whether that last commit has fixed the issue.
Thank you, I will try it.
comment:4 Changed 12 days ago by barracuda156
Replying to 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.
Note: See
TracTickets for help on using
tickets.
In 3f6f65ad24d0b4b06d7af195e67edbe22e20e87f/macports-ports (master):