#181 t/gis_proj.t is broken

closed-works-for-me
Judd Taylor
None
5
2008-10-19
2008-06-07
Anonymous
No

I believe t/gis_proj.t is broken in two ways. First of all, one of the tests fails and probably should be fixed (I don't understand what it's doing, though). Secondly, I set all the PDL::GIS::Proj settings in perldl.conf to 0 but gis_proj.t still runs and fails. Proj is installed.

$ proj
Rel. 4.6.0, 21 Dec 2007
$ prove -d t/gis_proj.t
# $Test::Harness::Switches:
# 1 tests to run
t/gis_proj....# Running: /usr/bin/perl5.8.8 t/gis_proj.t
# PERL5LIB=
t/gis_proj....ok 1/15_fwd_trans(): Projection initialization failed: major axis or radius = 0 or not given
# Looks like you planned 15 tests but only ran 4.
# Looks like your test died just after 4.
t/gis_proj....dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 5-15
Failed 11/15 tests, 26.67% okay

Discussion

  • Judd Taylor
    Judd Taylor
    2008-06-18

    • assigned_to: nobody --> juddtaylor
     
  • Judd Taylor
    Judd Taylor
    2008-06-18

    Logged In: YES
    user_id=1478989
    Originator: NO

    For part one, this looks like an issue with PROJ not being able to find it's defaults files. On linux, the fix is to define the PROJ_LIB environment variable to where the proj files are located:

    [judd@black PDL]$ export PROJ_LIB=/usr/share/proj
    [judd@black PDL]$ ls $PROJ_LIB
    epsg esri GL27 nad27 nad83 nad.lst proj_def.dat world

    When I make RPMs for proj, I put a file in /etc/profile.d to make sure PROJ_LIB is defined properly.

    However, I don't think this is a problem with the PDL lib. It's not PDL's job to ensure that the proj installation is setup properly. It's beyond the scope of a PDL library that is just built on top of the proj library...

    Anyways, to close part one of this issue, please define the PROJ_LIB environment variable and see if that fixes the test failure for you. If so, then I'll consider this issue closed.

    For part two, where it shouldn't be attempting a build if the values are set to 0, please try to set these values to undef, and see if it doesn't work then. If it still tries to build, then I'll go hunt this down.
    I'm pretty sure the Makefile.PL is just checking "if(defined(%PDL_CONFIG{WITH_PRJ}))" rather than "if(%PDL_CONFIG{WITH_PRJ})". I highly prefer the defined() version, since just checking "if(%PDL_CONFIG{WITH_PRJ})" can actually define that hash element to an unknown value.

    Also, I'm not sure that this isn't how the other optional PDLP modules work, since I mostly copied the Makefile.PL code from other parts of PDL. Does setting the other optional modules to 0 disable them as well?

    Thanks,
    Judd

     
  • Chris Marshall
    Chris Marshall
    2008-10-19

    This problem can not be reproduced with the current PDL cvs software. Without additional information, I'm closing out the ticket for the PDL-2.4.4 release. If you have problems that occur with that release, please submit a detailed bug report (please read BUGS in the PDL source distribution and be sure to include the requested information). If you have questions, the perldl mailing list is a good place to ask. Thanks.

     
  • Chris Marshall
    Chris Marshall
    2008-10-19

    • status: open --> closed-works-for-me