#66644 closed defect (fixed)

bzip3 does not build with gcc-4.2 on 10.6.8: error: ‘for’ loop initial declaration used outside C99 mode

Reported by: barracuda156 Owned by: sech1p
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: snowleopard, leopard Cc:
Port: bzip3

Description

src/main.c: In function ‘process’:
src/main.c:278: error: ‘for’ loop initial declaration used outside C99 mode
src/main.c:304: error: ‘for’ loop initial declaration used outside C99 mode
src/main.c:310: error: redefinition of ‘j’
src/main.c:304: error: previous definition of ‘j’ was here
src/main.c:310: error: ‘for’ loop initial declaration used outside C99 mode
src/main.c:332: error: ‘for’ loop initial declaration used outside C99 mode
src/main.c:338: error: redefinition of ‘j’
src/main.c:332: error: previous definition of ‘j’ was here
src/main.c:338: error: ‘for’ loop initial declaration used outside C99 mode
src/main.c:356: error: ‘for’ loop initial declaration used outside C99 mode
src/main.c:365: error: redefinition of ‘i’
src/main.c:278: error: previous definition of ‘i’ was here
src/main.c:365: error: ‘for’ loop initial declaration used outside C99 mode
make[1]: *** [src/bzip3-main.o] Error 1
make[1]: *** Waiting for unfinished jobs....
libtool: compile:  /usr/bin/gcc-4.2 -DPACKAGE_NAME=\"bzip3\" -DPACKAGE_TARNAME=\"bzip3\" -DPACKAGE_VERSION=\"1.2.1\" "-DPACKAGE_STRING=\"bzip3 1.2.1\"" -DPACKAGE_BUGREPORT=\"https://github.com/kspalaiologos/bzip3\" -DPACKAGE_URL=\"\" -DPACKAGE=\"bzip3\" -DVERSION=\"1.2.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_GETOPT_H=1 -DHAVE_GETOPT_LONG=1 -Drestrict=__restrict -DHAVE_PTHREAD_PRIO_INHERIT=1 -I. -I/opt/local/include -I./include -pipe -Os -arch ppc -pthread -DPTHREAD -MT src/libbz3.lo -MD -MP -MF src/.deps/libbz3.Tpo -c src/libbz3.c  -fno-common -DPIC -o src/.libs/libbz3.o
src/libbz3.c: In function ‘lzp_encode_block’:
src/libbz3.c:92: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c: In function ‘lzp_decode_block’:
src/libbz3.c:163: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c: In function ‘mrlec’:
src/libbz3.c:235: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c:237: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c: In function ‘mrled’:
src/libbz3.c:267: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c:269: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c: In function ‘begin’:
src/libbz3.c:305: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c:306: error: redefinition of ‘i’
src/libbz3.c:305: error: previous definition of ‘i’ was here
src/libbz3.c:306: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c:307: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c:308: error: redefinition of ‘i’
src/libbz3.c:306: error: previous definition of ‘i’ was here
src/libbz3.c:308: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c:309: error: redefinition of ‘j’
src/libbz3.c:307: error: previous definition of ‘j’ was here
src/libbz3.c:309: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c:310: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c: In function ‘encode_bytes’:
src/libbz3.c:317: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c: In function ‘decode_bytes’:
src/libbz3.c:396: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c: In function ‘bz3_encode_blocks’:
src/libbz3.c:755: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c:761: error: redefinition of ‘i’
src/libbz3.c:755: error: previous definition of ‘i’ was here
src/libbz3.c:761: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c:762: error: redefinition of ‘i’
src/libbz3.c:761: error: previous definition of ‘i’ was here
src/libbz3.c:762: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c: In function ‘bz3_decode_blocks’:
src/libbz3.c:768: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c:775: error: redefinition of ‘i’
src/libbz3.c:768: error: previous definition of ‘i’ was here
src/libbz3.c:775: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c: In function ‘bz3_compress’:
src/libbz3.c:817: error: ‘for’ loop initial declaration used outside C99 mode
src/libbz3.c: In function ‘bz3_decompress’:
src/libbz3.c:861: error: ‘for’ loop initial declaration used outside C99 mode
make[1]: *** [src/libbz3.lo] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_bzip3/bzip3/work/bzip3-1.2.1'
make: *** [all] Error 2

Change History (1)

comment:1 Changed 22 months ago by barracuda156

Resolution: fixed
Status: assignedclosed

In eb54b4be104dea689277a1c2e9010adadabfecd6/macports-ports (master):

bzip3: do not use Apple compilers on <10.7, unbreak the build
Fixes: #66644

Note: See TracTickets for help on using tickets.