#856055 dx: NetCDF import broken on amd64

Package:
dx
Source:
dx
Description:
OpenDX (IBM Visualization Data Explorer) - main package
Submitter:
Timo Korvola
Date:
2024-08-25 10:21:03 UTC
Severity:
normal
Tags:
#856055#5
Date:
2017-02-24 20:20:26 UTC
From:
To:
Import of NetCDF files produces incorrect integer values on systems
where long is not 32 bits.  This can be seen by running the attached
nctest.net and importing nctest.nc.  The file can be inspected with
ncdump.  The connections, being int valued, will be imported incorrectly.

The attached patch should fix the problem.  The erroneous code assumed
that the NetCDF type NC_LONG corresponds to long.  However, NC_LONG is a
deprecated alias for NC_INT and by definition 32 bits, whereas long
varies by platform.  These days it is better to leave such type
conversions to the NetCDF library, which provides likely more efficient
and correct routines.

The patch also fixes a debug output routine, which casts pointers into
unsigned int for printing.  It seems that the routine is never called
but at least compiler warnings are eliminated.

#856055#12
Date:
2017-08-11 11:01:22 UTC
From:
To:
Hi Timo

Thanks for the bug report, test case and patch!

I have confirmed the reported behaviour on amd64 and verified that the
patch doesn't break i386.  I've committed your patch to git [1],
slightly reformatted to minimize the diff.

Regards
Graham


[1]
https://anonscm.debian.org/cgit/debian-science/packages/dx.git/commit/?id=597ea9b0ccd18dcc75541d0b6793c94e28bddd8f

#856055#19
Date:
2017-08-11 11:49:28 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
dx, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 856055@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Graham Inggs <ginggs@debian.org> (supplier of updated dx package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Fri, 11 Aug 2017 11:15:41 +0000
Source: dx
Binary: dx libdx4 libdx4-dev dx-doc
Architecture: source
Version: 1:4.4.4-10
Distribution: unstable
Urgency: medium
Maintainer: Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Changed-By: Graham Inggs <ginggs@debian.org>
Description:
 dx         - OpenDX (IBM Visualization Data Explorer) - main package
 dx-doc     - OpenDX (IBM Visualization Data Explorer) - documentation
 libdx4     - OpenDX (IBM Visualization Data Explorer) - shared libraries
 libdx4-dev - OpenDX (IBM Visualization Data Explorer) - development files
Closes: 853380 856055
Changes:
 dx (1:4.4.4-10) unstable; urgency=medium
 .
   * Fix FTBFS with GCC 7 (Closes: #853380)
   * Switch to debhelper 10
   * Fix more spelling errors in binaries and manpages, thanks Lintian
   * Update Lintian overrides
   * Use secure URIs for Vcs-* fields
   * Bump Standards-Version to 4.0.1, no further changes
   * Add Build-Conflicts on libgraphicsmagick-dev
   * Ship PNG icon instead of XPM
   * Fix NetCDF import on 64-bit architectures,
     thanks Timo Korvola (Closes: #856055)
Checksums-Sha1:
 149858b6197301103d3634fc52958124758b9122 2382 dx_4.4.4-10.dsc
 e9a8fd496aef605e6bfa4a06be6c5f1499cb9f80 72088 dx_4.4.4-10.debian.tar.xz
Checksums-Sha256:
 73f18ef17cd974d94934554b0445d7644bdc2cd0967562aa7d6f12c01a11c6d1 2382 dx_4.4.4-10.dsc
 41837576739ff87f00c462c603618d267caff3e25dd63ba5816188a0fbd7821d 72088 dx_4.4.4-10.debian.tar.xz
Files:
 6ccfaa779aafa8c100784dccbeb13dbe 2382 science optional dx_4.4.4-10.dsc
 38330ace7141d601a12cb878cb7480f4 72088 science optional dx_4.4.4-10.debian.tar.xz
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJZjZMfAAoJEK/P7I5mnOHCeX8P/2XPDa9oFEi4io3AcDq60Tze
lSazkepZCzMXOjt9Gt9By8g2kIaJ5i/rDZcgn3qPR9OP0LnrPCTuOIdPKunSqY2D
A3JdtlphOBCnfzTkwB90d9JcpiIJazfNxQ0CwJqUdWBIIpfp1sE4Hinc0wXJKBNw
ZI3NNMsPkPr2lGau+6LgT1LOymTQ8X1qSDwC6I1GqEvOqNl5BhSjr5d9eiaJCtq2
jl6m9O6hmZ/cLzilNi/ef+2wNnXyqAdCmw1cKedDtdf0jI7UsGxPEnV55uw/1+dk
HJE2TjksWHiRzFwwH79PPjejkpirlNiyvrcMnnxdNwkRJdE0j4P4wIfrUzWBdBsY
UUS2eiUy9O2quYjEOlS04Z/tLqGSX9tu8OY+B2wRKrWpbahNAWDKIMZnF/DS6J6d
aqdEP6McMqM/QzMBk6qWt8UbXaH7PGyWgHF3KQVt6/buKEWHHEE9ARFYElnyvx8W
vWiGFWnvVU+828dK1VWh97DLWSWH6hqHZ+0L/vW1EE32xmSroddfPma+RbBwM7IN
c6eIJzAOKP3VU4BM2LKAf2OMqI68UfJPcMLtj7tFqGXayOKkbV7uirMxIOcv+rT2
vbUbTyHcdjW7sKY+1ydc06T0CgU8X8Zilx9kPLmXuPwvdyl+BFZcND3EANBAy/Dq
RvnGRH3sSiP1pnImnMv9
=5WNE
-----END PGP SIGNATURE-----