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

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



Keith,

> Thanks for the feedback! I apologize for my lack of knowledge here. I am new
> to linux and using makefiles, etc. I've always used visual studio in the past.
> I downloaded the netCDF C Library source code for 4.3.0. I unzipped the file
> to /usr/local/src/netcdf-4.3.0/. It says that it built and installed
> successfully using the following commands.
> 
> ./configure --disable-dap --disable-netcdf-4
> make check install
> 
> However, I cannot find a file named libnetcdf.so.7. Where should I be able to
> locate this file if the build was successful?

The default installation is in /usr/local/, so the library should be in 
/usr/local/lib/,
the header file should be in /usr/local/include/, and the utilities shuld be in 
/usr/local/bin/.  If you want things installed somewhere else, you need to use 
the
--prefix=/some/where/else option to configure.

If things are not where you expect, you could send us the config.log file to 
help
determine what happened.

--Russ

> -----Original Message-----
> From: Unidata netCDF Support [mailto:address@hidden
> Sent: Tuesday, June 25, 2013 2:20 PM
> To: Weber, Keith E
> Cc: address@hidden
> Subject: [netCDF #ZVD-828686]: compile error cannot compute sizeof (off_t)
> 
> Keith,
> 
> > > 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 C 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 netCDF-3 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:
> 
> http://www.unidata.ucar.edu/netcdf/docs/build_classic.html
> http://www.unidata.ucar.edu/netcdf/docs/build_default.html
> 
> The instructions for building netCDF Fortran 4.2 and how to tell it where the
> netCDF C library is installed are here:
> 
> http://www.unidata.ucar.edu/netcdf/docs/netcdf-fortran-install.html
> 
> --Russ
> 
> 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
> 
> 
> 
> 

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.