[San-Diego-pm] Finding GD.pm

Emile Aben emileaben at gmail.com
Sun Jul 23 08:53:17 PDT 2006


Hi Joel,

I'm not a big fan of just copying files around to get modules
installed. Most modules
have install scripts for a reason, and most install scripts have some
kind of mechanism
for you to specify where you want something installed.
For instance most CPAN modules have a Makefile.PL file and are
installed through these commands:
perl Makefile.PL
make
make test
make install

This installs a library in a perl library location for the local
system. Quite possibly you can't
install there if you are not superuser/root. To install in another
location most of the time you can use the PREFIX variable. To install
perl libaries in /home/emile/perl for instance:
perl Makefile.PL PREFIX=/home/emile/perl
make
make test
make install

Since perl organizes its libraries in a particular way, the libraries
will get installed in a location like:
/home/emile/perl/site_perl/5.8.8/ (so you could use that location in a
'use lib' line). This should also take care of checking dependencies
on other perl modules or external libraries, and if applicable the
compilation of code that takes care of the bridging between perl and
external libraries.

As for the actual problem you are encountering here I think is due to
the fact that GD uses libraries that are written in another language
that can be loaded with Dynaloader (in this case the libgd library
that should be installed on your system, otherwise GD.pm won't work).
Normally an installer will take care of stuff like that. If you really
want to try to solve this by hand, here's a list of files that are
installed when GD got installed on an old box I have lying around:

Installing /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi/auto/GD/GD.bs
Installing /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi/auto/GD/GD.so
Files found in blib/arch: installing files in blib/lib into
architecture dependent library tree
Installing /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi/qd.pl
Installing /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi/GD.pm
Installing /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi/auto/GD/autosplit.ix
Installing /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi/GD/Simple.pm
Installing /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi/GD/Polyline.pm
Installing /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi/GD/Polygon.pm
Installing /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi/GD/Image.pm
Installing /usr/share/man/man1/bdf2gdfont.pl.1
Installing /usr/share/man/man3/GD::Simple.3pm
Installing /usr/share/man/man3/GD.3pm
Installing /usr/share/man/man3/GD::Polygon.3pm
Installing /usr/share/man/man3/GD::Polyline.3pm
Installing /usr/share/man/man3/GD::Image.3pm
Installing /usr/bin/bdf2gdfont.pl

I think the GD.bs and GD.so file are goo to make the perl module work
with the libgd library, and I'm pretty sure you can't copy these
between different operating systems.

hope this helps,
Emile

On 7/22/06, Joel Fentin <joel at fentin.com> wrote:
> Can't locate loadable object for module GD in @INC....
>
> I have refined the problem. I wrote the following program:
>
> #!/usr/bin/perl -w
> BEGIN{use CGI::Carp qw(carpout fatalsToBrowser);carpout(\*STDOUT);$|=1;}
> use strict;
> use CGI qw(:standard);
> use lib ".";
> use GD;
>
> I then did selective commenting of GD.pl. The only line it doesn't like
> inside GD.pm: bootstrap GD;
>
> The only module I could find with bootstrap is Dynaloader. I copied it
> into cgi-bin and set the permissions.
>
> Dynaloader's dependencies are vars, AutoLoader, and Config. I copied
> vars.pm, AutoLoader.pm and Config.pm into cgi-bin and set the permissions.
>
> I think I've covered all dependencies but the symptom remains. Any ideas?
> --
> Joel Fentin       tel: 760-749-8863    FAX: 760-749-8864
> Email me:         http://fentin.com/me/ContactMe.html
> Biz Website:      http://fentin.com
> Personal Website: http://fentin.com/me
>
> _______________________________________________
> San-Diego-pm mailing list
> San-Diego-pm at pm.org
> http://mail.pm.org/mailman/listinfo/san-diego-pm
>


More information about the San-Diego-pm mailing list