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

20040407: compiling netCDF library on Llinux



>From: Chul Eddy Chung <address@hidden>
>Organization: Scripps Institution of Oceanography
>Keywords: 200404072040.i37KecCT015750 netCDF pgF90 Intel

Hi Chul,

>I downloaded netcdf-3.5.1 tar package, and am trying to compile on my 
>Linux machine (kernel: 2.4).  I have two linux machines.  On one 
>machine, I have PGI, and on the other one I have Intel f90.  In two 
>various, I tried various options by setting environments (such as 
>"export CC=pgcc").  I tried various combinations of gcc, c++, pgcc, 
>pgCC, pgf90, f90 (intel fortran), f77, etc., and I get similar 
>compilation messages when I executed "Makefile".

You are missing one environment variable definition.  Please try
the following for your PGI build.  First, set the environment
variables as follows:

# Define environment variables
CC=pgcc
CPPFLAGS='-DNDEBUG -DpgiFortran'
CFLAGS=-O
FC=pgf90
FFLAGS='-O -w'
CXX=pgCC

Next:

make distclean

Then:

./configure

If this works (it should):

make

Please let us know if this solves your problem.

The above settings were taken from the Installation instructions for
the netCDF:

http://my.unidata.ucar.edu/content/software/netcdf/INSTALL.html

For information on using the Intel Fortran compiler, please review:

http://www.unidata.ucar.edu/packages/netcdf/other-builds.html#intel-ifc

Cheers,

Tom Yoksas

>Here is the log:
>
>On the machine having intel f90:
>[Eddy@cocos src]$ configure
>creating cache ./config.cache
>checking for top-level source-directory
>/home/Eddy/temp/netcdf-3.5.1/src
>checking for m4 preprocessor
>checking for m4... m4
>checking m4 flags... -B10000
>checking C compiler "gcc"... works
>checking how to make dependencies... false
>checking for c++... c++
>checking C++ compiler "c++"... works
>checking how to run the C preprocessor... gcc -E
>checking user-defined Fortran-77 compiler "f77"... works
>checking for Fortran .F compiler...
>checking if Fortran-77 compiler handles *.F files... yes
>checking user-defined Fortran-90 compiler ""... failed to compile test 
>program
>configure: warning: The Fortran-90 interface will not be built
>checking for nm utility
>checking for nm... nm
>checking nm flags...
>checking for C-equivalent to Fortran routine "SUB"... sub_
>checking for Fortran "byte"... yes
>checking for Fortran "integer*2"... yes
>checking if Fortran "byte" is C "signed char"... yes
>checking if Fortran "byte" is C "short"... no
>checking if Fortran "byte" is C "int"... no
>checking if Fortran "byte" is C "long"... no
>checking if Fortran "integer*2" is C "short"... yes
>checking if Fortran "integer*2" is C "int"... no
>checking if Fortran "integer*2" is C "long"... no
>checking if Fortran "integer" is C "int"... yes
>checking if Fortran "real" is C "float"... yes
>checking if Fortran "doubleprecision" is C "double"... yes
>checking for Fortran-equivalent to netCDF "byte"... byte
>checking for Fortran-equivalent to netCDF "short"... integer*2
>checking for math library
>checking for tanh in -lc... no
>checking for tanh in -lm... yes
>checking for ar utility
>checking for ar... ar
>checking ar flags... cru
>checking for nm utility
>checking for nm... (cached) nm
>checking nm flags...
>checking for ranlib... ranlib
>checking for stdlib.h... yes
>checking for sys/types.h... yes
>checking for strerror... yes
>checking for working ftruncate()... yes
>checking for working alloca.h... yes
>checking for alloca... yes
>checking for st_blksize in struct stat... yes
>checking for IEEE floating point format... yes
>checking for ANSI C header files... yes
>checking for size_t... yes
>checking for off_t... yes
>checking for ssize_t... yes
>checking for ptrdiff_t... yes
>checking for uchar... no
>checking whether char is unsigned... no
>checking whether byte ordering is bigendian... no
>checking size of short... 2
>checking size of int... 4
>checking size of long... 4
>checking size of float... 4
>checking size of double... 8
>checking size of off_t... 4
>checking size of size_t... 4
>checking for manual-page index command...
>checking binary distribution directory... /home/ftp/pub/binary/dummy_system
>updating cache ./config.cache
>creating ./config.status
>creating macros.make
>udcreating fortran/nfconfig.inc
>creating libsrc/ncconfig.h
>
>[Eddy@cocos src]$ gmake
>..........
>Returning to directory /home/Eddy/temp/netcdf-3.5.1/src
>
>gmake[1]: Leaving directory `/home/Eddy/temp/netcdf-3.5.1/src'
>gmake[1]: Entering directory `/home/Eddy/temp/netcdf-3.5.1/src'
>
>Making `all' in directory /home/Eddy/temp/netcdf-3.5.1/src/fortran
>
>gmake[2]: Entering directory `/home/Eddy/temp/netcdf-3.5.1/src/fortran'
>gcc -c -O -I../libsrc  -DNDEBUG fort-attio.c
>In file included from ncfortran.h:13,
>                 from fort-attio.c:6:
>cfortran.h:134:3: #error "cfortran.h:  Can't find your environment 
>among:    - MIPS cc and f77 2.0. (e.g. Silicon Graphics, DECstations, 
>...)         - IBM AIX XL C and FORTRAN Compiler/6000 Version 
>01.01.0000.0000         - VAX   VMS CC 3.1 and FORTRAN 
>5.4.                                      - Alpha VMS DEC C 1.3 and DEC 
>FORTRAN 6.0.                               - Alpha OSF DEC C and DEC 
>Fortran for OSF/1 AXP Version 1.2              - Apollo DomainOS 10.2 
>(sys5.3) with f77 10.7 and cc 6.7.                - 
>CRAY                                                                   - 
>NEC SX-4 SUPER-UX                                                      - 
>CONVEX                                                                 - 
>Sun                                                                    - 
>PowerStation Fortran with Visual C++                                   - 
>HP9000s300/s700/s800 Latest test with: HP-UX A.08.07 A 9000/730        - 
>LynxOS: cc or gcc with f2c.                                            - 
>VAXUltrix: vcc,cc or gcc with f2c. gcc or cc with f77.                 
>-            f77 with vcc works; but missing link magic for f77 I/O.     
>-            NO fort. None of gcc, cc or vcc generate required names.    
>- f2c    : Use #define    f2cFortran, or cc -Df2cFortran                 
>- NAG f90: Use #define NAGf90Fortran, or cc -DNAGf90Fortran              
>- Absoft UNIX F77: Use #define AbsoftUNIXFortran or cc 
>-DAbsoftUNIXFortran     - Absoft Pro Fortran: Use #define 
>AbsoftProFortran     - Portland Group Fortran: Use #define pgiFortran"
>gmake[2]: *** [fort-attio.o] Error 1
>gmake[2]: Leaving directory `/home/Eddy/temp/netcdf-3.5.1/src/fortran'
>gmake[1]: *** [subdir_target] Error 1
>gmake[1]: Leaving directory `/home/Eddy/temp/netcdf-3.5.1/src'
>gmake: *** [fortran/all] Error 2
>
>---
>let me know where is the error.
>
>-- 
>Chul Eddy Chung: Assistant Project Scientist
>Scripps Institution of Oceanography, UCSD
>Tel: 858-822-1356   Fax: 858-534-7452

--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publically available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.

>From address@hidden  Wed Apr  7 17:13:07 2004

It solved the problem. Thanks.

Chul Eddy Chung: Assistant Project Scientist
Scripps Institution of Oceanography, UCSD
Tel: 858-822-1356   Fax: 858-534-7452