[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #ZVD-828686]: compile error cannot compute sizeof (off_t)


> > I am attempting to build the netcdf-fortran-4.2 source code. I am
> > receiving the following error.
> >
> > checking size of off_t. configure: error: in
> > /usr/local/src/netcdf-fortran-4.2:
> > configure: error: cannot compute sizeof (off_t) See config.log for
> > more details
> >
> >
> > I've attached the config.log file. Any help would be greatly appreciated!

From config.log:

  configure:19770: gcc -o conftest -g -O2   conftest.c -lnetcdf  >&5
  configure:19770: $? = 0
  configure:19770: ./conftest
  ./conftest: error while loading shared libraries: libnetcdf.so.7: cannot open 
shared object file: No such file or directory

It looks like you have to set LD_LIBRARY_PATH to include the directory where
the netCDF C library is installed, or install it someplace where it will be
found by default, such as /usr/lib.

The link failure might also be due to having an older netCDF library built with 
a compiler incompatible with the gcc you're using.

In any case, you might consider instead building a recent version of the netCDF 
library first, preferably 4.3.0 but at least 4.2, which was when the C and
Fortran netCDF libraries were separated into independent distributions.  You can
build it with the configure option --disable-netcdf-4 if you just want the 
APIs and formats.  Otherwise, you would also have to get and install HDF5 first.

The instructions for building without and with the netCDF-4 APIs are here:


The instructions for building netCDF Fortran 4.2 and how to tell it where the 
C library is installed are here:



Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu

Ticket Details
Ticket ID: ZVD-828686
Department: Support netCDF
Priority: Normal
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.