Click here to get back home

GD.c: 533: error: syntax error before "void"

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
GD.c: 533: error: syntax error before "void" Ken Rich 03-24-2006
Posted by Ken Rich on March 24, 2006, 10:15 am
Please log in for more thread options


Trying to build the GD module. Any clues appreciated.
I've rebuilt prerequisite libs.
I've added local -I -R params to Makefile.PL and to gcc command line.
I've removed random params from gcc command line. :-)
The error messages remain exactly the same.

I have not tried Sun C, I'd have to recompile a lot of stuff.
I have not tried a more recent version of Perl, the owner of the box
would nix installing that, though maybe I can pirate cycles on someone
else's box.


Build step and output:

gcc \
-c \
-I/usr/ucc/src/working/gd-2.0.33/Dist/include \
-I/usr/local/include \
-I/usr/ucc/src/working/GD-2.32 \
-fno-strict-aliasing \
-I/usr/local/include \
-D_LARGEFILE_SOURCE \
-D_FILE_OFFSET_BITS=64 \
-O \
-DVERSION=\"2.32\" \
-DXS_VERSION=\"2.32\" \
-fPIC \
-I/usr/ucc/lib/perl5/5.6.1/sun4-solaris/CORE \
-DHAVE_JPEG \
-DHAVE_FT \
-DHAVE_XPM \
-DHAVE_GIF \
-DHAVE_PNG \
-DHAVE_ANIMGIF \
-DVERSION_33 \
-DHAVE_UNCLOSEDPOLY \
-DHAVE_FTCIRCLE \
GD.c

GD.c:533: error: syntax error before "void"
GD.xs: In function `XS_GD__Image_trueColor':
GD.xs:545: error: `dMY_CXT' undeclared (first use in this function)
GD.xs:545: error: (Each undeclared identifier is reported only once
GD.xs:545: error: for each function it appears in.)
GD.xs:549: error: `MY_CXT' undeclared (first use in this function)
GD.xs: In function `XS_GD__Image__new':
GD.xs:564: error: `dMY_CXT' undeclared (first use in this function)
GD.xs:565: error: `MY_CXT' undeclared (first use in this function)
...and a bunch more like that...


Set-up:

Sun V880
solaris 8
perl v5.6.1
GD-2.32
GD-2.31 tried too.

No Sun compiler, but I am considering installing one and
going back and compiling perl and libs and EVERYthing using Sun C.


Web ref:

Found:
http://rt.cpan.org/Public/Bug/Display.html?id=18098
But the reply to the message doesn't make sense to me.

---ubotboyva

Posted by Sisyphus on March 24, 2006, 5:07 pm
Please log in for more thread options


Hmmm ... I replied to this and it went to c.l.p.misc - because that's where
the followups were set to go. Not sure that's what the OP intended so I'll
post another copy here.

.
.
> GD.c
>
> GD.c:533: error: syntax error before "void"
> GD.xs: In function `XS_GD__Image_trueColor':
> GD.xs:545: error: `dMY_CXT' undeclared (first use in this function)
> GD.xs:545: error: (Each undeclared identifier is reported only once
> GD.xs:545: error: for each function it appears in.)
> GD.xs:549: error: `MY_CXT' undeclared (first use in this function)
> GD.xs: In function `XS_GD__Image__new':
> GD.xs:564: error: `dMY_CXT' undeclared (first use in this function)
> GD.xs:565: error: `MY_CXT' undeclared (first use in this function)
> ...and a bunch more like that...
>
>
> Set-up:
>
> Sun V880
> solaris 8
> perl v5.6.1
> GD-2.32
> GD-2.31 tried too.
>
> No Sun compiler, but I am considering installing one and
> going back and compiling perl and libs and EVERYthing using Sun C.
>

Try GD-2.30. It doesn't use those (perl) macros - which are defined in
perl.h on perl 5.8, but apparently missing in perl 5.6.

I'm not sure when they first appeared - probably with 5.8.0. Imho if the
author wants to write code that works only on perl 5.8, he should make that
fact clear - eg by placing code in the Makefile.PL that dies with an
appropriate error message if 5.6 or earlier is used.

Or update to perl 5.8 :-)

Cheers,
Rob




Posted by Ken Rich on March 28, 2006, 10:40 am
Please log in for more thread options


I wrote:
: > GD.c
: >
: > GD.c:533: error: syntax error before "void"
: > GD.xs: In function `XS_GD__Image_trueColor':
: > GD.xs:545: error: `dMY_CXT' undeclared (first use in this function)

Rob Sysiphus wrote:
: Try GD-2.30. It doesn't use those (perl) macros - which are defined in
: perl.h on perl 5.8, but apparently missing in perl 5.6.
:
: I'm not sure when they first appeared - probably with 5.8.0. Imho if the
: author wants to write code that works only on perl 5.8, he should make that
: fact clear - eg by placing code in the Makefile.PL that dies with an
: appropriate error message if 5.6 or earlier is used.
:
: Or update to perl 5.8 :-)
:
: Cheers,
: Rob

Thanks. It worked.

--
-ken rich "art may imitate life but life
         imitates t.v." --ani difranco kenneth.rich(at)rochester.edu


Similar ThreadsPosted
Syntax error using cpan leads to bizarre behavior September 10, 2004, 6:32 pm
Error: RCPT TO: error (550 relay not permitted) February 11, 2006, 1:39 pm
Error while using LWP December 1, 2005, 8:06 am
Have I an error in my POD? December 21, 2005, 6:35 pm
Deparse error July 7, 2004, 2:52 am
Out of Memory error September 12, 2004, 11:51 pm
expat error May 26, 2005, 9:01 pm
Error Installing XML::DOM October 15, 2004, 9:16 am
error with CPAN.pm October 19, 2004, 7:13 am
Error reporting in CGI May 19, 2005, 9:41 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap