[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #FXS-621687]: FW: Problem make check NetCDF Fortran "undefined reference to"
- Subject: [netCDF #FXS-621687]: FW: Problem make check NetCDF Fortran "undefined reference to"
- Date: Wed, 12 Feb 2014 10:21:16 -0700
Hi Ana,
> I am trying to install NetCDF in my Dell PowerEdge T605 workstation with
> Red Hat Enterprise 5.0 and a Linux 32 bit installed. I added all the
> environment variables as indicated in the instructions and run NetCDF C
> successfully (all the checks were good). I then proceeded to the NetCDF
> F directory. I added the extra environment variables to show netCDF
> where to find the libraries and run ./configure -prefix=(mydir) . The
> configure run OK. However, when running make check, I get the following
> bunch of messages:
>
> ./fortran/.libs/libnetcdff.a(fort-varsio.o): in fuction 'nf_put_vars'
> (mydir) - fortran4.2/fortran/./fort-varsio.c:161: undefined reference to
> 'nc_put_vars'
> ./fortran/.libs/libnetcdff.a(fort-varsio.o): in fuction 'nf-put-vars'
It appears that you haven't installed the netCDF C library by running
"make install" (or "sudo make install") after running "make check. You
should install the netCDF C library before trying to build and install
the netCDF Fortran library, as described here:
http://www.unidata.ucar.edu/netcdf/docs/netcdf-fortran-install.html
Make sure you specify a directory under which to install the bin/, lib/,
and include/ directories for the netCDF C library using the --prefix=
option of the configure script, unless you want to accept the default
location of --prefix=/usr/local/, and then set LD_LIBRARY_PATH to include
the lib/ directory of that location before trying to build the netCDF
Fortran library.
You also should check that you don't have a previously installed netCDF
C library in /usr/lib or some other location searched by default for
shared libraries. If there is a previously built netCDF C library that
was built for a different Fortran compiler, you would get the kind of
error messages you are seeing.
--Russ
> And so on. I am compiling with Portland Group Fortran and C compiler
> version 14.1. I am building netcdf with -disable-netcdf-4 and -disable-dap
> options.
>
> I previously built NetCDF with HDF5.0 and zlib successfully with my pgi
> fortran compiler, but had to re-start with clean directories (meaning that
> I did untar the directories again and removed all supporting directories
> /lib /bin and /include) because I/O API recommended to do so to skip
> having to define the location of all the HDF libraries upon building
> the program.
>
> Please help!
>
> Thanks,
>
> Ana Alvarez
>
>
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: FXS-621687
Department: Support netCDF
Priority: Normal
Status: Closed