CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Help need with GD module

 



yim111
Novice

Oct 1, 2002, 7:28 AM

Post #1 of 4 (455 views)
Help need with GD module Can't Post

Hello,

I am trying to get GD 2.01 to work on a RH 7.1 system.

When I run a script that uses GD, Apache gives the following error:
---
[Tue Sep 24 09:32:54 2002] [error] [client 123.12.12.12] Premature end of script headers: /var/www/cgi-bin/symbol.cgi
Can't locate loadable object for module GD in @INC (@INC contains: . /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl) at Symbol/UPC.pm line 13
Compilation failed in require at Symbol/UPC.pm line 13.
BEGIN failed--compilation aborted at Symbol/UPC.pm line 13.
Compilation failed in require at /var/www/cgi-bin/symbol.cgi line 13.
BEGIN failed--compilation aborted at /var/www/cgi-bin/symbol.cgi line 13.
---

So to confirm the problem is with GD I tried:
---
# perl -e "use GD"
Can't load '/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/auto/GD/GD.so' for module GD: /usr/lib/libgd.so: undefined symbol: FT_New_Face at /usr/local/lib/perl5/5.6.1/i686-linux/DynaLoader.pm line 206.
at -e line 1
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
---



It was suggest that I try to [re]install the GD module via CPAN, so I tried that, and somehow CPAN ended up installing a newer version of Perl before trying to install GD. The install for GD failed. Below is the result. Sorry it is so long, but figured the more info the better. I am 100% positive I told GD to install WITHOUT Freetype support, in fact the only option of the 3 it asks that I said Yes to was JPEG support. At this point I am thinking I may need to completely remove any GD install that I may have and start fresh. But not real sure how to go about that. Any and all suggestions at this point are very welcome.

Thanks in advance for all help!!
-jim

---
make[1]: Leaving directory `/root/.cpan/build/perl-5.8.0'
/usr/bin/make install -- OK
Running make for L/LD/LDS/GD-2.01.tar.gz
Unwrapped into directory /root/.cpan/build/GD-2.01
CPAN.pm: Going to build L/LD/LDS/GD-2.01.tar.gz
mkdir blib
mkdir blib/lib
mkdir blib/arch
mkdir blib/arch/auto
mkdir blib/arch/auto/GD
mkdir blib/lib/auto
mkdir blib/lib/auto/GD
mkdir blib/man3
cp qd.pl blib/lib/qd.pl
cp patch_gd.pl blib/lib/patch_gd.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 -I/usr/lib/perl5/5.6.0/i386-linux -I/usr/lib/perl5/5.6.0 /usr/lib/perl5/5.6.0/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.6.0/ExtUtils/typemap -typemap typemap GD.xs > GD.xsc && mv GD.xsc GD.c
gcc -c -I/usr/local/include -I/usr/local/include/gd -fno-strict-aliasing -O2 -march=i386 -mcpu=i686 -DVERSION=\"2.01\" -DXS_VERSION=\"2.01\" -fPIC -I/usr/lib/perl5/5.6.0/i386-linux/CORE -DHAVE_JPEG GD.c
Running Mkbootstrap for GD ()
chmod 644 GD.bs
LD_RUN_PATH="/usr/lib:/usr/local/lib:/lib" gcc -o blib/arch/auto/GD/GD.so -shared -L/usr/local/lib GD.o -L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/local/lib -lgd -lpng -lz -ljpeg -lm
chmod 755 blib/arch/auto/GD/GD.so
cp GD.bs blib/arch/auto/GD/GD.bs
chmod 644 blib/arch/auto/GD/GD.bs
Manifying blib/man3/GD.3pm
Manifying blib/man3/GD::Polyline.3pm
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl5/5.6.0/i386-linux -I/usr/lib/perl5/5.6.0 -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/GD................Can't load './blib/arch/auto/GD/GD.so' for module GD: /usr/lib/libgd.so: undefined symbol: FT_New_Face at /usr/lib/perl5/5.6.0/i386-linux/DynaLoader.pm line 200.
at t/GD.t line 12
Compilation failed in require at t/GD.t line 12.
BEGIN failed--compilation aborted at t/GD.t line 12.
t/GD................dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-10
Failed 10/10 tests, 0.00% okay
t/Polyline..........Can't load 'blib/arch/auto/GD/GD.so' for module GD: /usr/lib/libgd.so: undefined symbol: FT_New_Face at /usr/lib/perl5/5.6.0/i386-linux/DynaLoader.pm line 200.
at blib/lib/GD/Polyline.pm line 49
Compilation failed in require at blib/lib/GD/Polyline.pm line 49.
BEGIN failed--compilation aborted at blib/lib/GD/Polyline.pm line 49.
Compilation failed in require at t/Polyline.t line 10.
BEGIN failed--compilation aborted at t/Polyline.t line 10.
t/Polyline..........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
Failed Test Status Wstat Total Fail Failed List of failed
-------------------------------------------------------------------------------
t/GD.t 255 65280 10 10 100.00% 1-10
t/Polyline.t 255 65280 1 1 100.00% 1
Failed 2/2 test scripts, 0.00% okay. 11/11 subtests failed, 0.00% okay.
make: *** [test_dynamic] Error 2
/usr/bin/make test -- NOT OK
Running make install
make test had returned bad status, won't install without force
---


davorg
Thaumaturge / Moderator

Oct 2, 2002, 12:57 AM

Post #2 of 4 (448 views)
Re: [yim111] Help need with GD module [In reply to] Can't Post

Sounds like your system doesn't have the gd library installed. GD.pm is simply a wrapper around the gd library - so that needs to be installed first.

Did you read the README?

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


yim111
Novice

Oct 2, 2002, 8:58 AM

Post #3 of 4 (439 views)
Re: [davorg] Help need with GD module [In reply to] Can't Post

Not only have I read the README, but at this point I almost have it memorized... ; )

I broke down this morning and tried intalling the RPMs of libgd and GD. Each installed without error (libgd complained about me having a newer version so I did use the --force on it).

Now I am seeing a different error:

From command line using "perl -e "use GD":

# perl -e "use GD"
Can't locate loadable object for module GD in @INC (@INC contains: /usr/local/lib/perl5/5.8.0/i686-linux /usr/local/lib/perl5/5.8.0 /usr/local/lib/perl5/site_perl/5.8.0/i686-linux /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl .) at -e line 1
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

And from apaches error log when a script using GD is executed:

[Wed Oct 2 10:43:42 2002] [error] [client 123.11.11.11] Premature end of script headers: /var/www/cgi-bin/symbol.cgi
Can't locate loadable object for module GD in @INC (@INC contains: . /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl) at Symbol/UPC.pm line 13
Compilation failed in require at Symbol/UPC.pm line 13.
BEGIN failed--compilation aborted at Symbol/UPC.pm line 13.
Compilation failed in require at /var/www/cgi-bin/symbol.cgi line 13.
BEGIN failed--compilation aborted at /var/www/cgi-bin/symbol.cgi line 13.
[Wed Oct 2 10:43:43 2002] [error] [client 123.11.11.11] Premature end of script headers: /var/www/cgi-bin/symbol.cgi



---

Any thoughts as to what loadable object isn't found? One thing that I notice is the @INC is looking at the old perl install [5.6.0] and as I mentioned previously, CPAN recently upgraded me to 5.8.0 - do you think pointing @INC to the new install would help? If so how can I change that?

Thank you VERY much for you reply and assistance!!

-jim


(This post was edited by yim111 on Oct 2, 2002, 9:02 AM)


davorg
Thaumaturge / Moderator

Oct 2, 2002, 9:24 AM

Post #4 of 4 (436 views)
Re: [yim111] Help need with GD module [In reply to] Can't Post

Which version of libgd do you have installed? The only rpms I can find are for 1.8.x but the current version of GD.pm needs version 2.0.1. You might see if you have more success with an older version of GD.pm (the docs recommend 1.41).

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives