j3 has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to install GD::Graph (hence, also GD) on a GNU/Linux server for which I have no root access. It's got Perl 5.8.0. Building GD is failing, and I'm hoping someone can help.
I created a fresh new empty ~/perllib directory to house my local Perl modules.
I checked, and the system seems to have the necessary C libs: libgd, libpng, zlib. Looks like I only need GD and GD::Text.
I checked to see if GD was present: perl -MGD -e 1. No dice. GD::Text not installed either.
Downloaded GD-2.35.tar.gz. Tried perl Makefile.PL (forgetting to use PREFIX=... at the moment). Got this strange (redundant-looking) error:
** WARNING: found gd.h header file in /usr/include/gd.h, but it is exp +ected at /usr/include/gd.h. This may cause compile errors! ** ** Possible problems found ** GD library used from: /usr
It asked me a few questions, then made the makefile. Though, a warning while building the makefile said that I needed Math::Trig.
Installed Math::Trig (Math-Complex-1.36.tar.gz): perl Makefile.PL PREFIX=~/perllib/, make, make test, make install. Looks like it installed properly.
Back to GD. I still get this: Warning: prerequisite Math::Trig 0 not found.
Smacked myself in the forehead and set PERL5LIB: export PERL5LIB=~/perllib. Tried again. Still no joy. (Weird... why can't it find Trig.pm? I can see it right there in ~/perllib/lib/perl5/site_perl/5.8.0/Math.)
Then noticed that ~/perllib actually contained its own lib subdirectory. Am I supposed to set PERL5LIB=~/perllib/lib? Or just ~/perllib? Anyhow, tried both, and neither worked. It seems that GD's Makefile.PL can't find it either way.
Finally, not sure if it's related, but if I try to run make for GD anyway, I get this error:
$ make cc -c -I/usr/include -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE +_OFFSET_BITS=64 -O3 -DVERSION=\"2.35\" -DXS_VERSION=\"2.35\" -fPIC +"-I/usr/lib/perl5/5.8.0/i386-linux/CORE" -DHAVE_JPEG -DHAVE_FT -DHAV +E_XPM -DHAVE_GIF -DHAVE_PNG -DHAVE_ANIMGIF GD.c GD.xs: In function `XS_GD__Image__newFromGif': GD.xs:855: warning: assignment makes pointer from integer without a ca +st GD.xs: In function `XS_GD__Image_STORABLE_thaw': GD.xs:922: warning: assignment makes pointer from integer without a ca +st GD.xs: In function `XS_GD__Image_stringFT': GD.xs:2184: structure has no member named `charmap' GD.xs:2190: `gdFTEX_CHARMAP' undeclared (first use in this function) GD.xs:2190: (Each undeclared identifier is reported only once GD.xs:2190: for each function it appears in.) GD.xs:2192: structure has no member named `charmap' GD.xs:2192: `gdFTEX_Unicode' undeclared (first use in this function) GD.xs:2194: structure has no member named `charmap' GD.xs:2194: `gdFTEX_Shift_JIS' undeclared (first use in this function) GD.xs:2196: structure has no member named `charmap' GD.xs:2196: `gdFTEX_Big5' undeclared (first use in this function) GD.xs: In function `XS_GD__Font_DESTROY': GD.xs:2437: warning: comparison between pointer and integer GD.xs:2438: warning: comparison between pointer and integer GD.xs:2439: warning: comparison between pointer and integer GD.xs:2440: warning: comparison between pointer and integer GD.xs:2441: warning: comparison between pointer and integer GD.xs: In function `XS_GD__Font_Small': GD.xs:2453: warning: assignment makes pointer from integer without a c +ast GD.xs: In function `XS_GD__Font_Large': GD.xs:2464: warning: assignment makes pointer from integer without a c +ast GD.xs: In function `XS_GD__Font_Giant': GD.xs:2475: warning: assignment makes pointer from integer without a c +ast GD.xs: In function `XS_GD__Font_MediumBold': GD.xs:2486: warning: assignment makes pointer from integer without a c +ast GD.xs: In function `XS_GD__Font_Tiny': GD.xs:2497: warning: assignment makes pointer from integer without a c +ast make: *** [GD.o] Error 1
I've tried telling GD's Makefile.PL that I don't need various features it asks me about (it inquires whether your version of libgd was compiled with support for jpeg, png, freetype, gif, animated gif, and xpm), but I still seem to get the same errors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: help installing GD and GD::Graph locally
by syphilis (Archbishop) on Nov 10, 2006 at 00:11 UTC | |
by j3 (Friar) on Nov 10, 2006 at 07:07 UTC | |
by syphilis (Archbishop) on Nov 11, 2006 at 01:02 UTC | |
by j3 (Friar) on Nov 11, 2006 at 05:22 UTC |