# New Ticket Created by Senaka Fernando
# Please include the string: [perl #53496]
# in the subject line of all future correspondence about this issue.
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=53496
Attaching patch No. 2 for C++ Build Issue.
I still need to resolve this bigint.c issue. This is something caused by the
GMP includes I suspect.
Regards,
Senaka
On Sun, Apr 13, 2008 at 8:43 PM, Senaka Fernando [EMAIL PROTECTED]
wrote:
The build of Parrot fails with g++, which is a possible indication that it
fails on other C++ compilers too. I have attached herewith patches to some
issues. However, I still get this error once I start with the build.
Compiling with:
xx.c
g++ -I./include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN
-pipe -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 -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 -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
-DHAS_GETTEXT -g -DHAS_JIT -DI386 -DHAVE_COMPUTED_GOTO -fPIC -I. -o xx.o -c
xx.c
src/pmc/bigint.c
/usr/include/libintl.h:83: error: expected unqualified-id before 'throw'
/usr/include/libintl.h:83: error: expected initializer before 'throw'
/usr/include/libintl.h:87: error: expected unqualified-id before 'throw'
/usr/include/libintl.h:87: error: expected initializer before 'throw'
make: *** [src/pmc/bigint.o] Error 1
This error didn't come up with a check out I took around two weeks back,
but with the latest svn up it does. Wondering what this could be.
Regards,
Senaka
Index: src/key.c
===
--- src/key.c (revision 26966)
+++ src/key.c (working copy)
@@ -445,7 +445,7 @@
key_next(PARROT_INTERP, ARGIN(const PMC *key))
{
return
-VTABLE_isa(interp, key, CONST_STRING(interp, Key)) key-pmc_ext ?
+VTABLE_isa(interp, (PMC *)key, CONST_STRING(interp, Key)) key-pmc_ext ?
(PMC *)PMC_data(key) :
NULL;
}
Index: compilers/imcc/imclexer.c
===
--- compilers/imcc/imclexer.c (revision 26966)
+++ compilers/imcc/imclexer.c (working copy)
@@ -5796,7 +5796,11 @@
/* whitespace can be safely ignored */
do {
+#ifdef __cplusplus
+c = yyinput(yyscanner);
+#else
c = input(yyscanner);
+#endif
} while (c == ' ' || c == '\t');
if (c != '(') {
Index: compilers/imcc/imcc.l
===
--- compilers/imcc/imcc.l (revision 26966)
+++ compilers/imcc/imcc.l (working copy)
@@ -1118,7 +1118,11 @@
/* whitespace can be safely ignored */
do {
+#ifdef __cplusplus
+c = yyinput(yyscanner);
+#else
c = input(yyscanner);
+#endif
} while (c == ' ' || c == '\t');
if (c != '(') {