#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

  • Daniel Carrera
    Daniel Carrera
    2010-08-15

    Output of "make test".

     
    Attachments
  • Chris Marshall
    Chris Marshall
    2010-08-15

    • priority: 5 --> 3
     
  • Chris Marshall
    Chris Marshall
    2010-08-20

    • summary: Proj4 test fails when missing data files. --> Proj4 test fails when missing datum files.
     
  • Chris Marshall
    Chris Marshall
    2010-08-20

    This feature makes PDL installs more robust against mis-configured PROJ4 dependencies. This would be more useful in the planned Alien::PROJ4 module since if PROJ4 were mis-configured then it is essentially "broken" and the Alien::PROJ4 module should install a working version for PDL and other perl modules to use.

     
  • Chris Marshall
    Chris Marshall
    2010-11-11

    The t/proj_transform2.t test now skips tests
    if the first test error indicates PROJ4 may
    be misconfigured.

     
  • Chris Marshall
    Chris Marshall
    2010-11-11

    • status: open --> pending
     
  • Chris Marshall
    Chris Marshall
    2010-11-11

    This will be in PDL-2.4.7_006 and later versions of PDL.

     
  • Judd Taylor
    Judd Taylor
    2010-11-12

    I thought we resolved that this was a package problem with fedora? If the data files are there and you still built proj, and it dies, that's a good thing. You have a broken proj that will never work in any situation. What good is it if PDL pretends that everything is fine?

     
  • Judd Taylor
    Judd Taylor
    2010-11-12

    I meant "if the data files are NOT there"...

     
  • Chris Marshall
    Chris Marshall
    2010-11-12

    • status: pending --> open
     
  • 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