Subject: Re: Installing GD module (Perl ) under cygwin
From: "Soren Andersen" <[email-masked]>
To: "sameer nandoliya" <[email-masked]>
Cc: [email-masked]
Date: Thu, 20 Jun 2002 13:32:58 +0000

On Wed, 19 Jun 2002 17:42:47 +0000, "sameer nandoliya"
<[email-masked]> said:
>
> HI, I have cygwin installed on Win 98. I have to install GD module
> for perl so that I can create graphs. I tried following commands.
> perl -MCPAN -e shell install GD
>
> while making it gives error - GD.xs didn't find gd.h
>
> Even if try to install it manually after downloading the gd module, i
> m getting same error.
>
> This is very important for mr to solve.

If it is very important for you to solve, then you should probably
begin by *helping yourself* as opposed to begging help from others, by
Reading The Fundamental Documentation. Have you bothered to READ the
module documentation for GD.pm, visit the Homepage for GD maintained by
its author Lincoln Stein, etc? You are it appears not in full
possession of the facts about GD.pm and are expecting somebody to
magically create it for you. Also your qustion may not receive any
answer on the Cygwin List because it *isn't [as stated] relevent to
Cygwin*.

Reading the basic README documentation with GD.pm will reveal the fact
that GD.pm prerequires the installation of (depends on) 'gd', the
graphics manipulation library authored by Thomas Boutell. You haven't
mentioned 'gd' and from what you have written it appears that you do
not understand this. GD.pm is a type of Perl module that relies on and
interacts at run-time with compiled C libraries, that is, it has
dependencies on system installations. If you do not get the
dependencies satisfied you cannot build GD.pm, period. You may have
the beginner's impression that the incantation "perl Makefile.PL; make;
make install:' is very magical and should never go wrong, if so, you
are
mistaken on a theoretical level.

I think you are not yet at the level where you are knowledgeable enough
to deal with this kind of thing, but anyway I'll let you have the url
for my website, where I maintain some information for *expert-level*
developers who know the basics, info for building the 'gd' library more
painlessly on Cygwin (no ongoing-support promised, use at own risk):

  http://home.att.net/~perlspinr/makefiles/makefileworkshop.html

At that url 'gd' has an entry to click thru to a highly tuned Makefile
for building gd. When I used that Makefile to build and install gd,
building and installing GD.pm was fairly simple and straightforward.
However there is also a need to have information concerning the libpng
library dependency and mention of those issues can be found part way
down the page at

  http://home.att.net/~perlspinr/IM_build.html

So, there's a minimal checklist of three things that must be ticked-off
in order to build the GD.pm Perl extension module:

   (1) libpng, which '[lib]gd' and GD.pm depend on;
   (2) zlib, which the above depend on and/because is integral to
       libpng;
   (3) 'gd', which is not (yet) available as a Cygwin package
       (installable via 'setup.exe') and therefore must be hand-built
       from source code (and BTW requires a small *patch* to compile on
       cygwin in addition to  the hand-editing of the source code which
       I've accomplished and  am sharing at the site mentioned above).

That last item, regarding the Makefile tweaking and the patch to gd, is
what makes this follow-up relevent to Cygwin and therefore appropriate
material for this List (this reply was both posted and mailed to the
o.p.).

 Soren Andersen

-- 
http://fastmail.fm
Any faster and it wouldn't be email!

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/