GD::Graph install problems

Celeryman

Limp Gawd
Joined
Jan 16, 2003
Messages
418
OMG, has anybody delt with the GD graphics library and the GD::Graph install under redhat 8.0? I just wanted to check here before I go insane. I am trying to get it from cpan after installing the latest required packages for it. In CPAN I type install GD and then it errors out with a GD.o error and says install seems impossible. I am compiling the latest gcc (3.3.3) right now and hope that will resolve the issue. I have spent two days looking through all the information I could find on google and this is the only thing I can think of. So if you have experience with this, please help. Thanks in advance.
 
Well, I guess I am not the only one who doesn't have a clue why it won't work. The updated gcc did not work by the way. Please let me know if you know anything about it.
 
Originally posted by Celeryman
In CPAN I type install GD and then it errors out with a GD.o error and says install seems impossible.

What's the "GD.o error"? Surely it doesn't just say "OMG, GD.o error!!!! Install impossible!!!1!". You should see the make output from within the cpan shell just as if you had run "perl Makefile.PL" yourself.

Otherwise, if Redhat 8 has a GD::Graph rpm, that'd probably be your best bet.
 
Dude, i appreciate your reply, but obviously you have not had experience with this particular package. I don't think anything besides a package having to do with GD::Graph or gdlib would say GD.o error. From what I gather on everything that I have read, it is notoriously hard to install, even for people that know how to install perl packages backwards, forwards, and sideways. This package is used for php, perl, and a bunch of other languages. Also from going through so much material, my problem probably lies with the GD compile not finding the other reqiured packages (zlib, the jpeg package, and the png packages) which I have installed. Dependency hell!!! So, I ask again. What do I need to do to get the package installed correctly?

By the way I do see the make output just like I did it with Makefile.pl (which by the way I did try) and got the same error. Hope that helps.
 
Argh. Just paste the last few lines of make output before this "GD.o error", please. In case CPAN filters out the interesting stuff, then do it manually as I said. Either way, there is something more there then the words "GD.o error".

I've got GD::Graph installed and working just fine here under both linux (gentoo and slackware) and freeBSD, for what it's worth, and I have upgraded it several times over the last few years. The second perl script I ever wrote uses it, in fact. I JUST NOW, especially for you, rebuilt it via CPAN on my Gentoo machine, and it installed fine.

Oh yea, and read this, specifically this part.
 
Ok, I understand where you are coming from. By the way I did not mean any disrespect as it were in my reply. There is plenty of that to be had elsewhere. I do not have the output of make at my disposal right now, but I will post it in the morning. Thank you agian for taking the time to get around my stupidity and answer my question.
 
Ok how about this:

Checking if your kit is complete...
Looks good
Warning: prerequisite Math::Trig 0 not found.
Writing Makefile for GD
cp GD/Polyline.pm blib/lib/GD/Polyline.pm
cp qd.pl blib/lib/qd.pl
cp GD.pm blib/lib/GD.pm
AutoSplitting blib/lib/GD.pm (blib/lib/auto/GD)
/usr/local/bin/perl /usr/local/lib/perl5/5.8.0/ExtUtils/xsubpp -typemap /usr/local/lib/perl5/5.8.0/ExtUtils/typemap -typemap typemap GD.xs > GD.xsc && mv GD.xsc GD.c
cc -c -I/usr/local/include -I/usr/local/include/gd -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O3 -DVERSION=\"2.12\" -DXS_VERSION=\"2.12\" -fpic "-I/usr/local/lib/perl5/5.8.0/i686-linux/CORE" -DHAVE_JPEG GD.c
cc1: warning: changing search order for system directory "/usr/local/include"
cc1: warning: as it has already been specified as a non-system directory
In file included from GD.xs:7:
/usr/include/gd.h:689:18: gdfx.h: No such file or directory
make: *** [GD.o] Error 1
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible

Well there you go. Please help if you can.
 
gdfx.h is a header file that appeared somewhere between libgd-2.0.15 (not present there) and libgd-2.0.21 (present there). You've either got an incomplete or otherwise broken install of a version of a libgd newer than 2.0.15, or you've got a mixture of two versions installed. How did you install libgd? Via RPM, or manually from source? Did you upgrade and "overwrite" an older version?

Things to try. Best idea is probably to skip straight to 4), but you can try these other things first if you'd like:

1) Run "gdlib-config --all" and paste the output here. That script may not be present on your system; don't worry if it's not.

2) Do a "locate gdfx.h" (might need to do an updatedb first if you have only recently installed libgd), just to see if it's on your system anywhere. Your gd.h includes it, so if it's not there at all, then your libgd installation is definitely broken. If it's there, then post where you found it. It might be that it's stuffed in a subdirectory under /usr/include, while your gd.h just does '#include "gdfx.h"'. Do a "locate gd.h", too, and post the results, to make sure that you haven't got, say an orphaned gd.h in /usr/include and another (from your "real" libgd install) in /usr/local/include.

3) Save this as "gdtest.c", and then try building it via "gcc -lgd gdtest.c":
Code:
#include <gd.h>
int main(void) {
    return 0;
}
That shouldn't build; it should complain about not finding gdfx.h just as CPAN does. If it does build, then CPAN is messing up your build somehow (especially likely if you've got two gd.h's on your system). In that case, don't do 4) below. If it doesn't build but the error is from ld not finding libgd, then DO proceed to 4); even though the "program" above doesn't actually use libgd, gcc will still try to link it in because you told it to, and it wasn't able to find it.

4) Try re-installing libgd. If it's an option, install a libgd nearer to 2.0.12, but not older than that. The version of GD on CPAN wants libgd >= 2.0.12, and I can confirm that it installs fine with a working libgd-2.0.15. The versioning issue shouldn't really matter as long as you've got >= 2.0.12, but it's one less unknown. If you reinstall manually from source, then manually remove /usr/include/gd.h and /usr/local/include/gd.h, if present, before "make install", just to be sure. If you install from rpm, make sure that you haven't got two "gd.h"s as above when you're done.
 
Ok, great and thanks. I will try this stuff monday when I have access to the server (firewall blocks all outside access). I will post back if I get the issue resolved.
 
Back
Top