Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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

[netCDF #AEZ-159622]: undefined reference to"



> Hello all netCDFgroup,
> 
> I try to install netcdf-4.0.1 on Ubuntu 8.04.3 LTS and use with
> gfortran compiler version 4.2.
> export CC=cc
> export CXX=c++
> export FC=gfortran
> export F77=gfortran
> export CFLAGS=-g -O2
> export CFLAGS="-g -O2"
> export CXXFLAGS="-g -O2"
> export FCFLAGS="-g -O2"
> export F77FLAGS="-g -O2"
> export CPPFLAGS="-Df2cFortran"
> ./configure --prefix=/home/flood/EUROMODEL/GLDAS_psurf/netcdf-4.0.1/
> 

Try again without setting CPPFLAGS. -Df2cFortran is not the correct choice for 
gfortran 4.2. Let the configure script set this for you. Just leave CPPFLAGS 
alone.

Also, '-g -O2' is the default setting for builds using the gnu tool-chain, so 
you don't have to set CFLAGS, CXXFLAGS, FCFLAGS, or F77FLAGS.

CC will be set to cc unless you have xlc installed, which is unlikely on Linux, 
and you don't need to set FC to gfortran unless you have multiple fortran 
compilers installed on this machine.

Finally, you don't need to set F77 if you are using the same Fortran compiler 
for the F77 and F90 APIs.

So try:

./configure --prefix=/home/flood/EUROMODEL/GLDAS_psurf/netcdf-4.0.1/

(That is, don't set any environment variables.)

Please let me know if this doesn't help.

Thanks,

Ed


Ticket Details
===================
Ticket ID: AEZ-159622
Department: Support netCDF
Priority: Normal
Status: Closed


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690