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

[netCDF #HHO-361026]: Netcdf 4.2 installation problem on Mac 10.7.4



Hi Andreas,

> I have been trying to install netcdf-fortran version 4.2 but I cannot get the 
> netcdf tests pass. Here is what I get:
> 
> /bin/sh ../libtool --tag=FC   --mode=link gfortran  -I../fortran -I../f90 
> -I../f90  -g -O2   -o tst_f90 tst_f90.o ../fortran/libnetcdff.la
> libtool: link: gfortran -I../fortran -I../f90 -I../f90 -g -O2 -o 
> .libs/tst_f90 tst_f90.o  ../fortran/.libs/libnetcdff.dylib

The above line indicates that it's using the Fortran library in 
libnetcdff.dylib, but not the C netCDF library,
which needs to have been already installed before you try to build the Fortran 
library, since Fortran netCDF
calls C netCDF functions.

For the instructions you should be using, see:

  http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-fortran-install.html

and in particular, make sure you use the configure option (or environment 
variable
setting 

   ... CPPFLAGS=-I{DIR1}/include LD_LIBRARY_PATH={DIR1}/lib LDFLAGS=-lnetcdf

as described in step 3 of the instructions, where "DIR1}" is where you installed
the netCDF C library.

--Russ

> make  check-TESTS
> dyld: Symbol not found: _ncerr
> Referenced from: 
> /Users/andreasm/Downloads/netcdf-fortran-4.2/fortran/.libs/libnetcdff.5.dylib
> Expected in: flat namespace
> in 
> /Users/andreasm/Downloads/netcdf-fortran-4.2/fortran/.libs/libnetcdff.5.dylib
> /bin/sh: line 1: 19372 Trace/BPT trap: 5       ${dir}$tst
> FAIL: nf_test
> 
> *** Copying file with fill values.
> *** SUCCESS!
> PASS: create_fills.sh
> dyld: Symbol not found: _ncerr
> Referenced from: 
> /Users/andreasm/Downloads/netcdf-fortran-4.2/fortran/.libs/libnetcdff.5.dylib
> Expected in: flat namespace
> in 
> /Users/andreasm/Downloads/netcdf-fortran-4.2/fortran/.libs/libnetcdff.5.dylib
> /bin/sh: line 1: 19395 Trace/BPT trap: 5       ${dir}$tst
> FAIL: tst_f90
> ================================================
> 2 of 3 tests failed
> Please report to address@hidden
> ================================================
> make[2]: *** [check-TESTS] Error 1
> make[1]: *** [check-am] Error 2
> make: *** [check-recursive] Error 1
> 
> 
> I used the following configuration on a mac.
> 
> ./configure CC=gcc CPPFLAGS=-I/opt/local/include FC=gfortran 
> --prefix=/usr/local/netcdf
> 
> and did:
> 
> make && make check
> 
> Any help is appreciated!
> 
> Thanks,
> Andreas
> 
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: HHO-361026
Department: Support netCDF
Priority: Normal
Status: Closed