[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #KDV-286604]: Failure building netcdf fortran-4.4.0
- Subject: [netCDF #KDV-286604]: Failure building netcdf fortran-4.4.0
- Date: Thu, 24 Jul 2014 07:09:20 -0600
James,
You asked:
> > I have a new Mac running OSX 10.9.4
> >
> > I successfully built the netcdf C libraries in the standard location
> > (/usr/local). I don’t have the HDF library, so I used
> >
> > ./configure —disable-netcdf-4
> >
> > For the netcdf-fortran-4.4.0 build, I used
> >
> > ./configure (no options)
> >
> > which successfully completed (config.log attached).
> >
> > make check produced the errors listed below. Where have I erred? Do I need
> > to use an earlier version because I disabled netcdf-4 in the C libs?
I should add that for the netcdf-fortran-4.4.0 build, you needed to have set
environment variables CPPFLAGS, LDFLAGS, and DYLD_LIBRARY_PATH to specify
where the netCDF-C library was installed, as described in these instructions:
http://www.unidata.ucar.edu/netcdf/docs/building_netcdf_fortran.html
and it looks like those were not set, according to the config.log you supplied.
But the configure script found a netCDF-3 C library anyway:
configure:20332: gcc -o conftest -g -O2 conftest.c -lnetcdf >&5
ld: warning: directory not found for option '-Lusr/local/lib'
configure:20332: $? = 0
configure:20349: result: -lnetcdf
which makes me think that maybe you had previously installed netCDF in /usr
(you can check for /usr/lib/libnetcdf* and /usr/include/netcdf.h to see if this
is the case).
However, I've verified that netcdf-fortran-4.4.0 still has the problem that it
can't
be built without a netCDF-4 library.
Rather than building from the GitHub commit I mentioned in the previous
response,
which would require that you run "autoreconf -if" to generate a "configure"
script,
an easier workaround now would be to just build and install HDF5 on yourMac,
followed by building and install netCDF-4.3.2 without using --disable-netcdf-4.
If you then build and install netcdf-fortran-4.4.0, it will work fine as a
netCDF-3
library, supporting the classic netCDF-3 format as the default. The HDF5 build
on
OSX is easy (or there are prebuilt binaries provided), and we've tested that the
resulting netcdf-fortran library builds and works fine on OSX.
--Russ
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: KDV-286604
Department: Support netCDF
Priority: Normal
Status: Closed