#1110: parrot fails to build with g++ 4.4.1 on Ubuntu 9.10 beta amd64
--------------------+-------------------------------------------------------
Reporter: mikehh | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: build | Version: trunk
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
--------------------+-------------------------------------------------------
I got an early build failure building parrot with g++ 4.4.1 on Ubuntu 9.10
beta (updated to latest from repos) - it builds with no problems using gcc
4.4.1 and builds with g++ 4.3 on Ubuntu 9.04 amd64.
It appears g++ 4.4 is much more strict than g++ 4.3
using the following config options:
perl Configure.pl --optimize --test --cc=g++ --cxx=g++ --link=g++ --ld=g++
--maintainer --configure_trace
with g++ 4.4 we get (at r41838 - Ubuntu 9.10 beta (updated) amd64)
The first few lines are: (the third line is line wrapped)
{{{
Compiling with:
xx.c
g++ -I./include -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -DDEBIAN -pipe
-fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-DHASATTRIBUTE_CONST
-DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NONNULL
-DHASATTRIBUTE_NORETURN
-DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED
-DHASATTRIBUTE_WARN_UNUSED_RESULT -falign-functions=16
-fvisibility=hidden -funit-at-a-time -maccumulate-outgoing-args -W -Wall
-Waggregate-return
-Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wdisabled-
optimization -Wendif-labels
-Wextra -Wformat -Wformat-extra-args -Wformat-nonliteral -Wformat-
security -Wformat-y2k
-Wimplicit -Wimport -Winit-self -Winline -Winvalid-pch -Wlogical-op
-Wmissing-braces
-Wmissing-field-initializers -Wno-missing-format-attribute -Wmissing-
include-dirs -Wpacked
-Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wno-shadow
-Wsign-compare
-Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default
-Wtrigraphs -Wundef
-Wunknown-pragmas -Wno-unused -Wvariadic-macros -Wwrite-strings -Wlarger-
than-4096
-DDISABLE_GC_DEBUG=1 -DNDEBUG -O2 -g -DHAS_GETTEXT -DHAVE_COMPUTED_GOTO
-DCLOCK_BEST=CLOCK_PROCESS_CPUTIME_ID -fPIC -I. -o xx.o -c xx.c
/usr/local/bin/perl tools/build/vtable_extend.pl
/usr/local/bin/perl tools/build/pbcversion_h.pl >
include/parrot/pbcversion.h
...
... all /usr/bin/perl tools/build ...
...
/usr/local/bin/perl tools/build/c2str.pl --all
src/string/api.c
In file included from src/string/api.c:29:
src/string/private_cstring.h:20: warning: size of ‘parrot_cstrings’ is
19856 bytes
src/string/api.c: In function ‘STRING*
Parrot_str_unescape(parrot_interp_t*, const char*, char, const char*)’:
src/string/api.c:2801: error: invalid conversion from ‘const char*’ to
‘char*’
make: *** [src/string/api.o] Error 1
}}}
the relevant lines from src/string.api.c are:
starting at line 2774 - the last line is where it fails (2801) p =
strchr(enc_char, ':'); although I think the problem is the if just above
-> enc_char = "ascii";
{{{
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
STRING *
Parrot_str_unescape(PARROT_INTERP,
ARGIN(const char *cstring), char delimiter, ARGIN_NULLOK(const char
*enc_char))
{
ASSERT_ARGS(Parrot_str_unescape)
size_t clength = strlen(cstring);
Parrot_UInt4 r;
String_iter iter;
STRING *result;
const ENCODING *encoding;
const CHARSET *charset;
char *p;
UINTVAL offs, d;
/* we are constructing const table strings here */
const UINTVAL flags = PObj_constant_FLAG;
if (delimiter && clength)
--clength;
/* default is ascii */
if (!enc_char)
enc_char = "ascii";
/* check for encoding: */
p = strchr(enc_char, ':');
}}}
with g++ 4.3 the above section is (at r41808 - Ubuntu 9.04 amd64):
The first few lines are: (the third line is line wrapped)
{{{
Compiling with:
xx.c
g++ -I./include -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -pipe -fstack-
protector -I/usr/local/include
-DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC
-DHASATTRIBUTE_NONNULL
-DHASATTRIBUTE_NORETURN -DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED
-DHASATTRIBUTE_WARN_UNUSED_RESULT
-falign-functions=16 -fvisibility=hidden -funit-at-a-time -maccumulate-
outgoing-args -W -Wall
-Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment
-Wdisabled-optimization
-Wendif-labels -Wextra -Wformat -Wformat-extra-args -Wformat-nonliteral
-Wformat-security
-Wformat-y2k -Wimplicit -Wimport -Winit-self -Winline -Winvalid-pch
-Wlogical-op -Wmissing-braces
-Wmissing-field-initializers -Wno-missing-format-attribute -Wmissing-
include-dirs -Wpacked
-Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wno-shadow
-Wsign-compare
-Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default
-Wtrigraphs -Wundef
-Wunknown-pragmas -Wno-unused -Wvariadic-macros -Wwrite-strings -Wlarger-
than-4096
-DDISABLE_GC_DEBUG=1 -DNDEBUG -O2 -g -DHAS_GETTEXT -DHAVE_COMPUTED_GOTO
-DCLOCK_BEST=CLOCK_PROCESS_CPUTIME_ID -fPIC -I. -o xx.o -c xx.c
/usr/local/bin/perl tools/build/vtable_extend.pl
/usr/local/bin/perl tools/build/pbcversion_h.pl >
include/parrot/pbcversion.h
...
... all /usr/bin/perl tools/build ...
...
/usr/local/bin/perl tools/build/c2str.pl --all
src/string/api.c
In file included from src/string/api.c:29:
src/string/private_cstring.h:20: warning: size of ‘parrot_cstrings’ is
19632 bytes
src/ops/core_ops.c
...
... continues to a sucessfull build
...
Linked: parrot_nqp
}}}
Notes:
perl is 5.10.1 in both cases but I built perl from origin/Maint-5.10 on
Ubuntu 9.10 beta amd64 whereas I built from tags/Perl-5.10.1 on Ubuntu
9.04 amd64 - I might have got a couple of options different in sh
Configure
src/string/api.c was last modified at r41543
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1110>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets