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

20040630: problem compiling netcdf



>From: address@hidden
>Organization: LMTG IRD, Observatoire Midi-Pyrénées,
>Keywords: 200406300836.i5U8aDWb026364 netCDF 

Muriel,

>i am desperately trying to install gmt, but am blocked when installing
>netcdf at the ./make stage..
>maybe you can advise me..?
>thanks
>
>       Muriel Gerbault
>       LMTG IRD, Observatoire Midi-Pyrénées,
>       14 avenue Edouard Belin, 31400 Toulouse

The error that is shown in the Fortran section of the build:

>make[2]: Entre dans le r\351pertoire
>`/usr/local/src/GMTdev/netcdf-3.5.0/src/fortran'
>/usr/bin/gcc -c -O -I../libsrc  -DNDEBUG fort-attio.c
>Dans le fichier inclus \340 partir de ncfortran.h:13,
>          \340 partir de 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"

shows that your environment was not found in the cfortran.h header file.
Since you are building on Linux using the Intel 'ifort' Fortran compiler,
you should follow the procedure outlined in:

Unidata netCDF HomePage:
http://my.unidata.ucar.edu/content/software/netcdf/index.html

  Installation instructions for C, Fortran, and C++ libraries
  http://my.unidata.ucar.edu/content/software/netcdf/INSTALL.html

  To use the Intel IFC Fortran compiler, see these notes.
  http://www.unidata.ucar.edu/packages/netcdf/other-builds.html#intel-ifc

After setting the environment variables, you will need to start your
netCDF build from the beginning:

cd <directory where you are building the netCDF>
make distclean
./configure
make

Please let us know if this doesn't fix your problem.

Cheers,

Tom Yoksas

>A/ uname -a:
>-------------
>Linux lmtg88p 2.4.22-1.2188.nptlsmp #1 SMP Wed Apr 21 20:12:56 EDT 2004
>i686 i686 i386 GNU/Linux
>
>B/ VERSION:
>-----------
>3.5.0
>
>C/ absolute path names:
>-----------------------
>CC=/usr/bin/gcc
>FC=/usr/bin/f77  or /usr/bin/g77 or /opt/intel_fc_80/bin/ifort (intel
>compiler)
>F90=/opt/intel_fc_80/bin/ifort
>CXX=/usr/bin/g++
>
>D/ configure.log:
>-------------------
>./configure
>creating cache ./config.cache
>checking for top-level source-directory
>/usr/local/src/GMTdev/netcdf-3.5.0/src
>checking for m4 preprocessor
>checking for m4... m4
>checking m4 flags... -B10000
>checking C compiler "/usr/bin/gcc"... works
>checking how to make dependencies... false
>checking for /usr/bin/g++... /usr/bin/g++
>checking C++ compiler "/usr/bin/g++"... configure: warning: /usr/bin/g++
>failed on test program
>configure: warning: Could not find working C++ compiler
>configure: warning: Setting CXX to the empty string
>configure: warning: The C++ interface will not be built
>checking how to run the C preprocessor... /usr/bin/gcc -E
>checking user-defined Fortran-77 compiler "/usr/bin/g77"... works
>checking for Fortran .F compiler...
>checking if Fortran-77 compiler handles *.F files... yes
>checking user-defined Fortran-90 compiler "/opt/intel_fc_80/bin/ifort"...
>works
>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
>
>E/config.log:
>----------------This file contains any messages produced by compilers while
>running configure, to aid debugging if configure makes a mistake.
>
>configure:928: checking for top-level source-directory
>configure:938: checking for m4 preprocessor
>configure:945: checking for m4
>configure:1012: checking m4 flags
>configure:1085: checking C compiler "/usr/bin/gcc"
>configure:1094: /usr/bin/gcc -c -O -DNDEBUG conftest.c 1>&5
>configure:1121: checking how to make dependencies
>configure:1189: checking for /usr/bin/g++
>configure:1225: checking C++ compiler "/usr/bin/g++"
>configure:1243: /usr/bin/g++ -o conftest  -DNDEBUG  conftest.C  1>&5
>In file included from /usr/include/c++/3.3.2/backward/iostream.h:31,
>                 from configure:1235:
>/usr/include/c++/3.3.2/backward/backward_warning.h:32:2: warning: #warning
>This file includes at least one deprecated or antiquated header. Please
>consider using one of the 32 headers found in section 17.4.1.2 of the C++
>standard. Examples include substituting the <X> header for the <X.h>
>header for C++ includes, or <sstream> instead of the deprecated header
><strstream.h>. To disable this warning use -Wno-deprecated.
>In file included from /usr/include/c++/3.3.2/cstdlib:52,
>                 from /usr/include/c++/3.3.2/bits/stl_algobase.h:67,
>                 from /usr/include/c++/3.3.2/memory:54,
>                 from /usr/include/c++/3.3.2/string:48,
>                 from /usr/include/c++/3.3.2/bits/locale_classes.h:47,
>                 from /usr/include/c++/3.3.2/bits/ios_base.h:47,
>                 from /usr/include/c++/3.3.2/ios:49,
>                 from /usr/include/c++/3.3.2/ostream:45,
>                 from /usr/include/c++/3.3.2/iostream:45,
>                 from /usr/include/c++/3.3.2/backward/iostream.h:32,
>                 from configure:1235:
>/usr/include/stdlib.h:612: error: declaration of `void exit(int) throw ()'
>   throws different exceptions
>configure:1232: error: than previous declaration `void exit(int)'
>configure: failed program was:
>#line 1230 "configure"
>#include "confdefs.h"
>#ifdef __cplusplus
>extern "C" void exit(int);
>#endif
>
>                                #include <iostream.h>
>                                int main() {
>                                    cout << "";
>                                    return 0;
>                                }
>
>configure:1294: checking how to run the C preprocessor
>configure:1315: /usr/bin/gcc -E -DNDEBUG conftest.c >/dev/null 2>conftest.out
>configure:1383: checking user-defined Fortran-77 compiler "/usr/bin/g77"
>configure:1389: /usr/bin/g77 -c  conftest.f
>configure:1548: checking for Fortran .F compiler
>configure:1558: checking if Fortran-77 compiler handles *.F files
>configure:1569: /usr/bin/g77 -o conftest  conftest.F
>configure:1608: checking user-defined Fortran-90 compiler
>"/opt/intel_fc_80/bin/ifort"
>configure:1615: /opt/intel_fc_80/bin/ifort -c  conftest.f90
>configure:1751: checking for nm utility
>configure:1758: checking for nm
>configure:1825: checking nm flags
>configure:1841: checking for C-equivalent to Fortran routine "SUB"
>configure:1847: /usr/bin/g77 -c  conftest.f
>configure:1876: checking for Fortran "byte"
>configure:1883: /usr/bin/g77 -c  conftest.f
>configure:1900: checking for Fortran "integer*2"
>configure:1907: /usr/bin/g77 -c  conftest.f
>configure:1933: checking if Fortran "byte" is C "signed char"
>configure:1942: /usr/bin/gcc -c -DNDEBUG -O conftest.c
>configure:1944: /usr/bin/g77  -c conftestf.f
>configure:1946: /usr/bin/g77 -o conftest   conftestf.o conftest.o
>configure:1948: ./conftest
>configure:1981: checking if Fortran "byte" is C "short"
>configure:1990: /usr/bin/gcc -c -DNDEBUG -O conftest.c
>configure:1992: /usr/bin/g77  -c conftestf.f
>configure:1994: /usr/bin/g77 -o conftest   conftestf.o conftest.o
>configure:1996: ./conftest
>configure:2029: checking if Fortran "byte" is C "int"
>configure:2038: /usr/bin/gcc -c -DNDEBUG -O conftest.c
>configure:2040: /usr/bin/g77  -c conftestf.f
>configure:2042: /usr/bin/g77 -o conftest   conftestf.o conftest.o
>configure:2044: ./conftest
>configure:2077: checking if Fortran "byte" is C "long"
>configure:2086: /usr/bin/gcc -c -DNDEBUG -O conftest.c
>configure:2088: /usr/bin/g77  -c conftestf.f
>configure:2090: /usr/bin/g77 -o conftest   conftestf.o conftest.o
>configure:2092: ./conftest
>configure:2129: checking if Fortran "integer*2" is C "short"
>configure:2138: /usr/bin/gcc -c -DNDEBUG -O conftest.c
>configure:2140: /usr/bin/g77  -c conftestf.f
>configure:2142: /usr/bin/g77 -o conftest   conftestf.o conftest.o
>configure:2144: ./conftest
>configure:2177: checking if Fortran "integer*2" is C "int"
>configure:2186: /usr/bin/gcc -c -DNDEBUG -O conftest.c
>configure:2188: /usr/bin/g77  -c conftestf.f
>configure:2190: /usr/bin/g77 -o conftest   conftestf.o conftest.o
>configure:2192: ./conftest
>configure:2225: checking if Fortran "integer*2" is C "long"
>configure:2234: /usr/bin/gcc -c -DNDEBUG -O conftest.c
>configure:2236: /usr/bin/g77  -c conftestf.f
>configure:2238: /usr/bin/g77 -o conftest   conftestf.o conftest.o
>configure:2240: ./conftest
>configure:2275: checking if Fortran "integer" is C "int"
>configure:2284: /usr/bin/gcc -c -DNDEBUG -O conftest.c
>configure:2286: /usr/bin/g77  -c conftestf.f
>configure:2288: /usr/bin/g77 -o conftest   conftestf.o conftest.o
>configure:2290: ./conftest
>configure:2323: checking if Fortran "real" is C "float"
>configure:2332: /usr/bin/gcc -c -DNDEBUG -O conftest.c
>configure:2334: /usr/bin/g77  -c conftestf.f
>configure:2336: /usr/bin/g77 -o conftest   conftestf.o conftest.o
>configure:2338: ./conftest
>configure:2371: checking if Fortran "doubleprecision" is C "double"
>configure:2380: /usr/bin/gcc -c -DNDEBUG -O conftest.c
>configure:2382: /usr/bin/g77  -c conftestf.f
>configure:2384: /usr/bin/g77 -o conftest   conftestf.o conftest.o
>configure:2386: ./conftest
>configure:2413: checking for Fortran-equivalent to netCDF "byte"
>configure:2420: /usr/bin/g77 -c  conftest.f
>configure:2435: checking for Fortran-equivalent to netCDF "short"
>configure:2442: /usr/bin/g77 -c  conftest.f
>configure:2462: checking for math library
>configure:2466: checking for tanh in -lc
>configure:2485: /usr/bin/gcc -o conftest -O -DNDEBUG  conftest.c -lc   1>&5
>/tmp/ccEPeU8q.o(.text+0xa): In function `main':
>: undefined reference to `tanh'
>collect2: ld returned 1 exit status
>configure: failed program was:
>#line 2474 "configure"
>#include "confdefs.h"
>/* Override any gcc2 internal prototype to avoid an error.  */
>/* We use char because int might match the return type of a gcc2
>    builtin and then its argument prototype would still apply.  */
>char tanh();
>
>int main() {
>tanh()
>; return 0; }
>configure:2504: checking for tanh in -lm
>configure:2523: /usr/bin/gcc -o conftest -O -DNDEBUG  conftest.c -lm   1>&5
>configure:2555: checking for ar utility
>configure:2562: checking for ar
>configure:2629: checking ar flags
>configure:2638: checking for nm utility
>configure:2680: checking for nm
>configure:2712: checking nm flags
>configure:2722: checking for ranlib
>configure:2751: checking for stdlib.h
>configure:2761: /usr/bin/gcc -E -DNDEBUG conftest.c >/dev/null 2>conftest.out
>configure:2788: checking for sys/types.h
>configure:2798: /usr/bin/gcc -E -DNDEBUG conftest.c >/dev/null 2>conftest.out
>configure:2824: checking for strerror
>configure:2852: /usr/bin/gcc -o conftest -O -DNDEBUG  conftest.c  1>&5
>configure:2877: checking for working ftruncate()
>configure:2930: /usr/bin/gcc -o conftest -O -DNDEBUG  conftest.c  1>&5
>/tmp/ccEfeLgh.o(.text+0x15): In function `main':
>: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
>configure:2952: checking for working alloca.h
>configure:2964: /usr/bin/gcc -o conftest -O -DNDEBUG  conftest.c  1>&5
>configure:2985: checking for alloca
>configure:3018: /usr/bin/gcc -o conftest -O -DNDEBUG  conftest.c  1>&5
>configure:3184: checking for st_blksize in struct stat
>configure:3197: /usr/bin/gcc -c -O -DNDEBUG conftest.c 1>&5
>configure:3219: checking for IEEE floating point format
>configure:3257: /usr/bin/gcc -o conftest -O -DNDEBUG  conftest.c  1>&5
>configure:3278: checking for ANSI C header files
>configure:3291: /usr/bin/gcc -E -DNDEBUG conftest.c >/dev/null 2>conftest.out
>configure:3358: /usr/bin/gcc -o conftest -O -DNDEBUG  conftest.c  1>&5
>configure:3382: checking for size_t
>configure:3415: checking for off_t
>configure:3448: checking for ssize_t
>configure:3481: checking for ptrdiff_t
>configure:3514: checking for uchar
>configure:3547: checking whether char is unsigned
>configure:3610: checking whether byte ordering is bigendian
>configure:3628: /usr/bin/gcc -c -O -DNDEBUG conftest.c 1>&5
>configure:3643: /usr/bin/gcc -c -O -DNDEBUG conftest.c 1>&5
>configure: In function `main':
>configure:3638: error: `not' undeclared (first use in this function)
>configure:3638: error: (Each undeclared identifier is reported only once
>configure:3638: error: for each function it appears in.)
>configure:3638: error: syntax error before "big"
>configure: failed program was:
>#line 3632 "configure"
>#include "confdefs.h"
>#include <sys/types.h>
>#include <sys/param.h>
>int main() {
>
>#if BYTE_ORDER != BIG_ENDIAN
> not big endian
>#endif
>; return 0; }
>configure:3700: checking size of short
>configure:3719: /usr/bin/gcc -o conftest -O -DNDEBUG  conftest.c  1>&5
>configure:3739: checking size of int
>configure:3758: /usr/bin/gcc -o conftest -O -DNDEBUG  conftest.c  1>&5
>configure:3778: checking size of long
>configure:3797: /usr/bin/gcc -o conftest -O -DNDEBUG  conftest.c  1>&5
>configure:3817: checking size of float
>configure:3836: /usr/bin/gcc -o conftest -O -DNDEBUG  conftest.c  1>&5
>configure:3856: checking size of double
>configure:3875: /usr/bin/gcc -o conftest -O -DNDEBUG  conftest.c  1>&5
>configure:3895: checking size of off_t
>configure:3918: /usr/bin/gcc -o conftest -O -DNDEBUG  conftest.c  1>&5
>configure:3938: checking size of size_t
>configure:3961: /usr/bin/gcc -o conftest -O -DNDEBUG  conftest.c  1>&5
>configure:4062: checking for manual-page index command
>configure:4066: checking binary distribution directory
>
>
>F/make:
>-------
>make[1]: Entre dans le répertoire `/usr/local/src/GMTdev/netcdf-3.5.0/src'
>
>Making `all' in directory /usr/local/src/GMTdev/netcdf-3.5.0/src/libsrc
>
>make[2]: Entre dans le répertoire
>`/usr/local/src/GMTdev/netcdf-3.5.0/src/libsrc'
>/usr/bin/gcc -c -O -I.  -DNDEBUG attr.c
>/usr/bin/gcc -c -O -I.  -DNDEBUG dim.c
>/usr/bin/gcc -c -O -I.  -DNDEBUG error.c
>/usr/bin/gcc -c -O -I.  -DNDEBUG -DVERSION=`cat ../VERSION` libvers.c
>/usr/bin/gcc -c -O -I.  -DNDEBUG nc.c
>/usr/bin/gcc -c -O -I.  -DNDEBUG ncio.c
>/usr/bin/gcc -c -O -I.  -DNDEBUG ncx.c
>/usr/bin/gcc -c -O -I.  -DNDEBUG putget.c
>/usr/bin/gcc -c -O -I.  -DNDEBUG string.c
>/usr/bin/gcc -c -O -I.  -DNDEBUG v1hpg.c
>/usr/bin/gcc -c -O -I.  -DNDEBUG v2i.c
>/usr/bin/gcc -c -O -I.  -DNDEBUG var.c
>ar cru libnetcdf.a attr.o dim.o error.o libvers.o nc.o ncio.o ncx.o
>putget.o string.o v1hpg.o v2i.o var.o
>ranlib libnetcdf.a
>make[2]: Quitte le répertoire `/usr/local/src/GMTdev/netcdf-3.5.0/src/libsrc'
>
>Returning to directory /usr/local/src/GMTdev/netcdf-3.5.0/src
>
>make[1]: Quitte le répertoire `/usr/local/src/GMTdev/netcdf-3.5.0/src'
>make[1]: Entre dans le répertoire `/usr/local/src/GMTdev/netcdf-3.5.0/src'
>
>Making `all' in directory /usr/local/src/GMTdev/netcdf-3.5.0/src/fortran
>
>make[2]: Entre dans le répertoire
>`/usr/local/src/GMTdev/netcdf-3.5.0/src/fortran'
>/usr/bin/gcc -c -O -I../libsrc  -DNDEBUG fort-attio.c
>Dans le fichier inclus à partir de ncfortran.h:13,
>          à partir de 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"
>make[2]: *** [fort-attio.o] Erreur 1
>make[2]: Quitte le répertoire
>`/usr/local/src/GMTdev/netcdf-3.5.0/src/fortran'
>make[1]: *** [subdir_target] Erreur 1
>make[1]: Quitte le répertoire `/usr/local/src/GMTdev/netcdf-3.5.0/src'
>make: *** [fortran/all] Erreur 2
>
>
>
>       address@hidden
>       tel: (33) 0-5 61 33 26 39
>       fax: (33) 0-5 61 33 25 60
>
--
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.