[Proj] Undefined subroutine &Proj::proj_init called

Eric Miller EMiller at dfg.ca.gov
Tue Jan 31 10:51:15 PST 2012


I'm not familiar with the Perl binding, but if it just is call the PROJ.4 library methods of the same name, then both "proj_init" and "proj_init_plus" require arguments.  The arguments to "proj_init" are the same as a C's main(int argc, char *argv[]).   In proj_init_plus, the argument is a string. For instance, proj_init_plus("+proj=latlon +DATUM=WGS84").

If Perl's loader is trying to match functions by name and arguments, then that might be the reason for the failure.  The trace shows that /usr/lib/libproj.so.0 is found and loaded. 
-- 

Eric G. Miller
Software Developer
CA Dept. of Fish & Game


>>> On 1/31/2012 at  2:44 AM, Martin Moore <martin.moore at avbrief.com> wrote:
> Thanks Ari - the code runs fine on Etch systems.
> 
>  
> 
> I did however check strace perl -e 'use PDL::GIS::Proj; my $pj =
> Proj::proj_init_plus();' 2>&1 | tail -n 20
> 
>  
> 
> On one of the etch systems and it also fails in the same way. So I guess the
> main script is calling something else!
> 
>  
> 
> Martin.
> 
>  
> 
> From: proj-bounces at lists.maptools.org 
> [mailto:proj-bounces at lists.maptools.org] On Behalf Of Ari Jolma
> Sent: 31 January 2012 07:19
> To: proj at lists.maptools.org 
> Cc: Geo-perl at list.hut.fi 
> Subject: Re: [Proj] Undefined subroutine &Proj::proj_init called
> 
>  
> 
> cc'ing geo-perl list. Followups there, please.
> 
> Seems to be the bindings in PDL::GIS::Proj. There is also another Proj
> module Geo::Proj4. Anybody know the PDL::GIS::Proj author?
> 
> Martin, how do you know the code is supposed to work? proj_init sounds like
> a function that might be called automatically.
> 
> Regards,
> 
> Ari
> 
> On 01/30/2012 09:03 PM, Martin Moore wrote: 
> 
> OK, thanks.
> 
>  
> 
> Not being into perl very much, which binding do you mean?
> 
>  
> 
> Martin.
> 
>  
> 
> From: fwarmerdam at gmail.com [mailto:fwarmerdam at gmail.com] On Behalf Of Frank
> Warmerdam
> Sent: 30 January 2012 18:07
> To: martin.moore at avbrief.com 
> Subject: Re: [Proj] Undefined subroutine &Proj::proj_init called
> 
>  
> 
> Martin,
> 
> For what it's worth, I don't believe the perl bindings for Proj
> you are using are part of the core distribution.  So you might
> have better luck directly contacting their author.  
> 
> Best regards,
> 
> 
> 
> 
> On Mon, Jan 30, 2012 at 7:22 AM, Martin Moore <martin.moore at avbrief.com>
> wrote:
> 
> 
> 
> Hi, I've got a pretty basic problem on a new Debian Squeeze server that has
> been narrowed down to:
> 
>  
> 
> strace perl -e 'use PDL::GIS::Proj; my $pj = Proj::proj_init();'  // also
> used Proj::proj_init_plus() with the same results
> 
>  
> 
> The only Proj.pm on the system is /usr/lib/perl5/PDL/GIS/Proj.pm and it
> doesn't appear to have a proj_init<_plus> function.
> 
>  
> 
> Stacktrace is at http://pastebin.com/kPkwt6nj 
> 
>  
> 
> Any ideas how to get this running appreciated.
> 
>  
> 
>  
> 
> As an aside, I needed to sudo ln -s /usr/lib/perl5/PDL/Core.pm
> /usr/lib/perl5/PDL::Core to get this recognized.  
> 
>  
> 
>  
> 
> Thanks,
> 
>  
> 
> Martin.
> 
> 
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org 
> http://lists.maptools.org/mailman/listinfo/proj 
> 
> 
> 





More information about the Proj mailing list