in reply to help installing GD and GD::Graph locally

Though, a warning while building the makefile said that I needed Math::Trig

Math::Trig is core perl on 5.8, so it's likely that you already had it. From the GD-2.35 Makefile.PL:
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 safel +y ignore this warning.
GD.xs:2184: structure has no member named `charmap'

According to my gd.h the gdFTStringExtra struct does have a member named 'charmap'. Looks like there is a problem with the 'gd.h' file that is being found. Perhaps it's just that your version of the GD C library is too old. (The Makefile.PL specified at least 2.0.28. What version do you have ?)

GD.xs:2190: `gdFTEX_CHARMAP' undeclared (first use in this function)

According to my 'gd.h':
#define gdFTEX_CHARMAP 2

So there is something definitely amiss with the rendition of 'gd.h' that is being found.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: help installing GD and GD::Graph locally
by j3 (Friar) on Nov 10, 2006 at 07:07 UTC

    Ugh. Sorry to waste everyone's time. Looks like I probably need a newer version of libgd installed.

    Will try to get a newer version of libgd (the C library) built and installed in my own ~/opt and then try building/installing GD again.

    Thanks for investigating, Rob.

    In the meantime, regarding installing your own modules into your own local ~/perllib directory: is it supposed to be

    perl Makefile.PL PREFIX=/home/me/perllib # or perl Makefile.PL LIB=/home/me/perllib # ?

    In perlmodinstall it says to use PREFIX, but the Camel book (in the CPAN chapter) mentions LIB, INSTALLMAN1DIR, INSTALLMAN3DIR, INSTALLBIN, and INSTALLSCRIPT. In the Cookbook, in item 12.21, I believe it says to use LIB, and that PREFIX is for when you've got your own Perl installed somewhere in /home/you.

      perl Makefile.PL PREFIX=/home/me/perllib # or
      perl Makefile.PL LIB=/home/me/perllib # ?


      I've not had any need to use either - but I think PREFIX is the one you're after. Give it a try and just check where it puts things. For me, on Win32, when I do 'perl Makefile.PL PREFIX=D:/test', everything gets placed in 'D:/test/lib' - so it becomes necessary for me to use lib 'D:/test/lib'; in my script if that script needs to load such a module.

      You might also consider 'INSTALL_BASE' if 'PREFIX' doesn't do what you want. From 'perldoc ExtUtils::MakeMaker':
      INSTALL_BASE can be passed into Makefile.PL to change where your modul +e will be installed. INSTALL_BASE is more like what everyone else calls "prefix" than PREFIX is. To have everything installed in your home directory, do the following. perl Makefile.PL INSTALL_BASE=~

      Cheers,
      Rob
        perl Makefile.PL PREFIX=/home/me/perllib # or
        perl Makefile.PL LIB=/home/me/perllib # ?

        From 'perldoc ExtUtils::MakeMaker'{snip}

        Ah. ExtUtils::MakeMaker is the relevant doc I need to read for this. Thanks!