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

Re: 19990609: netcdf on linux with NAG Fortran compiler



Chris,

>Date: Wed, 09 Jun 1999 10:00:05 -0700 (PDT)
>From: "Christopher A. Edwards" <address@hidden>
>Organization: University of California, Berkeley
>To: Steve Emmerson <address@hidden>
>Subject: Re: 19990608: netcdf on linux with NAG Fortran compiler
>Keywords: 199906081845.MAA02543

In the above message, you wrote:

...
> [cae@bay src]# which cc
> /usr/bin/cc
> [cae@bay src]# which c++
> /usr/bin/c++
> [cae@bay src]# which fort77
> /usr/bin/fort77
> 
> D: configure.log is attached 
> E: config.log is attached 
> F: make.log is attched (though the following errors were returned to the 
> screen:
> [cae@bay src]# make > make.log
> In file included from fort-attio.c:6:
> ncfortran.h:27: NF_INT_IS_C_... not defined: No such file or directory
> make[2]: *** [fort-attio.o] Error 1
> make[1]: *** [subdir_target] Error 1
> make: *** [fortran/all] Error 2
> 
> Thanks again.  Hope this helps.
> 
>                                         -Chris
...

> Content-Disposition: attachment; filename="configure.log"
...
> 4.    text/plain      (text/plain)
> creating cache ./config.cache
> checking for m4... m4
> checking for xlc... no
> checking for c89... no
> checking for acc... no
> checking for cc... cc
> checking C compiler... works
> 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... cc -E
> checking for f77... no
> checking for fort77... fort77
> checking for Fortran .F compiler... 
> checking if Fortran compiler handles *.F files... yes
> 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"... no
> 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"... no
> 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"... no
> checking if Fortran "integer" is C "long"... no

The last 9 lines above indicate that the configure script couldn't find
any primitive C types corresponding to the primitive Fortran types.  If
true, then this would make it impossible to build the netCDF Fortran
interface.  This defies belief.  It's more likely that something is
wrong with your developmennt environment.

To test your development environment, would you please do the following:

    1.  Create the file "sub.c" with the following code:

            void sub_(values)
                int values[4];
            {
                exit(values[1] != -2 || values[2] != -3);
            }

    2.  Compile it with the following command:

            /usr/bin/cc -c -O sub.c

        If an error occurs, then stop and send me the error output.

    3.  Create the file "main.f" with the following code:

           integer values(4)
           data values /-1, -2, -3, -4/
           call sub(values)
           end

    4.  Compile it with the following command:

            /usr/bin/fort77  -c main.f

        If an error occurs, then stop and send me the error output.

    5.  Link the two object files into a program with the following
        command:

            /usr/bin/fort77 -o main main.o sub.o

    6.  Execute the program with the following command:

            ./main

        and tell me its exit status.

...

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