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

20021010: building UDUNITS using pgf90

Dear Nguyen Dang Quang,

>Date: Thu, 10 Oct 2002 20:09:04 +0200 (MET DST)
>From: "Nguyen Dang Quang" <address@hidden>
>Organization: ICTP, Italy
>To: address@hidden
>Subject: Help me

The above message contained the following:

> Dear Dr. Steve Emmerson.

Thanks, but it's just "Mr".  Please call me Steve.

> I am trying to compile udunits-1.11.7 with my Fortran compile PGF90;
> I get a error when make it ( it shows that the error in cfortran.h file)
> Could you send me the cfortran.h file for my case?
> My attached files is output from make command in directory src and make
> ulib.i in dir. lib;
> and the following are set environment in .cshrc
> setenv pgiFortran /usr/local/pgi/linux86/bin/pgf90
> setenv CC /usr/bin/gcc
> setenv PPFLAGS '-DNDEBUG -DpgiFortran'
> setenv CFLAGS -O
> setenv CPPFLAGS -Df2cFortran
> setenv FC /usr/local/pgi/linux86/bin/pgf90
> setenv FFLAGS "-O -w"
> setenv CXX /usr/bin/g++

In order to build the UDUNITS package with a Fortran interface that is
acceptable to the pgf90 compiler, the environment variable CPPFLAGS must
define the C macro "pgiFortran" before the configure script is executed.
Unfortunately, the above settings define the right macro (pgiFortran)
in the wrong environment variable (PPFLAGS) and the wrong macro
(f2cFortran) in the right environment variable (CPPFLAGS).

Please try the following:

    1.  Go to the top-level source directory of the UDUNITS package.

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

    3.  Ensure that the environment variable CPPFLAGS contains the
        string "-DpgiFortran" (without the quotation marks).  Judging from
        the previous settings, you should probably define it like this:

            setenv CPPFLAGS '-DNDEBUG -DpgiFortran'

        Don't define the macro "f2cFortran" in this variable.

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

Please let me know if this helps.

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