Hi
I installed GD graphics lib since i was going to generate some graphs using perl. I installed the GD module and used some sample code to test it out, but when i run in on my webserver i just get this instead of a picture (i have mod_perl installed in apache and its working fine with all other perl scripts):
Code:
‰PNG ��� IHDR���d���d��z‹MQ���PLTE�������Ž~���tRNS�@f��IDATH‰TKn0`‘#@–.r„zŽ€Tg$˜S,8BUo{آ•:1/~žyckŠ^œqpA?^�p- A“&Œf4Wӏ—Ž—hq³Ž4' _QoŽœ‰{a)Ӹfš‡^B:jR˜h† Hկ5QH%ŽnqnŸ~_—G"ڡ·)„*“„ 8A
So it would probably seem like GD isnt installed, but when i check with the CPAN shell i get this:
Code:
cpan[1]> install GD
CPAN: Storable loaded ok (v2.18)
Going to read /home/exceed/.cpan/Metadata
Database was generated on Sat, 09 May 2009 00:27:02 GMT
GD is up to date (2.41).
cpan[2]>
And when i use this command "perl -MGD" it shows that the module is installed and should be working properly.
I have installed libpng/libpng-dev, libgd2-xdm/libgd2-xdm-dev as well as other needed libraries before installation, so i cant imagine what this can be.
Everything ran fine when compiling and installing except the "make test" which isnt necessary, but i guess that the module wont work if the "make test" fails ?
This was the output from the "make test" command:
Code:
$ sudo make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/GD..........Can't load './blib/arch/auto/GD/GD.so' for module GD: ./blib/arch/auto/GD/GD.so: failed to map segment fr
om shared object: Operation not permitted at /usr/lib/perl/5.10/DynaLoader.pm line 196.
at t/GD.t line 14
Compilation failed in require at t/GD.t line 14.
BEGIN failed--compilation aborted at t/GD.t line 14.
t/GD..........dubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 1-12
Failed 12/12 tests, 0.00% okay
t/Polyline....Can't load '/home/exceed/.cpan/build/GD-2.41-hsZ1xG/blib/arch/auto/GD/GD.so' for module GD: /home/exceed/
.cpan/build/GD-2.41-hsZ1xG/blib/arch/auto/GD/GD.so: failed to map segment from shared object: Operation not permitted a
t /usr/lib/perl/5.10/DynaLoader.pm line 196.
at /home/exceed/.cpan/build/GD-2.41-hsZ1xG/blib/lib/GD/Polyline.pm line 45
Compilation failed in require at /home/exceed/.cpan/build/GD-2.41-hsZ1xG/blib/lib/GD/Polyline.pm line 45.
BEGIN failed--compilation aborted at /home/exceed/.cpan/build/GD-2.41-hsZ1xG/blib/lib/GD/Polyline.pm line 45.
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 2 (wstat 512, 0x200)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
Failed Test Stat Wstat Total Fail List of Failed
-------------------------------------------------------------------------------
t/GD.t 2 512 12 23 1-12
t/Polyline.t 2 512 1 2 1
Failed 2/2 test scripts. 13/13 subtests failed.
Files=2, Tests=13, 0 wallclock secs ( 0.08 cusr + 0.00 csys = 0.08 CPU)
Failed 2/2 test programs. 13/13 subtests failed.
make: *** [test_dynamic] Error 2
So it seems like its not able to load a shared library, but it should be able to do this because the shared object is present and im running this installation with sudo privileges.
This is a little wierd since the "make Makefile.PL" as well as the compilation ("make") and installation ("make install") is working without problems and the CPAN shell is also reporting that everything seems to be fine.
Can someone please tell me why the GD module is not working here and why im getting the wierd letters instead of a picture?
All help is appericiated.