Hi Guiseppe,

Thanks, and well done on the debugging! I will prepare a patch for the
upstream g2clib developers.

Regards

Alastair



On 27/07/2016 20:34, Giuseppe Bilotta wrote:
> Hello Alastair,
>
> I've managed to pinpoint the issue: in 1.6.0, the original Makefile
> defines a -D__64BIT__ which changes the meaning of g2int and g2uint
> from long to int. However, this is wrong on 64-bit Linux where int is
> still 32-bit, not 64-bit. The quick and dirty solution to this is to
> remove the -D__64BIT__ define from the makefile. The long-term
> solution would be to ask the libgrib2c developers to replace the
> conditional definition based on the __64BIT__ macro with an #include
> <stdint.h> and then typedef int64_t gint; typedef uint64_t g2uint,
> which is guaranteed to use the correct dimensions regardless of
> architecture (as long as the host compiler has a stdint.h, which it
> should have since they force gcc now).
>
> Best regards,
>
> Giuseppe Bilotta
>
> On Mon, May 2, 2016 at 4:04 PM, Alastair McKinstry
> <[email protected]> wrote:
>> Hi,
>>
>> Can you point me to somewhere I can get such files (I will work with
>> EUMETSAT to do so, if necessary),
>>
>> and some hints as to what processing you did?
>>
>>
>> thanks
>>
>> Alastair
>>
>>
>> On 02/05/2016 14:36, Giuseppe Bilotta wrote:
>>
>> Package: libgrib2c-dev
>> Version: 1.6.0-2+b1
>> Severity: important
>>
>> Version 1.6.0-2 (and then 1.6.0-2+b1) fail to process correctly all .grb
>> files in our possession (obtained by EUMETSAT). Package version 1.4.0-2
>> (currently in stable) works correctly on those same files..
>>
>>
>> -- System Information:
>> Debian Release: stretch/sid
>>   APT prefers unstable
>>   APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1,
>> 'experimental')
>> Architecture: amd64 (x86_64)
>> Foreign Architectures: i386
>>
>> Kernel: Linux 4.5.0-2-amd64 (SMP w/8 CPU cores)
>> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
>> Shell: /bin/sh linked to /bin/dash
>> Init: systemd (via /run/systemd/system)
>>
>> Versions of packages libgrib2c-dev depends on:
>> ii  libgrib2c0d  1.6.0-2+b1
>>
>> Versions of packages libgrib2c-dev recommends:
>> ii  pkg-config  0.29-4
>>
>> libgrib2c-dev suggests no packages.
>>
>> -- no debconf information
>>
>>
>> --
>> Alastair McKinstry, <[email protected]>, <[email protected]>,
>> https://diaspora.sceal.ie/u/amckinstry
>> Misentropy: doubting that the Universe is becoming more disordered.
>
>

-- 
Alastair McKinstry, <[email protected]>, <[email protected]>, 
https://diaspora.sceal.ie/u/amckinstry
Misentropy: doubting that the Universe is becoming more disordered. 

Reply via email to