Perl Mapscript "issues"

Sean Gillies sgillies at FRII.COM
Sat Apr 23 21:42:16 EDT 2005


On Apr 23, 2005, at 6:44 PM, Nick Floersch wrote:

> Hi All,
>
> I recently posted a long bit about my problems getting a newer version
> of Perl mapscript to work with a perl mapscript app we have here.
>
> The question has changed.
>
> NOW, I need to know this:
> Why, when I try to instantiate a map object with any map file other
> than
> "" do I get a segfault?
> v---snip---
> #!/usr/bin/perl -w
> use mapscript;
> use XBase;
>
> my $mapObjFull =3D new mapscript::mapObj("itasca.map");
> warn "Got Here 2.5";
> ^---snip---
> This gives me a segfault.
>
> The itasca.map file is the one found in the mapserver demo "workshop."
>
> If I call new mapscript::mapObj with no map, it works fine:
> v---snip---
> #!/usr/bin/perl -w
> use mapscript;
> use XBase;
>
> my $mapObjFull =3D new mapscript::mapObj();
> warn "Got Here 2.5";
> ^---snip---
> Will produce the message "Got Here 2.5 at line 6" or something like
> that. It works fine.
>
> Just to rule out the idea that itasca.map had a layer or something that
> it couldn't access (though it works fine in the workshop demo), I made
> a
> copy of it and commented out ALL layers.
>
> It still segfaults.
>
> In desperation I used the helloworld map from the tutorials thinking I
> could avoid any issues with non-existent data layers etc.
>
> It still segfaults.
>
> Someone mentioned looking for libmap.a and see if it is an old version.
> I don't have libmap.a in any library path. Yet, the old files for perl
> mapscript work perfectly. It's the new ones that don't.
>
> What am I missing here? It isn't the map files. It's something about
> the
> perl mapscript build.
>
> I am trying to do all of this with Mapserver 4.4.1 or 4.4.2. Neither
> version has worked right yet (with mapscript at least - everything else
> works fine).
>
> -Nick

Nick,

Are you certain that you are using your newest mapscript module?  Try
printing the value of $mapscript::MS_VERSION before you make a new
mapObj instance.  You should get '4.4.1' or .2.

cheers,
Sean

--
Sean Gillies
sgillies at frii dot com
http://users.frii.com/sgillies



More information about the mapserver-users mailing list