Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 
Known Problems with NetCDF Distributions

This is where we document some reported problems releases of netCDF, and their workarounds. For more help see the build and test output for netCDF test plaforms, the list of other builds of netCDF, and the NetCDF Installation and Porting Guide.

Get the current release of netCDF from the netCDF home page.

Known Problems with netCDF 4.0

Ncdump assumes default fill value for unsigned byte data

The ncdump utility incorrectly assumes a default fill value of "255" for data of unsigned byte type, although no default fill value is assumed for data of type signed byte. There should be no default fill values when reading any byte type, signed or unsigned, because the byte ranges are too small to assume one of the values should appear as a missing value unless a _FillValue attribute is set explicitly. This bug is fixed in the current snapshot distribution.

Ncdump of compound type with array field

Running the ncdump utility on a file with a compound type with an array field may result in a segmentation violation. A fix is in the current netCDF-4.0 snapshot distribution.

Memory leak with VLEN attributes

We believe there are some memory leaks associated with VLEN attributes in HDF5 1.8.1. This is being addressed by the HDF5 team, and will be fixed by the next HDF5 release.

Error dyld: Symbol not found: _H5P_CLS_FILE_ACCESS_g

On some Macintosh systems here at NetCDF World Test Center, on the hundreth floor of UCAR Tower #2, the following build error occurs:

*** Checking HDF5 enum types.
*** Checking simple HDF5 enum type...ok.
*** Checking HDF5 enum type missing values...ok.
*** Tests successful!
PASS: tst_h_enums
dyld: Symbol not found: _H5P_CLS_FILE_ACCESS_g
  Referenced from:
  /tmp/n4_sid/netcdf-4.0-snapshot2008042320/libsrc4/.libs/libnetcdf.5.dylib
  Expected in: flat namespace

FAIL: tst_lists
dyld: Symbol not found: _H5P_CLS_FILE_ACCESS_g
  Referenced from:
  /tmp/n4_sid/netcdf-4.0-snapshot2008042320/libsrc4/.libs/libnetcdf.5.dylib
  Expected in: flat namespace

FAIL: tst_dims
dyld: Symbol not found: _H5P_CLS_FILE_ACCESS_g
  Referenced from:
  /tmp/n4_sid/netcdf-4.0-snapshot2008042320/libsrc4/.libs/libnetcdf.5.dylib
  Expected in: flat namespace

etc.

This is caused by the -O2 parameter in the build. Set CFLAGS to -g and try again.


Known Problems with netCDF 3.6.3


Can't build shared library with F90 API on IRIX

When building shared libraries on out IRIX test system, I got the following error:

ld32: FATAL   12 : Expecting n32 objects: /lib/libc.so.1 is o32.

Obviously there is some ABI confusion here, but we don't know how to resolve it. Any user who can solve this should email support-netcdf@unidata.ucar.edu so that we can share the method with other users.


Known Problems with netCDF 3.6.2


Setting ARFLAGS does not work

Sometimes when building netCDF, flags to the ar utility need to be set. Setting ARFLAGS does not work.

(Note: If you are doing this to build 64-bit libraries on an AIX platform, the most fool-proof way to built 64-bit applications under AIX is to set the OBJECT_MODE environment variable to 64. If you still feel you must setr flags for ar, read on.)

Try the build again, setting AR_FLAGS instead of ARFLAGS.

Bugs in support for variables larger than 4 GiB

As first reported by Mario Emmenlauer, there is a bug in netCDF-3.6.2 (and earlier versions) in the code for creating byte and short type variables greater than 4 GiB in size. This problem resulted in an assertion violation or arithmetic exception that would have caused a program to halt, rather than writing bad data or corrupting existing data.

A fix is available as a patch to the file libsrc/var.c in the netcdf-3.6.2 distribution. The bug is also fixed in the latest netCDF-3 snapshot release.

  1. On 32-bit platforms (with size_t an unsigned 32-bit type):
  2. On 64-bit platforms (with size_t an unsigned 64-bit type):

Bug in C++ interface prevents creating 64-bit offset format files

As reported by Jos Verdoold, a bug in the netCDF 3.6.2 (and earlier versions) C++ interface prevents creating new files in Offset64Bits mode using the C++ API. The fix is to change two lines (378 and 393) in the file src/cxx/netcdf.cpp, changing "=" to "|=" in each line, then rebuild:

378c378
< 	mode = NC_WRITE;
---
> 	mode |= NC_WRITE;
393c393
< 	mode = NC_NOCLOBBER;
---
> 	mode |= NC_NOCLOBBER;

This fix has been incorporated into the next version and into the current snapshot.

The tests in nf_test fail with seg fault with the Absoft Version 10.0 fortran compiler.

The absoft fortran compiler, version 10.0, changes the way that a C function returning string is called from fortran.

This causes the absoft fortran settings in cfortran.h to no longer work, and this is reflected in a segmentation fault in the test program nf_test/nf_test.

As a workaround, users with absoft version 10 can get the latest netCDF-3 snapshot and build it with the --enable-absoft10-hack option set.

Get the snapshot, and see the working output, on the netCDF-3 snapshot page.

Shared libraries do not work with the NAG fortran compiler.

We have reports that the shared library build does not work with the NAG fortran compiler. The NAG compiler is not one of the compilers we current support (and test on) at Unidata. The only known work around is to build without the --enable-shared option.

Any user who can debug this problem with the NAG compiler should send the resuts to support-netcdf@unidata.ucar.edu, so that it can be incorporated into the netCDF distribution.

Interested users may also wish to subscribe to the netcdf-porting mailing list.

The documented --enable-64bit option doesn't work.

The --enable-64bit option appeared in the 3.6.1 release, and was-- removed for the 3.6.2 release.

Unfortunately, the documentation was not updated, so that the 3.6.2 documentation still mentions the enable-64bit option. Sorry about that.

The documentation has been corrected for the netCDF-3 snapshot and the netCDF-4 snapshot documentation.

Building netCDF-3.6.2 with gfortran version 4.2.x or 4.3.x fails.

Something changed in gfortran version 4.3 relating to how fortran functions can call C functions.

In netCDF, the interface between C and Fortran is handled by the cfortran.h package, which requires a pre-processor define describing the type of fortran you are using.

For gfortran up to version 4.1.x, the netCDF distribution builds cleanly with the "gFortran" preprocessor symbol set. For gfortran 4.2.x and greater, the "pgiFortran" preprocessor symbol works.

The 3.6.2 build uses "gFortran", unless you specifically set the CPPFLAGS environmental variable to "-DpgiFortran".

This works in my bash shell:

FC=gfortran CPPFLAGS=-DpgiFortran ./configure && make check

This problem has been fixed in the netCDF-3 snapshot. Now configure checks the version of gfortran before setting the appropriate flag.

Building shared libraries on Macintosh with g95 fails.

Building shared libraries on the Macintosh fails

 
*** Testing netCDF-3 Fortran 90 API.
dyld: lazy symbol binding failed: Symbol not found: __g95_size
  Referenced from:
  /tmp/n3_mort/netcdf-3.6.2-snapshot2007052501/fortran/.libs/libnetcdff.4.dylib
  Expected in: flat namespace

dyld: Symbol not found: __g95_size
  Referenced from:
  /tmp/n3_mort/netcdf-3.6.2-snapshot2007052501/fortran/.libs/libnetcdff.4.dylib
  Expected in: flat namespace

FAIL: tst_f90
=========================================
1 of 5 tests failed
Please report to support@unidata.ucar.edu
=========================================

Building shared libraries on HPUX with native tools results in only static libraries.

On the only HPUX machine I have access to for testing, the --enable-shared still results in only the static library being linked.

This may be because of and old C++ compiler on this particular platform. Any HPUX use who can provide information about this should send email to support-netcdf@unidata.ucar.edu. bash-2.04$ uname -a HP-UX tweety B.11.00 A 9000/785 2004553471

Building shared libraries on AIX fails.

On the Unidata AIX platforms, the shared netCDF build fails with either the Fortran or C++ compilers, like this:

make  check-TESTS
*** Creating fills.nc.
*** SUCCESS!
PASS: create_fills.sh
/bin/sh: 16012 Segmentation fault(coredump)
FAIL: nf_test
/bin/sh: 16018 Segmentation fault(coredump)
FAIL: tst_f77_v2
/bin/sh: 16024 Segmentation fault(coredump)
FAIL: ftest
=========================================
3 of 4 tests failed
Please report to support@unidata.ucar.edu
=========================================

If built without fortran or C++, the build succeeds, but shared libraries are not built. (Static libraries are).

I don't know what is causing this. If any AIX users can shed any light, that would be most helpful.

Shared builds also fail the same way when using GNU compilers.

Building with older versions of g++ fails.

The build fails like this:

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../fortran -DDEBUG -I../libsrc -g -O2 -MT netcdf.lo -MD -MP -MF .deps/netcdf.Tpo -c netcdf.cpp -o netcdf.o
In file included from /opt/gnu/gcc/include/c++/3.2/powerpc-ibm-aix5.0.0.0/bits/c++io.h:35,
                 from /opt/gnu/gcc/include/c++/3.2/bits/fpos.h:44,
                 from /opt/gnu/gcc/include/c++/3.2/iosfwd:46,
                 from /opt/gnu/gcc/include/c++/3.2/ios:44,
                 from /opt/gnu/gcc/include/c++/3.2/ostream:45,
                 from /opt/gnu/gcc/include/c++/3.2/iostream:45,
                 from netcdf.cpp:13:
/opt/gnu/gcc/include/c++/3.2/cstdio:108: `fgetpos' not declared
/opt/gnu/gcc/include/c++/3.2/cstdio:110: `fopen' not declared
/opt/gnu/gcc/include/c++/3.2/cstdio:115: `freopen' not declared
/opt/gnu/gcc/include/c++/3.2/cstdio:118: `fsetpos' not declared
netcdf.cpp: In member function `NcBool NcVar::set_cur(long int, long int, long 
   int, long int, long int)':

This happens in old versions of g++ when large files are used. To fix this, either upgrade your g++ compiler, or else use --disable-largefile with configure, to turn off large file handling.

The .NET build files are not included in the 3.6.2 release.

The netCDF 3.6.2 release does not contain the .NET build files. Whoops! Sorry about that.

.NET users should use the latest snapshot, or continue to use the 3.6.1 release.

This is now fixed in the netCDF-3 snapshot. Get the snapshot from the netCDF-3 snapshot build page.

Snapshot .NET build files do not work for Visual Studio 8.0 beta.

A user has reported that Visual Studio .NET version 8.0 beta does not build with the netCDF .NET build files in win32/NET.

Interested users may also wish to subscribe to the netcdf-porting mailing list.

The -disable-v2 option causes the fortran build to fail with some fortran compilers.

The netCDF version 2 API is maintained for backward compatibility. We are committed to maintaining the V2 API for all future releases of netCDF. However, the --disable-v2 option is provided -- for users who wish to compile the netCDF libraries without the V2 API.

The --disable-v2 option will cause the fortran build to fail on some fortran 95 compilers because the netcdf.inc file still includes the names of the V2 API functions. (Other fortran 90 compilers ignore these).

If your compiler fails with --disable-v2, you can either refrain from using this option (that is, build the v2 API as well as the V3 API), or you can get the netCDF-3 snapshot.

This is fixed for future releases of netCDF.

The --disable-c option does not work.

The --disable-c option should turn off the building of the netCDF C library for use with --enable-separate-fortran (to save a small amount of tme building and testing. However this does not happen. The C library is built in any case.

Users may ignore this option in version 3.6.2. It is fixed in the netCDF-3 snapshot and for future releases of netCDF.

Known Problems with netCDF 3.6.1