#32 Proj4 test fails when missing datum files.

closed
None
3
2011-03-25
2010-08-15
Daniel Carrera
No

The PDL test scripts should check that Proj4 actually works correctly. In particular, if proj4 is missing the data files, "make test" just dies and PDL won't install.

Steps to reproduce:
1. Use Fedora Core 13.
2. yum install gcc cpan netpbm proj-devel
3. cpan CHM/PDL-2.4.6_991.tar.gz

The output of "make test" is attached.

Discussion

<< < 1 2 (Page 2 of 2)
  • Chris Marshall
    Chris Marshall
    2010-11-12

    Good point---finger in the dike, just on the
    wrong side. Marking this request back open
    until the problem detection is tied into the
    decision to build/or not the PROJ4 bindings....

     
  • Judd Taylor
    Judd Taylor
    2010-11-12

    The above steps to reproduce don't show that proj is actually installed, just the proj-devel package. Maybe this is the root cause here? I don't have a test setup where I can follow the above steps right now, but can we have the original reporter try it while also installing the actual proj package as well?

     
  • Chris Marshall
    Chris Marshall
    2011-03-19

    Using Devel::CheckLib version 0.92 as included in the PDL
    source tree, the following will try to initialize the PROJ4
    library. If it runs but does not return success then there is
    a problem with the PROJ4 installation:

    my $header = 'proj_api.h';
    my $include_path = '/usr/include';
    my $gis_proj_lib_path = '/usr/lib';

    check_lib(
    function=>'projPJ mypj = pj_init_plus("+proj=eqc +lon_0=0"); if (! mypj) return 1; else return 0;',
    header=>$header,
    incpath=>$include_path,
    lib=>'proj',
    libpath=>$gis_proj_lib_path,
    )

    The check could be run in the PROJ4 tests but then
    you would have the configuration saying that PROJ4
    was built/installed while it could not actually run.
    Better to force a skip of the PROJ4 modules if the
    library is misinstalled.

     
  • Chris Marshall
    Chris Marshall
    2011-03-19

    Lib/GIS/Proj Makefile.PL with proj init check

     
    Attachments
  • Chris Marshall
    Chris Marshall
    2011-03-19

    Lib/Transform/Proj4 Makefile.PL with proj init check
    
     
    Attachments
  • Chris Marshall
    Chris Marshall
    2011-03-19

    I've attached for reference, Makefile.PL from Lib/GIS/Proj and Lib/Transform/Proj4 with the proj initialization check using Devel::CheckLib. This may or may not make it into PDL-2.4.8 but definitely will be addressed in the future.

     
  • Chris Marshall
    Chris Marshall
    2011-03-25

    This check was added to PDL as of PDL-2.4.7_015. Thanks for reporting the problem.

     
  • Chris Marshall
    Chris Marshall
    2011-03-25

    • assigned_to: nobody --> marshallch
    • status: open --> closed
     
<< < 1 2 (Page 2 of 2)