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

20030923: building netCDF on Linux using g77



Hai Zhang,

> To: <address@hidden>
> From: "Hai Zhang" <address@hidden>
> Subject: problem on netCDF
> Organization: UMBC
> Keywords: netCDF

The above message contained the following:

> I had some trouble when I tried to install the netCDF. It failed when I =
> came to the command "make test". The following are the information you =
> request on your web site:
> 
> A. The standard output of the command "uname -a".
>  Linux linux 2.4.18-4GB #1 Wed Mar 27 13:57:05 UTC 2002 i686 unknown
...

> B.The contents of the file VERSION, which is in the top-level source =
> directory.
> 3.5.0
...

> C.The file "macros.make", which is created in the top-level source =
> directory by the configure script during step 6 above.
...
> CPPFLAGS        =3D $(INCLUDES) $(DEFINES) -DNDEBUG -DpgiFortran
> FC              =3D /usr/bin/g77
> F90             =3D=20
...

The C macro "pgiFortran" defined in the above is incompatible with use
of the g77(1) Fortran-77 compiler.  Use of that compiler requires that
the C macro "f2cFortran" be defined instead.

> D.The absolute pathnames of all compilers (C, Fortran, C++) used in the =
> build process if they are not in the file "macros.make" (use the type(1) =
> or which(1) utility to determine this).
> =20
> E. The file "configure.log" from step 6 above.=20
...

> F.The file "config.log", which is created in the top-level source =
> directory by the configure script during step 6 above.=20
> G.The file "make.log" from step 7 above.=20
...
> 
> H.The file "test.log" from step 8 above.=20
> make[1]: Entering directory =
...

> Making `test' in directory =
> /home/hzhang/ShallowWater/RefSol/netcdf-3.5.0/src/nf_test
> 
> make[2]: Entering directory =
> `/home/hzhang/ShallowWater/RefSol/netcdf-3.5.0/src/nf_test
> '
> /usr/bin/gcc -c -O   -DNDEBUG -DpgiFortran fortlib.c
> /usr/bin/g77 -o nf_test -O -Wno-globals  test_get.o test_put.o =
> nf_error.o nf_test.o te
> st_read.o test_write.o util.o fortlib.o ../libsrc/libnetcdf.a  -lm=20
> make[2]: Leaving directory =
> `/home/hzhang/ShallowWater/RefSol/netcdf-3.5.0/src/nf_test'
> make[1]: Leaving directory =
> `/home/hzhang/ShallowWater/RefSol/netcdf-3.5.0/src'

The above is missing the standard error from the "make test" command,
but I can imagine what it would have contained.

Try the following:

    1.  Go to the top-level source directory.

    2.  Perform steps 3 and 4 described near the end of the file
        INSTALL.html.

    3.  Use the following settings for step 5.

            CC=/usr/bin/gcc
            CPPFLAGS='-DNDEBUG -Df2cFortran'    # not "pgiFortran"
            CFLAGS=-O
            FC=/usr/bin/g77
            FFLAGS='-O -Wno-globals'
            CXX=/usr/bin/g++

        These setting are taken from a Linux example in the file
        INSTALL.html.

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

Please let me know if this helps.

Regards,
Steve Emmerson