Update: Ted Mansell very kindly noted that I needed to add the
'--enable-netcdf-4' option to ./configure for netcdf-4.3.3.1 (ie the C version).
Sadly, that didn’t make any difference to the error.
The steps I’m taking, in full, are:
~/Downloads/netcdf-fortran-4.4.2] ianharris% setenv CPPFLAGS
-I/usr/local/include
~/Downloads/netcdf-fortran-4.4.2] ianharris% echo $CPPFLAGS
-I/usr/local/include
~/Downloads/netcdf-fortran-4.4.2] ianharris% setenv LDFLAGS -L/usr/local/lib
~/Downloads/netcdf-fortran-4.4.2] ianharris% echo $LDFLAGS
-L/usr/local/lib
~/Downloads/netcdf-4.3.3.1] ianharris% ./configure --prefix=/usr/local
--enable-netcdf-4
~/Downloads/netcdf-4.3.3.1] ianharris% make check
~/Downloads/netcdf-4.3.3.1] ianharris% sudo make install
~/Downloads/netcdf-4.3.3.1] ianharris% cd ../netcdf-fortran-4.4.2
~/Downloads/netcdf-fortran-4.4.2] ianharris% ./configure
~/Downloads/netcdf-fortran-4.4.2] ianharris% make check
I don’t think the —prefix option, or the set flags, are necessary as /usr/local
should be the default? But included anyway.
Cheers
Harry
> On 20 Apr 2015, at 13:46, I wrote:
>
> Hi,
>
> As a result of NCAR changing to HDF5 I’ve been trying to upgrade my NetCDF
> libraries. I’m on a Power Mac running OS X 10.10.2. I usually have NetCDF C
> and NetCDF Fortran installed as I need both.
>
> Following the following web pages:
>
> http://www.unidata.ucar.edu/software/netcdf/docs/build_default.html
> <http://www.unidata.ucar.edu/software/netcdf/docs/build_default.html>
>
> http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-fortran-install.html
> <http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-fortran-install.html>
>
> I successfully installed HDF5 (1.8.13), zlib (1.2.8). I already have curl
> (7.37.1).
>
> I successfully installed NetCDF for C (4.3.3.1).
>
> However, I’m getting an error for netcdf-fortran when I make check:
>
> gfortran -DHAVE_CONFIG_H -I. -I.. -I../libsrc -I../fortran -I../fortran
> -m64 -c -o ftst_rengrps.o ftst_rengrps.F
> ftst_rengrps.F:49.48:
>
> call check(nf_create(FILE_NAME, NF_NETCDF4, ncid))
> 1
> Error: Symbol 'nf_netcdf4' at (1) has no IMPLICIT type
> make[2]: *** [ftst_rengrps.o] Error 1
> make[1]: *** [check-am] Error 2
> make: *** [check-recursive] Error 1
>
> It seems to not be seeing /usr/local/include/netcdf.inc, which is there. All
> locations are defaults, I’ve also tried specifying them explicitly (ie, with
> LDFLAGS, CPPFLAGS etc).
>
> So what stupid mistake have I made? Given that that is what it always is :)
>
> Cheers
>
> Harry
Ian "Harry" Harris
Climatic Research Unit
School of Environmental Sciences
University of East Anglia
Norwich NR4 7TJ
United Kingdom
IMPORTANT NOTICE - This email is intended for the named recipient only. It may
contain privileged and confidential information. If you are not the intended
recipient, notify the sender immediately and destroy this email. You must not
copy, distribute or take action in reliance upon it. Whilst all efforts are
made to safeguard emails, The School of Environmental Sciences cannot guarantee
that attachments are virus free or compatible with your systems and does not
accept liability in respect of viruses or computer problems experienced.