Problem found when building multimedia/libdvdnav on FreeBSD 12.1-RELEASE-p1 r354992 GENERIC powerpc 32 bit, running on Apple Powerbook 17". # cd /usr/ports/multimedia/libdvdnav/ /usr/ports/multimedia/libdvdnav # make --DBATCH install clean ===> Building for libdvdnav-6.1.0 gmake[1]: Entering directory '/usr/ports/multimedia/libdvdnav/work/libdvdnav-6.1.0' gmake all-am gmake[2]: Entering directory '/usr/ports/multimedia/libdvdnav/work/libdvdnav-6.1.0' depbase=`echo src/vm/vm.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\ /bin/sh ./libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I./src -I./src/dvdnav -I/usr/local/include -D_THREAD_SAFE -I/usr/local/include -I/usr/local/include -D_THREAD_SAFE -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall -Wsign-compare -Wextra -MT src/vm/vm.lo -MD -MP -MF $depbase.Tpo -c -o src/vm/vm.lo src/vm/vm.c &&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: cc -DHAVE_CONFIG_H -I. -I./src -I./src/dvdnav -I/usr/local/include -D_THREAD_SAFE -I/usr/local/include -I/usr/local/include -D_THREAD_SAFE -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall -Wsign-compare -Wextra -MT src/vm/vm.lo -MD -MP -MF src/vm/.deps/vm.Tpo -c src/vm/vm.c -fPIC -DPIC -o src/vm/.libs/vm.o src/vm/vm.c: In function 'escaped_strcpy': src/vm/vm.c:178: error: 'for' loop initial declaration used outside C99 mode gmake[2]: *** [Makefile:631: src/vm/vm.lo] Error 1 gmake[2]: Leaving directory '/usr/ports/multimedia/libdvdnav/work/libdvdnav-6.1.0' gmake[1]: *** [Makefile:443: all] Error 2 gmake[1]: Leaving directory '/usr/ports/multimedia/libdvdnav/work/libdvdnav-6.1.0' ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make: stopped in /usr/ports/multimedia/libdvdnav
Same kind of error with multimedia/libdvdread /usr/ports/multimedia/libdvdread # make --DBATCH install clean ..... libtool: compile: cc -DHAVE_CONFIG_H -I. -I./src -I./src/dvdread -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall -Wsign-compare -Wextra -MT src/ifo_read.lo -MD -MP -MF src/.deps/ifo_read.Tpo -c src/ifo_read.c -fPIC -DPIC -o src/.libs/ifo_read.o src/ifo_read.c: In function 'makehexdump': src/ifo_read.c:56: error: 'for' loop initial declaration used outside C99 mode src/ifo_read.c: In function 'ifoOpenVMGI': src/ifo_read.c:417: error: 'for' loop initial declaration used outside C99 mode src/ifo_read.c: In function 'ifoOpenVTSI': src/ifo_read.c:453: error: 'for' loop initial declaration used outside C99 mode gmake[2]: *** [Makefile:575: src/ifo_read.lo] Error 1 gmake[2]: Leaving directory '/usr/ports/multimedia/libdvdread/work/libdvdread-6.1.0' gmake[1]: *** [Makefile:420: all] Error 2 gmake[1]: Leaving directory '/usr/ports/multimedia/libdvdread/work/libdvdread-6.1.0' ===> Compilation failed unexpectedly. It looks quite similar but I can open a dedicated PR if needed.
Hello Canardo, Thanks for your report. This should be fixed in r529816 : https://svnweb.freebsd.org/ports/head/multimedia/libdvdread/Makefile?r1=529240&r2=529816 Best regards, Ganael.
(In reply to Ganael LAPLANCHE from comment #2) There are two bugs in the ticket :o Problem with multimedia/libdvdread is now fixed, tanks to you. But multimedia/libdvdnav is still broken, same error as mentioned on top of this PR. Should I reopen it ?
A commit references this bug: Author: martymac Date: Sat Apr 4 11:09:09 UTC 2020 New revision: 530638 URL: https://svnweb.freebsd.org/changeset/ports/530638 Log: multimedia/libdvdnav: fix build on GCC architectures Error: src/vm/vm.c:178: error: 'for' loop initial declaration used outside C99 mode PR: 245131 Submitted by: canardo <canardo909@gmx.com> Changes: head/multimedia/libdvdnav/Makefile
(In reply to canardo from comment #3) Oops, sorry, I overlooked the bug report. This should *really* be fixed right now :) Best regards, Ganael.
A commit references this bug: Author: martymac Date: Tue Apr 7 12:05:10 UTC 2020 New revision: 530970 URL: https://svnweb.freebsd.org/changeset/ports/530970 Log: MFH: r530638 multimedia/libdvdnav: fix build on GCC architectures Error: src/vm/vm.c:178: error: 'for' loop initial declaration used outside C99 mode PR: 245131 Submitted by: canardo <canardo909@gmx.com> Approved by: portmgr (blanket) Changes: _U branches/2020Q2/ branches/2020Q2/multimedia/libdvdnav/Makefile