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

971021: Problem building netcdf library on CRAY C90



Perry,

> To: address@hidden
> From: Perry Shafran <address@hidden>
> Subject: Problem on building netcdf library
> Organization: General Sciences Corporation
> Keywords: 199710211532.JAA26991

In the above message, you wrote:

> I am a contractor at EMC (Environmental Modeling Center) at NCEP
> (National Center for Environmental Prediction) in Camp Springs, MD,
> and I am trying to build the netCDF library that I got off the Unidata
> web site.  I read the file INSTALL and, as per the instructions in the
> INSTALL file, I am forwarding the following (all outputs from files
> are between two dashed lines ----- )
> 
> 1) The output of the command uname -a is:
> sn4021 sn4021 9.0.1biC wd4.3 CRAY C90
> 
> 2) The contents of the file VERSION:
> 3.3.1
> 
> 3) The standard output of the configure scripts is:
> 
> - -------------------------------------------------------------------------
> creating cache ./config.cache
> checking for m4... m4
> checking user-defined C compiler "c89"
> checking C compiler... works
> checking how to make dependencies... false
> checking for CC... no
> checking for cxx... no
> checking for c++... no
> checking for g++... no
> checking for gcc... no
> checking how to run the C preprocessor... c89 -E
> checking user-defined FORTRAN compiler "cf77"... checking for FORTRAN .F 
> compiler... checking for FORTRAN preprocessor... c89 -E

The line above indicates a problem with the Fortran compiler.

> checking for math library
> checking for -lc... yes
> checking for ar... ar
> checking for ranlib... :
> checking for stdlib.h... yes
> checking for sys/types.h... yes
> checking for strerror... yes
> checking for ftruncate... yes
> checking for st_blksize in struct stat... yes
> checking whether cross-compiling... no
> checking for IEEE floating point format... no
> 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... yes
> checking whether char is unsigned... yes
> checking whether byte ordering is bigendian... yes
> checking size of short... 8
> checking size of int... 8
> checking size of long... 8
> checking size of float... 8
> checking size of double... 8
> checking size of off_t... 8
> checking size of size_t... 8
> checking for catman... no
> checking for makewhatis... no
> 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
> fortran/nfconfig.inc is unchanged
> creating libsrc/ncconfig.h
> libsrc/ncconfig.h is unchanged
> - ---------------------------------------------------------------------------
> and the error output is:
> 
> - -------------------------------------------------------------------
> 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
> configure: warning: cf77 failed to compile test program

The above line indicates a severe problem with the Fortran compiler.

> - ---------------------------------------------------------------------
> 
> 4) The pathname of the Fortran compiler is /bin/cf77, and the pathname of 
> the C compiler is /bin/c89.
> 
> 5) The contents of config.log:
> 
> - -------------------------------------------------------------------------
> This file contains any messages produced by compilers while
> running configure, to aid debugging if configure makes a mistake.
> 
> configure:1017: c89 -c -O -DNDEBUG conftest.c 1>&5
> configure:1217: c89 -E -DNDEBUG conftest.c >/dev/null 2>conftest.out
> configure:1316: f90 -c -F -dp -O2 conftest.f

The "f90" in the above line is inconsistent with the earlier "cf77".  I
suspect that the output from the configure script is out-of-sync with
respect to the file "config.log".

> sh-56 configure[1315]: f90: not found.
> configure:1943: c89 -o conftest -O -DNDEBUG  conftest.c -lc   1>&5
> cc-252 c89: WARNING File = configure, Line = 1939
>   Library function "tanh" is called with the wrong number of arguments.
> 
> TOTAL WARNINGS DETECTED IN conftest.c: 1
> configure:2072: c89 -E -DNDEBUG conftest.c >/dev/null 2>conftest.out
> configure:2106: c89 -E -DNDEBUG conftest.c >/dev/null 2>conftest.out
> configure:2156: c89 -o conftest -O -DNDEBUG  conftest.c  1>&5
> configure:2204: c89 -o conftest -O -DNDEBUG  conftest.c  1>&5
> configure:2238: c89 -c -O -DNDEBUG conftest.c 1>&5
> cc-172 c89: WARNING File = configure, Line = 2234
>   No code is generated for a superfluous expression.
> 
> TOTAL WARNINGS DETECTED IN conftest.c: 1
> configure:2270: c89 -o conftest -O -DNDEBUG  conftest.c  1>&5
> configure:2322: c89 -o conftest -O -DNDEBUG  conftest.c  1>&5
> configure:2351: c89 -E -DNDEBUG conftest.c >/dev/null 2>conftest.out
> configure:2416: c89 -o conftest -O -DNDEBUG  conftest.c  1>&5
> configure:2634: c89 -o conftest -O -DNDEBUG  conftest.c  1>&5
> configure:2672: c89 -c -O -DNDEBUG conftest.c 1>&5
> cc-478 c89: ERROR File = configure, Line = 2667
>   The identifier "bogus" is not declared.
> 
> TOTAL ERRORS DETECTED IN conftest.c: 1
> configure:2718: c89 -o conftest -O -DNDEBUG  conftest.c  1>&5
> configure:2756: c89 -o conftest -O -DNDEBUG  conftest.c  1>&5
> configure:2790: c89 -o conftest -O -DNDEBUG  conftest.c  1>&5
> configure:2824: c89 -o conftest -O -DNDEBUG  conftest.c  1>&5
> configure:2858: c89 -o conftest -O -DNDEBUG  conftest.c  1>&5
> configure:2892: c89 -o conftest -O -DNDEBUG  conftest.c  1>&5
> configure:2930: c89 -o conftest -O -DNDEBUG  conftest.c  1>&5
> configure:2968: c89 -o conftest -O -DNDEBUG  conftest.c  1>&5
> - 
> -----------------------------------------------------------------------------
> 
> 6) The standard output of the command make:
> 
> - 
> -----------------------------------------------------------------------------
> Making `all' in directory /dmlite3/wd20ps/netcdf-3.3.1/src/libsrc
> 
>       c89 -c -O -I.  -DNDEBUG attr.c
>       c89 -c -O -I.  -DNDEBUG dim.c
>       c89 -c -O -I.  -DNDEBUG error.c
>       c89 -c -O -I.  -DNDEBUG -DVERSION=`cat ../VERSION` libvers.c
>       c89 -c -O -I.  -DNDEBUG nc.c
>       c89 -c -O -I.  -DNDEBUG ncio.c
> - ---------------------------------------------------------------------------
> 
> and the error output of the command make:
> 
> - ---------------------------------------------------------------------------
> cc-315 c89: ERROR ncio.c, Line = 6, File = ./ffio.c, Line = 16
>   The include file "ffio.h" is unavailable.

Does the file "libsrc/ffio.h" exist?  If so, then try executing the
following command manually in the "libsrc/" subdirectory.

    c89 -c -O -I.  -DNDEBUG ncio.c

Does it fail?

> cc-526 c89: ERROR ncio.c, Line = 6, File = ./ffio.c, Line = 43
>   The identifier "sb" is declared to have an incomplete type.
> cc-526 c89: ERROR ncio.c, Line = 6, File = ./ffio.c, Line = 44
>   The identifier "sw" is declared to have an incomplete type.
> cc-478 c89: ERROR ncio.c, Line = 6, File = ./ffio.c, Line = 45
>   The identifier "FC_STAT" is not declared.
> cc-421 c89: ERROR ncio.c, Line = 6, File = ./ffio.c, Line = 47
>   The member name "st_oblksize" is not a member of the "struct" or "union".
> cc-526 c89: ERROR ncio.c, Line = 6, File = ./ffio.c, Line = 427
>   The identifier "stat" is declared to have an incomplete type.
> cc-526 c89: ERROR ncio.c, Line = 6, File = ./ffio.c, Line = 498
>   The identifier "stat" is declared to have an incomplete type.
> 
> TOTAL ERRORS DETECTED IN ncio.c: 7
> Make: "c89 -c -O -I.  -DNDEBUG ncio.c": Error code 1
> cmd-2436 make: Stop.
> Make: "cd libsrc && \
>     echo "Making \`all' in directory `pwd`" && \
>     echo "" && \
>     make all || exit 1": Error code 1
> Make: "subdir=`echo libsrc/all | sed 's,/.*,,'`; \
> target=`echo libsrc/all | sed 's,.*/,,'`; \
> make SUBDIR=$subdir TGET=$target subdir_target": Error code 1
> cmd-2436 make: Stop.
> - --------------------------------------------------------------------------
> 
> Can you advise me as to what is wrong and how to correct it?  Thanks in 
> advance for any help you can provide.
> 
> Perry Shafran
> General Sciences Corporation
> Contractor for NCEP/EMC
> address@hidden

Please answer the above questions.  Then, try the following:

    1.  Go to the top-level, netCDF, source directory.

    2.  Execute the command "make distclean".

    3.  Remove the file "config.cache" if it exists.

    4.  Move the file "libsrc/ncx.c" to "libsrc/ncx.c.orig".

    5.  Copy the file "libsrc/ncx_cray.c" to "libsrc/ncx.c".

    6.  Set the following environment variables to the indicated values.

            CPPFLAGS=-DNDEBUG
            CC=c89
            CFLAGS=-O
            FC=f90              # ensure that "f90" exists on your
                                # system, can be found, and works!
            FFLAGS='-F -dp -O2'
            CXX=""

    7.  Execute the configure script.
        Redirect both standard error and standard output to the same
        file.  If an error occurs, then stop, send me the file, and also
        the file "config.log".

    8.  Execute the command "make".
        Redirect both standard error and standard output to the same
        file.  If an error occurs, then stop and send me the file.

    9.  Execute the command "make test".
        Redirect both standard error and standard output to the same
        file.  If an error occurs, then stop and send me the file.

    10. Execute the command "make install".
        Redirect both standard error and standard output to the same
        file.  If an error occurs, then stop and send me the file.

    11. Execute the command "make clean".

--------
Steve Emmerson   <http://www.unidata.ucar.edu>