Subject: | Compilation failure on some systems |
On some of my smokers I see compilation failures like this:
cc -I/usr/lib/arm-linux-gnueabihf/perl/5.20/CORE -DVERSION="0.03" -DXS_VERSION="0.03" -fPIC -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -o lib/Syntax/Keyword/Try.o lib/Syntax/Keyword/Try.c
lib/Syntax/Keyword/Try.xs: In function ârethread_opâ:
lib/Syntax/Keyword/Try.xs:143:5: error: âforâ loop initial declarations are only allowed in C99 or C11 mode
for(OP *kid = cUNOPx(op)->op_first; kid; kid = OpSIBLING(kid))
^
lib/Syntax/Keyword/Try.xs:143:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
lib/Syntax/Keyword/Try.xs: In function âMY_walk_optree_try_in_evalâ:
lib/Syntax/Keyword/Try.xs:185:13: error: redeclaration of âkidâ with no linkage
for(OP *kid = cUNOPx(op)->op_first; kid; kid = next) {
^
lib/Syntax/Keyword/Try.xs:184:9: note: previous declaration of âkidâ was here
OP *kid, *next, *prev = NULL;
^
lib/Syntax/Keyword/Try.xs:185:5: error: âforâ loop initial declarations are only allowed in C99 or C11 mode
for(OP *kid = cUNOPx(op)->op_first; kid; kid = next) {
^
error building lib/Syntax/Keyword/Try.o from 'lib/Syntax/Keyword/Try.c' at /usr/share/perl/5.20/ExtUtils/CBuilder/Base.pm line 175.
This happens on linux systems (with Debian/jessie and Debian/wheezy, standard C compiler) and freebsd 9 systems. Compilation is successful on my freebsd 10 system and on Mac OS X (10.11).