Opened 6 months ago
Last modified 6 months ago
#73852 new defect
p5.28-unicode-utf8 fails on 10.5 for compiler standard
| Reported by: | rmottola (Riccardo) | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | |
| Keywords: | leopard | Cc: | |
| Port: | p5.28-unicode-utf8 |
Description
/usr/bin/gcc-4.2 -c -fno-common -DPERL_DARWIN -pipe -Os -fno-strict-aliasing -fstack-protector -I/opt/local/include -D_FORTIFY_SOURCE=2 -DPERL_USE_SAFE_PUTENV -arch x86_64 -isysroot/ -O3 -DVERSION=\"0.70\" -DXS_VERSION=\"0.70\" "-I/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE" UTF8.c In file included from UTF8.xs:8: utf8_dfa32.h: In function âutf8_dfa_runâ: utf8_dfa32.h:368: error: âforâ loop initial declaration used outside C99 mode utf8_dfa32.h: In function âutf8_dfa_run16â: utf8_dfa32.h:376: error: âforâ loop initial declaration used outside C99 mode
Change History (4)
comment:1 follow-up: 3 Changed 6 months ago by rmottola (Riccardo)
comment:2 follow-up: 4 Changed 6 months ago by rmottola (Riccardo)
I tried forcing MP ggc 4.8 (here on intel it works, on PPC not for other bugs)
sudo port -v upgrade p5.28-unicode-utf8 p5.30-unicode-utf8 p5.34-unicode-utf8 configure.compiler=macports-gcc-4.8
but it still tries to build with gcc 4.2 as the error shows:
"/opt/local/bin/perl5.28" -MExtUtils::Command::MM -e 'cp_nonempty' -- UTF8.bs blib/arch/auto/Unicode/UTF8/UTF8.bs 644 mv UTF8.xsc UTF8.c /usr/bin/gcc-4.2 -c -fno-common -DPERL_DARWIN -pipe -Os -fno-strict-aliasing -fstack-protector -I/opt/local/include -D_FORTIFY_SOURCE=2 -DPERL_USE_SAFE_PUTENV -arch x86_64 -isysroot/ -O3 -DVERSION=\"0.70\" -DXS_VERSION=\"0.70\" "-I/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE" UTF8.c In file included from UTF8.xs:8: utf8_dfa32.h: In function âutf8_dfa_runâ: utf8_dfa32.h:368: error: âforâ loop initial declaration used outside C99 mode utf8_dfa32.h: In function âutf8_dfa_run16â: utf8_dfa32.h:376: error: âforâ loop initial declaration used outside C99 mode In file included from UTF8.xs:9: utf8_valid.h: In function âutf8_maximal_subpartâ: utf8_valid.h:54: error: âforâ loop initial declaration used outside C99 mode utf8_valid.h: In function âutf8_maximal_prefixâ: utf8_valid.h:71: error: âforâ loop initial declaration used outside C99 mode make: *** [UTF8.o] Error 1 make: Leaving directory `/opt/local/var/macports/build/p5.28-unicode-utf8-7e10885f/work/Unicode-UTF8-0.70'
comment:3 Changed 6 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to rmottola:
The port already contains
compiler.c_standard 1999why isn't it passed to gcc-4.2 ? IIRC it needs to enable
-std=c99on old gcc .4x series, shouldn't it?
compiler.c_standard instructs MacPorts to select a C compiler that supports that standard. It does not guarantee that that compiler defaults to that standard, nor does it attempt to set any -std= flag; it's up to the build system or the Portfile to do that.
comment:4 Changed 6 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to rmottola:
I tried forcing MP ggc 4.8 (here on intel it works, on PPC not for other bugs)
sudo port -v upgrade p5.28-unicode-utf8 p5.30-unicode-utf8 p5.34-unicode-utf8 configure.compiler=macports-gcc-4.8but it still tries to build with gcc 4.2 as the error shows:
Without seeing the build log I can't answer this one, but perl is broken by design in that it insists on using the compiler that perl was built with to build all perl modules. I thought we were trying to work around that in the perl5 portgroup but maybe it is not working generally or not working just for this port.

The port already contains
why isn't it passed to gcc-4.2 ? IIRC it needs to enable
-std=c99on old gcc .4x series, shouldn't it?