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 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 2.4 and Perl 5.6.1. I have installed the latest versions of the following C library dependencies:

zlib-1.2.1, libpng version 1.2.7, libgd version 2.0.33, jpeg-6b, freetype version 1.3.1

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 error:

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.

Barry
-------------------------------------------------------------------------------------------------------------- bmoore@westwater:~/GD-2.16$ su root
Password:
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 www.cpan.org 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 may
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 qd.pl blib/lib/qd.pl
cp GD.pm blib/lib/GD.pm
AutoSplitting blib/lib/GD.pm (blib/lib/auto/GD)
cp GD/Polyline.pm blib/lib/GD/Polyline.pm
/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
westwater:/home/bmoore/GD-2.16#

In reply to Trouble Installing GD by barvin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.