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

[netCDF #FQU-594042]: netcdf fortran library not found



Sven,

> thank you very much indeed for your answer on _sunday_! :)
> I changed the order of the both flags but unfortunately the error is
> still the same as before.
> Any additional ideas what could be wrong with my configuration?
> Again I attached the newest buildlog.
> 
> My special interest is on these two lines:
> ---------------------------------------------------------------------------
> checking for library containing nc_inq_libvers... -lnetcdf
> checking for library containing NF_INQ_LIBVERS... no
> ---------------------------------------------------------------------------

You say that the netCDF-Fortran library is installed, but can you see the 
library file 
/usr/local/lib/libnetcdff.a (note the double "f"), which would be the static 
netCDF
Fortran library, with permissions that allow you to read it?  Or, can you see 
the shared
libraries, with names something like:

  lrwxrwxrwx   1 root root      19 Apr  7 13:35 libnetcdff.so -> 
libnetcdff.so.0.0.0
  lrwxrwxrwx   1 root root      19 Apr  7 13:35 libnetcdff.so.0 -> 
libnetcdff.so.0.0.0
  -rwxr-xr-x   1 root root 1182022 Apr  7 13:35 libnetcdff.so.0.0.0

in that directory?  This is assuming you have installed netCDF 4.2 or later, in 
which the 
Fortran library is separated from the C library (and must be built separately, 
after the
C library has been successfully installed, as in ther instructions here:):

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

If instead you built netCDF from an earlier version, such as 4.1.3, in which it 
was still
possible to build both the C and Fortran libraries into a single library (but 
not for shared
libraries, which still had to be different libraries), then you would not see 
the separate
Fortran library.  But in that case, you should be able to still see the defined 
symbol in 
the library, using the "nm" command, as in

  $ nm --defined-only /machine/russ/installs/nc411/lib/libnetcdf.a | grep 
nf_inq_libvers
  0000000000000000 T nf_inq_libvers_

showing "nf_inq_libvers_" is there, with an extra "_" appended to the name by 
the Fortran
compiler.  (If you're not using GNU nm, you might have to grep for the name in 
the output
from nm -a ...).

--Russ

> Again: Thank you for your help (in advance)!
> 
> --Sven
> 
> 
> On 07.04.2013 19:56, Unidata netCDF Support wrote:
> > Hi Sven,
> >
> >> I'm trying to build something which needs the netCDF Fortran library
> >> but it seems like it is not found even though in my opinion I installed
> >> everything neccessary (netCDF and netCDF-fortran). I attached the
> >> buildlog. Any help would be very much appreciated!
> > I see you have set LDFLAGS="-lnetcdf -lnetcdff ".  Instead, try using 
> > LDFLAGS="-lnetcdff -lnetcdf ",
> > because the netCDF Fortran library (-lnetcdff) uses functions in the netCDF 
> > C library (-lnetcdf).
> >
> > --Russ
> >
> > Russ Rew                                         UCAR Unidata Program
> > address@hidden                      http://www.unidata.ucar.edu
> >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: FQU-594042
> > Department: Support netCDF
> > Priority: Normal
> > Status: Closed
> >
> 
> 
> 
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: FQU-594042
Department: Support netCDF
Priority: Normal
Status: Closed