[MacPorts] #63231: mpg123 @1.28.0: /audio.c:352: error: ‘for’ loop initial declaration used outside C99 mode
MacPorts
noreply at macports.org
Thu Jul 8 05:46:17 UTC 2021
#63231: mpg123 @1.28.0: /audio.c:352: error: ‘for’ loop initial declaration used
outside C99 mode
---------------------------------------+--------------------
Reporter: kencu | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: tiger leopard snowleopard | Port: mpg123
---------------------------------------+--------------------
On older systems that default to gcc-4.2, this port fails:
{{{
:info:build Executing: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_mpg123/mpg123/work/mpg123-1.28.0"
&& /usr/bin/make -j8 -w all
:debug:build system: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_mpg123/mpg123/work/mpg123-1.28.0"
&& /usr/bin/make -j8 -w all
:info:build make: Entering directory
`/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_mpg123/mpg123/work/mpg123-1.28.0'
:info:build depbase=`echo src/audio.o | sed
's|[^/]*$|.deps/&|;s|\.o$||'`;\
:info:build /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I./src
-DPKGLIBDIR="\"/opt/local/lib/mpg123\"" -I./src -I./src/compat
-I./src/libmpg123 -I./src/libout123 -I./src/libmpg123 -I./src/libsyn123
-I./src/libout123 -DOPT_I586 -DREAL_IS_FLOAT -DNEWOLD_WRITE_SAMPLE
-I/opt/local/include -O2 -fomit-frame-pointer -funroll-all-loops
-finline-functions -ffast-math -pipe -Os -arch i386 -MT src/audio.o -MD
-MP -MF $depbase.Tpo -c -o src/audio.o src/audio.c &&\
:info:build mv -f $depbase.Tpo $depbase.Po
:info:build depbase=`echo src/common.o | sed
's|[^/]*$|.deps/&|;s|\.o$||'`;\
:info:build /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I./src
-DPKGLIBDIR="\"/opt/local/lib/mpg123\"" -I./src -I./src/compat
-I./src/libmpg123 -I./src/libout123 -I./src/libmpg123 -I./src/libsyn123
-I./src/libout123 -DOPT_I586 -DREAL_IS_FLOAT -DNEWOLD_WRITE_SAMPLE
-I/opt/local/include -O2 -fomit-frame-pointer -funroll-all-loops
-finline-functions -ffast-math -pipe -Os -arch i386 -MT src/common.o -MD
-MP -MF $depbase.Tpo -c -o src/common.o src/common.c &&\
:info:build mv -f $depbase.Tpo $depbase.Po
:info:build depbase=`echo src/sysutil.o | sed
's|[^/]*$|.deps/&|;s|\.o$||'`;\
:info:build /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I./src
-DPKGLIBDIR="\"/opt/local/lib/mpg123\"" -I./src -I./src/compat
-I./src/libmpg123 -I./src/libout123 -I./src/libmpg123 -I./src/libsyn123
-I./src/libout123 -DOPT_I586 -DREAL_IS_FLOAT -DNEWOLD_WRITE_SAMPLE
-I/opt/local/include -O2 -fomit-frame-pointer -funroll-all-loops
-finline-functions -ffast-math -pipe -Os -arch i386 -MT src/sysutil.o -MD
-MP -MF $depbase.Tpo -c -o src/sysutil.o src/sysutil.c &&\
:info:build mv -f $depbase.Tpo $depbase.Po
:info:build depbase=`echo src/control_generic.o | sed
's|[^/]*$|.deps/&|;s|\.o$||'`;\
:info:build /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I./src
-DPKGLIBDIR="\"/opt/local/lib/mpg123\"" -I./src -I./src/compat
-I./src/libmpg123 -I./src/libout123 -I./src/libmpg123 -I./src/libsyn123
-I./src/libout123 -DOPT_I586 -DREAL_IS_FLOAT -DNEWOLD_WRITE_SAMPLE
-I/opt/local/include -O2 -fomit-frame-pointer -funroll-all-loops
-finline-functions -ffast-math -pipe -Os -arch i386 -MT
src/control_generic.o -MD -MP -MF $depbase.Tpo -c -o src/control_generic.o
src/control_generic.c &&\
:info:build mv -f $depbase.Tpo $depbase.Po
:info:build depbase=`echo src/equalizer.o | sed
's|[^/]*$|.deps/&|;s|\.o$||'`;\
:info:build /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I./src
-DPKGLIBDIR="\"/opt/local/lib/mpg123\"" -I./src -I./src/compat
-I./src/libmpg123 -I./src/libout123 -I./src/libmpg123 -I./src/libsyn123
-I./src/libout123 -DOPT_I586 -DREAL_IS_FLOAT -DNEWOLD_WRITE_SAMPLE
-I/opt/local/include -O2 -fomit-frame-pointer -funroll-all-loops
-finline-functions -ffast-math -pipe -Os -arch i386 -MT src/equalizer.o
-MD -MP -MF $depbase.Tpo -c -o src/equalizer.o src/equalizer.c &&\
:info:build mv -f $depbase.Tpo $depbase.Po
:info:build depbase=`echo src/getlopt.o | sed
's|[^/]*$|.deps/&|;s|\.o$||'`;\
:info:build /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I./src
-DPKGLIBDIR="\"/opt/local/lib/mpg123\"" -I./src -I./src/compat
-I./src/libmpg123 -I./src/libout123 -I./src/libmpg123 -I./src/libsyn123
-I./src/libout123 -DOPT_I586 -DREAL_IS_FLOAT -DNEWOLD_WRITE_SAMPLE
-I/opt/local/include -O2 -fomit-frame-pointer -funroll-all-loops
-finline-functions -ffast-math -pipe -Os -arch i386 -MT src/getlopt.o -MD
-MP -MF $depbase.Tpo -c -o src/getlopt.o src/getlopt.c &&\
:info:build mv -f $depbase.Tpo $depbase.Po
:info:build depbase=`echo src/httpget.o | sed
's|[^/]*$|.deps/&|;s|\.o$||'`;\
:info:build /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I./src
-DPKGLIBDIR="\"/opt/local/lib/mpg123\"" -I./src -I./src/compat
-I./src/libmpg123 -I./src/libout123 -I./src/libmpg123 -I./src/libsyn123
-I./src/libout123 -DOPT_I586 -DREAL_IS_FLOAT -DNEWOLD_WRITE_SAMPLE
-I/opt/local/include -O2 -fomit-frame-pointer -funroll-all-loops
-finline-functions -ffast-math -pipe -Os -arch i386 -MT src/httpget.o -MD
-MP -MF $depbase.Tpo -c -o src/httpget.o src/httpget.c &&\
:info:build mv -f $depbase.Tpo $depbase.Po
:info:build depbase=`echo src/resolver.o | sed
's|[^/]*$|.deps/&|;s|\.o$||'`;\
:info:build /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I./src
-DPKGLIBDIR="\"/opt/local/lib/mpg123\"" -I./src -I./src/compat
-I./src/libmpg123 -I./src/libout123 -I./src/libmpg123 -I./src/libsyn123
-I./src/libout123 -DOPT_I586 -DREAL_IS_FLOAT -DNEWOLD_WRITE_SAMPLE
-I/opt/local/include -O2 -fomit-frame-pointer -funroll-all-loops
-finline-functions -ffast-math -pipe -Os -arch i386 -MT src/resolver.o
-MD -MP -MF $depbase.Tpo -c -o src/resolver.o src/resolver.c &&\
:info:build mv -f $depbase.Tpo $depbase.Po
:info:build src/audio.c: In function ‘match_enc’:
:info:build src/audio.c:352: error: ‘for’ loop initial declaration used
outside C99 mode
:info:build src/audio.c: In function ‘audio_capabilities’:
:info:build src/audio.c:478: error: ‘for’ loop initial declaration used
outside C99 mode
}}}
setting the c standard in the Portfile with
{{{
configure.cflags-append -std=c99
}}}
fixes the build
--
Ticket URL: <https://trac.macports.org/ticket/63231>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list