riot has asked for the wisdom of the Perl Monks concerning the following question:

I'm getting the following error while running 'make test' for GD.pm:
PERL_DL_NONLAZY=1 /usr/local/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.00503/sun4-solaris -I/usr/local/lib/perl5/5.0 +0503 -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @AR +GV;' t/*.t t/GD................Can't load './blib/arch/auto/GD/GD.so' for module +GD: ld.so.1: /usr/local/bin/perl: fatal: relocation error: file ./blib/arch/auto/GD/GD.so: symbol gdImageCreateFromJpegCtx: referenced symbol not found at /usr/local/lib/perl5/5.00503/sun4-solaris/DynaLoader.pm line 169. at t/GD.t line 11 BEGIN failed--compilation aborted at t/GD.t line 11. dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 1-10 Failed 10/10 tests, 0.00% okay Failed Test Status Wstat Total Fail Failed List of failed ---------------------------------------------------------------------- +--------- t/GD.t 2 512 10 10 100.00% 1-10 Failed 1/1 test scripts, 0.00% okay. 10/10 subtests failed, 0.00% okay +. make: *** [test_dynamic] Error 2
The file that contains the symbol gdImageCreateFromJpegCtx is libgd.a in /usr/local/lib. How in the world can I get GD.pm to recognize this?

I'm using: GD-1.32, gcc-2.95.2, gd-1.8.3, libpng-1.0.8, jpeg-6b, perl 5.005_03, and zlib 1.1.3, and solaris 7.

riot
Twisted mind? No, just bent in several strategic places.

Replies are listed 'Best First'.
Re: Trouble with GD.pm and gd
by lemming (Priest) on Nov 29, 2000 at 03:56 UTC
    Have you read the bit about patching gd-1.8.3 on solaris systems in the README? CPAN GD Readme

    Try #2: have you adjusted this part of Makefile.pl?
    my @INC = qw(-I/usr/local/include -I/usr/local/include/gd); my @LIBPATH = qw(-L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr +/local/lib ); my @LIBS = qw(-lgd -lpng -lz);
      Yes, when I do so, gd won't compile. It complains that it cannot find libz, which is in /usr/local/lib.

      --
      riot
      Twisted mind? No, just bent in several strategic places.

      I forgot to add that I fixed my include path (removed /usr/local/include/gd as gd had installed them in /usr/local/include) and, tadah, still experiencing the same error.

      --
      riot
      Twisted mind? No, just bent in several strategic places.