[Mapserver-users] MapScript, help starting? (continued)

Junkmail Box junkmail at deathkeep.com
Mon Mar 3 18:15:04 EST 2003


Doh! Thanks, Lowell. I'm a Penetrode customer today... Yes, I did build
mapscript separately and that was the root of all evils. I rebuilt both
MapServer (upgraded to 3.6.4, a pleasant side-effect) and mapscript, and
they both work just fine now.

In the meantime, I documented some installation issues I had that I think
would be of interest to the maintainers of mapscript (is that you,
Lowell?)...


#######

When installing Perl mapscript bundled with MapServer 3.6.4, I have a
problem. The mapscript module compiles and installs successfully, but will
not run:

Can't load
'/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris-64int/auto/mapscript/mapscript.so'
for module mapscript: ld.so.1: perl: fatal: relocation error: file
/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris-64int/auto/mapscript/mapscript.so:
symbol gdImageDestroy: referenced symbol not found at
/usr/local/lib/perl5/5.6.1/sun4-solaris-64int/DynaLoader.pm line 206. at
/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris-64int/mapscript.pm line
7
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

Apparently, the flag "-lgd" isn't being placed in ../../perlvars and this
is causing the problem. A rather simple, though barbaric, solution is to
add this line:

$libs .= " -lgd";

right before this in Makefile.PL:

print $inc."\n";
print $libs."\n";

The real fix, I suppose, would be to include "-lgd" in ../../perlvars The
cause of the problem may be that I'm using --with-gd=static


########


Also, the suite is lacking a simple test script that would have made this
obvious before having installed the module. The following "test.pl", if
included in the mapscript/perl suite, would probably come in handy:

END { print "not ok 1\n" unless $loaded; }
use mapscript;
$loaded = 1;
print "ok 1\n";

Maybe a better test script could be made up; this one, for instance, would
say OK if a previous mapscript were already installed, cuz that one loads;
then the new one would be installed and would bomb. But it'd be somewhat
useful, particularly for new installations.


########


Finally, I notice that the example given in the Perl MapScript Reference
http://mapserver.gis.umn.edu/doc36/perlmapscript-reference.html is
slightly incorrect, at least on my installation. The mapObj class doesn't
seem to be exported, so this:

my $map = new mapObj('arcata.map') or die('Unable to open mapfile.');

had to be changed to this:

my $map = new mapscript::mapObj('arcata.map') or die('Unable to open
mapfile.');

to work correctly. Is this an issue with my installation, or with the
documentation?









More information about the mapserver-users mailing list