Posted this in the wrong forum... so let's try it again here....



Just installed OpenBSD 4.0 last week (OpenBSD 4.0 (GENERIC) #690: Sat Sep 16 20:26:25 MDT 2006, AMD64) and attempted to add GD support to perl. I proceeded to install the GD libraries (gd-2.0.33p3) from packages as well as the perl GD interface module (p5-GD-2.30), which in the course of my testing I have installed from packages AND from CPAN (both of which result in the same problem).

Both packages install without error (once Chris Kuethe told me I had to have X11 libraries in there despite the fact I don't run X.... but I digress). When I attempt to test it, however I get the following:

# perl -e "use GD"
Can't load '/usr/local/libdata/perl5/site_perl/amd64-openbsd/auto/GD/ GD.so' for module GD: Cannot load specified object at /usr/libdata/ perl5/amd64-openbsd/5.8.8/DynaLoader.pm line 230.
at -e line 1
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

The .so file is in the specified directory, but perl can't load it for some reason. I get the same sort of errors on a "make test" for the CPAN module:

Running 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: Cannot load specified object at /usr/libdata/perl5/amd64-openbsd/ 5.8.8/DynaLoader.pm line 230.
at t/GD.t line 14
Compilation failed in require at t/GD.t line 14.


When I read through the documentation I found the following:

"If the make and install all seem to go well but you get errors like
"Fatal error: can't load module GD.so", or "Fatal error: unknown
symbol gdFontSmall" when you try to run a script that uses GD, you may
have problems with dynamic linking."

also:

"This problem has been reported under some versions of SuSE and RedHat
Linux (it appears to be related to a partcular RPM distribution of
Perl).  Perl was built incorrectly, causing some but not all loadable
modules to fail.  The only solution I know of is to rebuild Perl
correctly from scratch and reinstall all previously-installed modules."

So does the default perl distribution in 4.0 have problems with dynamic linking of modules? Should I rebuild perl? Try to statically load the module?

Reply via email to