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

20021127: netcdf 3.5.1 beta5 and Linux 8.0 error



>From: "ufuk turuncoglu" <address@hidden>
>Organization: Istanbul Technical University
>Keywords: 200211271642.gARGgK423619 netCFD 3.5.1-beta5

Ufuk,

>Linux ufuk 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux
>
>3.5.1-beta5
>
>..makros.make

I looked down through the 'configure' output you sent, and it appears that
the problem you are running into is related to the C compiler, c89:

>..configure log
>
>creating cache ./config.cache
>checking for top-level source-directory
>/usr/local/netcdf-3.5.1-beta5/src
>checking for m4 preprocessor
>checking for m4... m4
>checking m4 flags... -B10000
>checking C compiler "usr/bin/c89"... failed to compile test program
>checking how to make dependencies... false
>checking for CC... no

Notice that 'configure' is trying to use 'usr/bin/c89' and not
'/usr/bin/c89' as a C compiler.  This tells me that the specification
of the CC environment variable in your session is incorrect.

I recommend that you remove any files created by the 'configure' attempt
you made (e.g., config, config.log, config.cache, config.status); check
definitions of environment variables in your Unix session and correct
CC; and then rerun 'configure'.

Since you are running on a Linux system, I recommend that you set
the following Unix environment variables before you rerun 'configure':

CC=c89
CPPFLAGS="-DNDEBUG -Df2cFortran"
CFLAGS=-O
FC=g77
FFLAGS="-O -Wuninitialized -fno-automatic"
CXX=

Notes:

o defining 'CC=c89' assumes that your PATH is setup so this can be found
  If you don't have a 'c89' compiler, set CC to be one that you do have.
  On Linux this is most often 'cc' or 'gcc'

o defining 'FC=g77' assumes that your PATH is setup so that 'g77' can
  be found and it exists and you want to use it as your Fortran compiler.

o Setting CXX to a blank tells configure that you do not want to build
  the C++ interfact to netCDF.  If you want the C++ interfact built, then
  you should define CXX to a working C++ compiler.

Again, after defining these Unix environment variables and after deleting
files that were possibly created in your previous 'configure' attempt,
you should rerun 'configure' and then make.

Please let us know if you continue to have problems.


># $Id: macros.make.def,v 1.4 1997/09/18 20:56:03 davis Exp $
>
># The purpose of this file is to contain common make(1) macros.
># It should be processed by every execution of that utility.
>
>
># POSIX shell.  Shouldn't be necessary -- but is under IRIX 5.3.
>SHELL          = /bin/sh
>
>
># Installation Directories:
>prefix         = /opt/netcdf
>exec_prefix    = $(prefix)
>INCDIR         = $(exec_prefix)/include
>LIBDIR         = $(exec_prefix)/lib
>BINDIR         = $(exec_prefix)/bin
>MANDIR         = $(prefix)/man
>
>
># Preprocessing:
>M4             = m4
>M4FLAGS                = -B10000
>CPP            = c89 -E
>CPPFLAGS       = $(INCLUDES) $(DEFINES) @CPPFLAGS@
>FPP            =
>FPPFLAGS       = $(CPPFLAGS)
>CXXCPPFLAGS    = $(CPPFLAGS)
>
>
># Compilation:
>CC             = c89
>CXX            = CC
>FC             = f77
>CFLAGS         = -g
>CXXFLAGS       = $(CFLAGS) @CXXFLAGS@
>FFLAGS         = -g
>CC_MAKEDEPEND  = :
>COMPILE.c      = $(CC) -c $(CFLAGS) $(CPPFLAGS)
>COMPILE.cxx    = $(CXX) -c $(CXXFLAGS) $(CXXCPPFLAGS)
>COMPILE.f      = $(FC) -c $(FFLAGS)
># The following command isn't available on some systems; therefore, the
># `.F.o' rule is relatively complicated.
>COMPILE.F      = $(COMPILE.f)
>
>
># Linking:
>MATHLIB                =
>FLIBS          =
>LIBS           =
>LINK.c         = $(CC) -o $@ $(CFLAGS) $(LDFLAGS)
>LINK.cxx       = $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS)
>LINK.F         = $(FC) -o $@ $(FFLAGS) $(FLDFLAGS)
>LINK.f         = $(FC) -o $@ $(FFLAGS) $(FLDFLAGS)
>
>
># NetCDF files:
>NCDUMP         = ncdump
>NCGEN          = ncgen
>
>
># Manual pages:
>WHATIS         =
># The following macro should be empty on systems that don't
># allow users to create their own manual-page indexes.
>MAKEWHATIS_CMD =
>
>
># Misc. Utilities:
>AR             = ar
>ARFLAGS                = cru   # NB: SunOS 4 doesn't like `-' option prefix
>RANLIB         =
>TARFLAGS       = -chf
>
>
># Dummy macros: used only as placeholders to silence GNU make.  They are
># redefined, as necessary, in subdirectory makefiles.
>HEADER         = dummy_header
>HEADER1                = dummy_header1
>HEADER2                = dummy_header2
>LIBRARY                = dummy_library.a
>MANUAL         = dummy_manual
>PROGRAM                = dummy_program
>
>
># Distribution macros:
>FTPDIR         = /home/ftp/pub/$(PACKAGE)
>FTPBINDIR      =
>VERSION                = dummy_version
>
>..which command result
>
>(/usr/local/sbin:/usr/sbin:/sbin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/sb
> in:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/usr
> /local/netcdf-3.5.0/src/man:/usr/local/netcdf-3.5.0/src/bin:/root/bin:/usr/lo
> cal/netcdf-3.5.1-beta5/src/bin:/usr/local/netcdf-3.5.1-beta5/src/man:/root/bi
> n)
>
>..configure log
>
>creating cache ./config.cache
>checking for top-level source-directory
>/usr/local/netcdf-3.5.1-beta5/src
>checking for m4 preprocessor
>checking for m4... m4
>checking m4 flags... -B10000
>checking C compiler "usr/bin/c89"... failed to compile test program
>checking how to make dependencies... false
>checking for CC... no
>checking for cxx... no
>checking for c++... c++
>checking C++ compiler "c++"... works
>checking how to run the C preprocessor... /lib/cpp
>checking user-defined Fortran-77 compiler "/usr/bin/f77"... works
>checking for Fortran .F compiler...
>checking if Fortran-77 compiler handles *.F files... yes
>checking "/usr/bin/f77" as Fortran-90 compiler... failed to build test 
>program
>checking for xlf90... no
>checking for f90... no
>configure: warning: Could not find working Fortran-90 compiler
>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"... configure: error: Could not 
>compile conftest.c
>
>..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/c89"
>configure:1094: usr/bin/c89 -c -O -DNDEBUG conftest.c 1>&5
>./configure: line 1: usr/bin/c89: No such file or directory
>configure: failed program was:
>#line 1087 "configure"
>#include "confdefs.h"
>
>int main() {
>
>; return 0; }
>configure:1121: checking how to make dependencies
>configure:1189: checking for CC
>configure:1189: checking for cxx
>configure:1189: checking for c++
>configure:1225: checking C++ compiler "c++"
>configure:1243: c++ -o conftest  -DNDEBUG  conftest.C  1>&5
>configure:1331: checking how to run the C preprocessor
>configure:1352: usr/bin/c89 -E -DNDEBUG conftest.c >/dev/null 2>conftest.out
>./configure: line 1: usr/bin/c89: No such file or directory
>configure: failed program was:
>#line 1346 "configure"
>#include "confdefs.h"
>#include <assert.h>
>Syntax Error
>configure:1369: usr/bin/c89 -E -traditional-cpp -DNDEBUG conftest.c 
> >/dev/null 2>conftest.out
>./configure: line 1: usr/bin/c89: No such file or directory
>configure: failed program was:
>#line 1363 "configure"
>#include "confdefs.h"
>#include <assert.h>
>Syntax Error
>configure:1386: usr/bin/c89 -nologo -E -DNDEBUG conftest.c >/dev/null 
>2>conftest.out
>./configure: line 1: usr/bin/c89: No such file or directory
>configure: failed program was:
>#line 1380 "configure"
>#include "confdefs.h"
>#include <assert.h>
>Syntax Error
>configure:1420: checking user-defined Fortran-77 compiler "/usr/bin/f77"
>configure:1426: /usr/bin/f77 -c -O -erroff=WDECL_LOCAL_NOTUSED conftest.f
>configure:1585: checking for Fortran .F compiler
>configure:1595: checking if Fortran-77 compiler handles *.F files
>configure:1606: /usr/bin/f77 -o conftest -O -erroff=WDECL_LOCAL_NOTUSED 
>conftest.F
>/usr/bin/ld: warning: cannot find entry symbol rroff=WDECL_LOCAL_NOTUSED; 
>defaulting to 08048530
>configure:1675: checking "/usr/bin/f77" as Fortran-90 compiler
>configure:1677: /usr/bin/f77 -o conftest -O -erroff=WDECL_LOCAL_NOTUSED 
>conftest.f90
>/usr/bin/ld:conftest.f90: file format not recognized; treating as linker 
>script
>/usr/bin/ld:conftest.f90:1: parse error
>collect2: ld returned 1 exit status
>configure:1706: checking for xlf90
>configure:1706: checking for f90
>configure:1777: checking for nm utility
>configure:1784: checking for nm
>configure:1851: checking nm flags
>configure:1867: checking for C-equivalent to Fortran routine "SUB"
>configure:1873: /usr/bin/f77 -c -O -erroff=WDECL_LOCAL_NOTUSED conftest.f
>configure:1902: checking for Fortran "byte"
>configure:1909: /usr/bin/f77 -c -O -erroff=WDECL_LOCAL_NOTUSED conftest.f
>configure:1926: checking for Fortran "integer*2"
>configure:1933: /usr/bin/f77 -c -O -erroff=WDECL_LOCAL_NOTUSED conftest.f
>configure:1959: checking if Fortran "byte" is C "signed char"
>configure:1968: usr/bin/c89 -c -DNDEBUG -O conftest.c
>./configure: line 1: usr/bin/c89: No such file or directory
>
>..make.log
>
>ules.make:136: warning: overriding commands for target `/opt/netcdf/include'
>rules.make:124: warning: ignoring old commands for target 
>`/opt/netcdf/include'
>rules.make:136: warning: overriding commands for target `/opt/netcdf/man'
>Makefile:168: warning: ignoring old commands for target `/opt/netcdf/man'
>make[1]: Entering directory `/usr/local/netcdf-3.5.1-beta5/src'
>rules.make:136: warning: overriding commands for target 
>`/opt/netcdf/include'
>rules.make:124: warning: ignoring old commands for target 
>`/opt/netcdf/include'
>rules.make:136: warning: overriding commands for target `/opt/netcdf/man'
>Makefile:168: warning: ignoring old commands for target `/opt/netcdf/man'
>
>Making `all' in directory /usr/local/netcdf-3.5.1-beta5/src/libsrc
>
>make[2]: Entering directory `/usr/local/netcdf-3.5.1-beta5/src/libsrc'
>../rules.make:136: warning: overriding commands for target 
>`/opt/netcdf/include'
>../rules.make:124: warning: ignoring old commands for target 
>`/opt/netcdf/include'
>make[2]: *** No rule to make target `ncconfig.h', needed by `attr.o'.  Stop.
>make[2]: Leaving directory `/usr/local/netcdf-3.5.1-beta5/src/libsrc'
>make[1]: *** [subdir_target] Error 1
>make[1]: Leaving directory `/usr/local/netcdf-3.5.1-beta5/src'
>make: *** [libsrc/all] Error 2
>
>..test.log
>
>rules.make:136: warning: overriding commands for target 
>`/opt/netcdf/include'
>rules.make:124: warning: ignoring old commands for target 
>`/opt/netcdf/include'
>rules.make:136: warning: overriding commands for target `/opt/netcdf/man'
>Makefile:168: warning: ignoring old commands for target `/opt/netcdf/man'
>make[1]: Entering directory `/usr/local/netcdf-3.5.1-beta5/src'
>rules.make:136: warning: overriding commands for target 
>`/opt/netcdf/include'
>rules.make:124: warning: ignoring old commands for target 
>`/opt/netcdf/include'
>rules.make:136: warning: overriding commands for target `/opt/netcdf/man'
>Makefile:168: warning: ignoring old commands for target `/opt/netcdf/man'
>
>Making `test' in directory /usr/local/netcdf-3.5.1-beta5/src/libsrc
>
>make[2]: Entering directory `/usr/local/netcdf-3.5.1-beta5/src/libsrc'
>../rules.make:136: warning: overriding commands for target 
>`/opt/netcdf/include'
>../rules.make:124: warning: ignoring old commands for target 
>`/opt/netcdf/include'
>c89 -c -g -I.  @CPPFLAGS@ t_nc.c
>gcc: @CPPFLAGS@: No such file or directory
>make[2]: *** [t_nc.o] Error 1
>make[2]: Leaving directory `/usr/local/netcdf-3.5.1-beta5/src/libsrc'
>make[1]: *** [subdir_target] Error 1
>make[1]: Leaving directory `/usr/local/netcdf-3.5.1-beta5/src'
>make: *** [libsrc/test] Error 2
>
>..install.log
>
>rules.make:136: warning: overriding commands for target 
>`/opt/netcdf/include'
>rules.make:124: warning: ignoring old commands for target 
>`/opt/netcdf/include'
>rules.make:136: warning: overriding commands for target `/opt/netcdf/man'
>Makefile:168: warning: ignoring old commands for target `/opt/netcdf/man'
>make[1]: Entering directory `/usr/local/netcdf-3.5.1-beta5/src'
>rules.make:136: warning: overriding commands for target 
>`/opt/netcdf/include'
>rules.make:124: warning: ignoring old commands for target 
>`/opt/netcdf/include'
>rules.make:136: warning: overriding commands for target `/opt/netcdf/man'
>Makefile:168: warning: ignoring old commands for target `/opt/netcdf/man'
>
>Making `install' in directory /usr/local/netcdf-3.5.1-beta5/src/libsrc
>
>make[2]: Entering directory `/usr/local/netcdf-3.5.1-beta5/src/libsrc'
>../rules.make:136: warning: overriding commands for target 
>`/opt/netcdf/include'
>../rules.make:124: warning: ignoring old commands for target 
>`/opt/netcdf/include'
>test -d /opt/netcdf/lib || mkdir /opt/netcdf/lib
>mkdir: cannot create directory `/opt/netcdf/lib': No such file or directory
>make[2]: [/opt/netcdf/lib] Error 1 (ignored)
>make[2]: *** No rule to make target `ncconfig.h', needed by `attr.o'.  Stop.
>make[2]: Leaving directory `/usr/local/netcdf-3.5.1-beta5/src/libsrc'
>make[1]: *** [subdir_target] Error 1
>make[1]: Leaving directory `/usr/local/netcdf-3.5.1-beta5/src'
>make: *** [libsrc/install] Error 2
>
>
>..when i run my fortran program, it gave me falloving error
>command: f77 -o pom2k.cdl pom2k.f 
>/usr/local/netcdf-3.5.1-beta5/src/lib/libnetcdf.a
>
>
>/tmp/cclBnUxO.o: In function `def_var_netcdf__':
>/tmp/cclBnUxO.o(.text+0x23555): undefined reference to `nf_def_var__'
>/tmp/cclBnUxO.o(.text+0x2358f): undefined reference to `nf_put_att_text__'
>/tmp/cclBnUxO.o(.text+0x235c9): undefined reference to `nf_put_att_text__'
>/tmp/cclBnUxO.o(.text+0x2360b): undefined reference to `nf_put_att_text__'
>/tmp/cclBnUxO.o: In function `handle_netcdf_error__':
>/tmp/cclBnUxO.o(.text+0x23677): undefined reference to `nf_strerror__'
>/tmp/cclBnUxO.o: In function `write_netcdf__':
>/tmp/cclBnUxO.o(.text+0x23713): undefined reference to `nf_create__'
>/tmp/cclBnUxO.o(.text+0x23756): undefined reference to `nf_put_att_text__'
>/tmp/cclBnUxO.o(.text+0x23799): undefined reference to `nf_put_att_text__'
>/tmp/cclBnUxO.o(.text+0x237d5): undefined reference to `nf_def_dim__'
>/tmp/cclBnUxO.o(.text+0x23811): undefined reference to `nf_def_dim__'
>/tmp/cclBnUxO.o(.text+0x2384d): undefined reference to `nf_def_dim__'
>/tmp/cclBnUxO.o(.text+0x23889): undefined reference to `nf_def_dim__'
>/tmp/cclBnUxO.o(.text+0x239c8): undefined reference to `nf_put_att_text__'
>/tmp/cclBnUxO.o(.text+0x23a0b): undefined reference to `nf_put_att_text__'
>/tmp/cclBnUxO.o(.text+0x23aa6): undefined reference to `nf_put_att_text__'
>/tmp/cclBnUxO.o(.text+0x23ae9): undefined reference to `nf_put_att_text__'
>/tmp/cclBnUxO.o(.text+0x2440c): undefined reference to `nf_enddef__'
>/tmp/cclBnUxO.o(.text+0x24441): undefined reference to `nf_put_var_real__'
>/tmp/cclBnUxO.o(.text+0x24476): undefined reference to `nf_put_var_real__'
>/tmp/cclBnUxO.o(.text+0x244ab): undefined reference to `nf_put_var_real__'
>/tmp/cclBnUxO.o(.text+0x244e0): undefined reference to `nf_put_var_real__'
>/tmp/cclBnUxO.o(.text+0x24515): undefined reference to `nf_put_var_real__'
>/tmp/cclBnUxO.o(.text+0x2454a): more undefined references to 
>`nf_put_var_real__' follow
>/tmp/cclBnUxO.o: In function `write_netcdf__':
>/tmp/cclBnUxO.o(.text+0x24829): undefined reference to `nf_put_vara_real__'
>/tmp/cclBnUxO.o(.text+0x24891): undefined reference to `nf_put_vara_real__'
>/tmp/cclBnUxO.o(.text+0x248ce): undefined reference to `nf_put_vara_real__'
>/tmp/cclBnUxO.o(.text+0x2490b): undefined reference to `nf_put_vara_real__'
>/tmp/cclBnUxO.o(.text+0x24981): undefined reference to `nf_put_vara_real__'
>/tmp/cclBnUxO.o(.text+0x249be): more undefined references to 
>`nf_put_vara_real__' follow
>/tmp/cclBnUxO.o: In function `write_netcdf__':
>/tmp/cclBnUxO.o(.text+0x24ae7): undefined reference to `nf_close__'
>collect2: ld returned 1 exit status
>
>Ufuk Turuncoglu
>Istanbul Technical University
>Eurasia Institute of Earth Sciences
>email:address@hidden

Tom Yoksas