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

20000531: problem when compile netCDF 3.5



Meng Fan,

> Date:    Wed, 31 May 2000 22:53:24 +0800
> From:    mengfan <address@hidden>
> To:      Russ Rew <address@hidden>
> Subject: problem when compile netCDF 3.5

In the above message, you wrote:

> Thank you so much for your reply. I have tried to compile netCDF 3.5
> source to avoid _fxstat problem as you suggested. I am using g77 on a
> PC with Linux.
>
> However,when I execute "configure" before compile netCDF 3.5, I have
> got a message "Fortran compiler is explicitly null".  Could please
> tell me how to modify script "configure"? I found in "configure"
> at "FC=${FC:-${F90-}} " FC='' because F90=''. I don't have any F90
> compiler but a g77 compiler. When I assign FC=g77 , "configure" passed
> and gives a message of "g77... works".
>
> However, when I try to make netCDF it self, I got a message:
>
> cfortran.h : 155 #error can't find your environment among: ... a list
> of machine names ...
>
> /* compiler must throw us out at this point */
>
> It does.  The curious thing is that in the environment list I don't
> found Linux.  I must have done something wrong. Could you please give
> me some suggestion? Thank you very much.
> 
> Best regards
> 
> Meng Fan

Before executing the "configure" script, you need to tell it that you
have an f77 compiler, that you don't have an f90 compiler, and that you
need to use the native Fortran-calling-C conventions of a Linux system.
The following environment variable settings should do this:

    CC=/usr/bin/egcs
    CPPFLAGS='-DNDEBUG -Df2cFortran'
    CFLAGS=-O
    FC=/usr/bin/g77
    FFLAGS="-O -Wno-globals"
    F90=
    CXX=/usr/bin/g++

The important items are the "-Df2cFortran" in CPPFLAGS and F90 set to 
the empty string.

Try the following:

    1.  Go to the top-level source directory.

    2.  Perform steps 3 through 5 near the end of the INSTALL file.

    3.  Ensure that CPPFLAGS contains the string "-Df2cFortran" and that
        F90 is set to the empty string.

    4.  Perform steps 6 through 9 near the end of the INSTALL file.

Please let me know if this helps.

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