Trouble installing GD

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm trying to install the perl GD 2.16 library and make is failing.  I
have tried all of the suggestions in Linclon's README (except I
haven't reinstalled perl).  This does not appear to be a problem with
libgd version (I get the same error trying to install GD-1.19 which
doens't depend on external libraries) or dynamic linking.  The error I
get is about a syntax error in syntax error in /usr/include/stdlib.h.
I've successfully installed GD on other systems - linux and windows -
often with difficulty and I haven't seen this particular type of error
before.  I've googled various parts of the error message and searched
and read perlmonks, comp.lang.perl.modules, the debian list etc.  No
similar errors out there that I can find.

I'm installing on an Intel box running Debian GNU/Linux 3.0 and Perl
5.6.1.  I have installed the latest versions of the following C
library dependencies:

libpng version 1.2.7
libgd version 2.0.33
freetype version 1.3.1

My system doesn't have rpm.  I tried apt-get install GD, but it
couldn't find GD (I probably need to set up apt-get).  I tried CPAN
shell and manual installation from source.  The last two attempts give
me the same error.  I installed all the above dependencies in the
order listed manually and and they all installed fine with no errors
and those that had tests past them.  I su to root, move to the GD-2.16
directory and  run perl Makefile.PL.  I then run make and get the

In file included from /usr/lib/perl/5.6.1/CORE/perl.h:493,
                 from GD.xs:5:
/usr/include/stdlib.h:158: syntax error before `long'
make: *** [GD.o] Error 1

I tried installing GD-1.19 just to get something going, but I get the
same error.

The comlete output from the perl Makefile.PL and make commands are
listed below.  Any suggestions?  Thanks.



bmoore@westwater:~/GD-2.16$ su root
westwater:/home/bmoore/GD-2.16# perl Makefile.PL
NOTICE: This module requires libgd 2.0.12 or higher.
        it will NOT work with earlier versions.
        See for versions of GD that are compatible
        with earlier versions of libgd.

        If you are using Math::Trig 1.01 or lower, it has a bug that
        causes a "prerequisite not found" warning to be issued.  You
        safely ignore this warning.

        Type perl Makefile.PL -h for command-line option summary

Configuring for libgd version 2.0.33.
Included Features:          GD_XPM GD_PNG GD_GIF
GD library used from:       /usr/local

If you experience compile problems, please check the @INC, @LIBPATH
and @LIBS
arrays defined in Makefile.PL and manually adjust, if necessary.

Checking if your kit is complete...
Looks good
Writing Makefile for GD
westwater:/home/bmoore/GD-2.16# make
cp blib/lib/
cp blib/lib/
AutoSplitting blib/lib/ (blib/lib/auto/GD)
cp GD/ blib/lib/GD/
/usr/bin/perl /usr/share/perl/5.6.1/ExtUtils/xsubpp  -typemap
/usr/share/perl/5.6.1/ExtUtils/typemap -typemap typemap  GD.xs >
GD.xsc && mv GD.xsc GD.c
cc -c  -I/usr/local/include -DDEBIAN -fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2  
-DVERSION=\"2.16\" -DXS_VERSION=\"2.16\" -fPIC
"-I/usr/lib/perl/5.6.1/CORE"  -DHAVE_XPM -DHAVE_GIF GD.c
In file included from /usr/lib/perl/5.6.1/CORE/perl.h:493,
                 from GD.xs:5:
/usr/include/stdlib.h:158: syntax error before `long'
make: *** [GD.o] Error 1

Re: Trouble installing GD

Barry wrote:

> In file included from /usr/lib/perl/5.6.1/CORE/perl.h:493,
>                  from GD.xs:5:
> /usr/include/stdlib.h:158: syntax error before `long'
> make: *** [GD.o] Error 1

It always puzzles me when I see syntax errors pertaining to files that
you know can't *possibly* contain any such error.

I did see a post once, in relation to a different module, (and probably
a different OS and different header file) suggesting that this  happened
because the file was being included more than once, and the solution was
to ensure that it got included *once* only. The OP replied something
along the lines of "yeah, that was the problem - problem fixed" .... but
I still feel none the wiser.

If you can make sense of that, and it helps, then that's great !!

Otherwise .... hope someone else can chip in :-)


To reply by email u have to take out the u in kalinaubears.

Site Timeline