[mapserver-users] problem renaming the mapscript module for perl (swig problem???)
lfilak at medinaco.org
lfilak at medinaco.org
Tue May 18 06:22:35 PDT 2010
>
> Message: 6
> Date: Tue, 18 May 2010 12:55:48 +0200
> From: Christian Fritze <christian.fritze at porath.de>
> Subject: [mapserver-users] problem renaming the mapscript module for
> perl (swig problem???)
> To: mapserver-users at lists.osgeo.org
> Message-ID: <4BF27234.2070700 at porath.de>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hello everybody!
>
> For evaluation purposes we need to run a mapserver 5.6.3
> incl. mapscript for perl in parallel with version 5.0.0
> (system is a 64 bit SLES 10 with swig 1.3.27).
>
> So i need to store the mapserver binaries in a separate
> directory (no problem of course) and rename the mapscript
> module for perl to something like 'mapscript563'.
> Following the instructions on
> http://trac.osgeo.org/mapserver/wiki/PerlMapScriptBuild35
> i did the following:
>
> 1. In .../mapserver-5.6.3/mapscript/perl/plmodule.i
> changed the line '%allowexception;' to
> '%feature("allowexcept");' (the former being an alias
> to the latter introduced in swig 1.3.28...)
> 2. In .../mapserver-5.6.3/mapscript/perl/Makefile.PL
> changed the line "'NAME' => 'mapscript'," to
> "'NAME' => 'mapscript563',"
> 3. In .../mapserver-5.6.3/mapscript/mapscript.i
> changed the line "%module mapscript" to
> "%module mapscript563"
> 4. Changed directory to .../mapserver-5.6.3/mapscript/perl/
> and issued:
> swig -shadow -perl5 ../mapscript.i
> rm mapscript.pm
> perl Makefile.PL
> make
>
> So i ended up with files
> .../mapserver-5.6.3/mapscript/perl/mapscript563.pm
> and
> .../mapserver-5.6.3/mapscript/perl/blib/arch/auto/mapscript563/mapscript563.so
> which seemed fine at first glance.
>
> However, examining those files shows that not all
> function calls in mapscript563.pm got changed from
> 'mapscript::*' and 'mapscriptc::*' to
> 'mapscript563::*' and 'mapscript563c::*'
>
> Function calls starting with 'mapscript::' are always calls
> to RFC24_ADD_PARENT_REF(...) or RFC24_DEL_PARENT_REF(...)
> Function calls starting with 'mapscriptc::' always appear
> in subs that call one of mapscript::RFC24_ADD_PARENT_REF(...)
> or mapscript::RFC24_DEL_PARENT_REF(...)
> Everything else is changed to the intended '563' names.
>
> Is this due to an incomplete interface file for swig?
> And will it become a problem after deployment anyway?
> (I just test the installation process as such but don't
> have access to the applications for actually testing the
> functioning of the mapscript module...)
>
> Any help appreciated, thanks in advance...
>
>
> Christian
Christian,
It may be splitting hairs but is it possible that mapscript.pm needs to be
removed prior to re-swig.
Aside from that, this question is beyond me.
Can you obtain a small snippet of code to test with?
There should be some sample Perl scripts in the install.
Lowell
More information about the MapServer-users
mailing list