Skip Menu |

This queue is for tickets about the PDL-NetCDF CPAN distribution.

Report information
The Basics
Id: 80379
Status: open
Priority: 0/
Queue: PDL-NetCDF

People
Owner: Nobody in particular
Requestors: ppoilbarbe [...] cls.fr
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 4.07
  • 4.08
  • 4.09
  • 4.10
  • 4.11
  • 4.12
  • 4.13
  • 4.14
  • 4.15
  • 4.16
Fixed in: (no value)



Subject: Invalid integer size for some 32bits perl build
Perl distributed with 32bits Ubuntu 12.04 is based upon 64bits integers. Functions in PDL::NetCDF (like nc_get_vara_double) using size_t need 32 bits integer. Integer size is determined with $Config{'ivsize'} which is not accurate for these builds of perl. perl -V shows: Summary of my perl5 (revision 5 version 14 subversion 2) configuration: Platform: ... use64bitint=define, ... So $Config{'ivsize'} is 8 and it should be 4. Using $Config{'sizesize'} gives 4 on 32bits platforms and 8 on 64bits platforms ('sizesize' is the size of size_t). Joined is a patch which corrects this.
Subject: processor-architecture
Download processor-architecture
application/octet-stream 265b

Message body not shown because it is not plain text.

On Wed Oct 24 09:44:19 2012, PhP wrote: Show quoted text
> > So $Config{'ivsize'} is 8 and it should be 4. > Using $Config{'sizesize'} gives 4 on 32bits platforms and 8 on 64bits > platforms ('sizesize' is the size of size_t). > > Joined is a patch which corrects this.
I've been using a similar patch (on MS Windows) which, I think, takes some extra precautions: --- netcdf.pd_orig 2013-03-08 16:33:31 +1100 +++ netcdf.pd 2013-03-08 16:36:55 +1100 @@ -1013,7 +1013,10 @@ use constant DEBUG => 0; EOPM -if ($Config{'ivsize'} == 8) { pp_addpm (' +my $SIZE = $Config{'sizetype'} eq 'size_t' + ? $Config{'sizesize'} + : $Config{'ivsize'}; +if ($SIZE == 8) { pp_addpm (' use constant PACKTYPE => "Q*"; '); } else { pp_addpm (' Not sure that those "extra precautions" are necessary. I'm sure I've notified the author of this - I don't see any bug report, so perhaps it was via personal email or the pdl-porters mailing list. Anyway, it's disappointing that the issue still remains with the release of 4.17. Cheers, Rob