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

20030728: NetCDF 3.5.1 beta 11 & RedHat 9: environment variables



Andre,

> To: <address@hidden>
> From: "Andre Luiz Mendes Matos" <address@hidden>
> Subject: Problem to compile NetCDF 3.5
> Organization: Home

The above message contained the following:

> I got the netCDF 3.5.1 beta 11, but I am still have problem to compile in
> Linux RedHat 9. Now a get other error. All the steps and error are below:
> 
> 
> [root@localhost local]# CPPFLAGS='-Df2cFortran -DNDEBUG'
> [root@localhost local]# CC=/usr/bin/cc # version 2.7.2.1-4
> [root@localhost local]# CFLAGS=-O
> [root@localhost local]# FC=g77 # version 0.5.19.1-1
> [root@localhost local]# FFLAGS=-O
> [root@localhost local]# CXX=/usr/bin/c++
...

> [root@localhost src]# ./configure --disable-shared --prefix=/usr/local/mni
> creating cache ./config.cache
> checking for top-level source-directory
> /usr/local/netcdf-3.5.1-beta11/src
> checking for m4 preprocessor
> checking for m4... m4
> checking m4 flags... -B10000
> checking for xlc... no
> checking for c89... c89
> checking C compiler "c89"... works

The last three lines above indicate that the configure script did not
use the pathname of the C compiler that you assigned to the CC variable.
I suspect that your CC variable was a shell variable rather than an
environment variable.  Further evidence for this is the following:

> Making `all' in directory /usr/local/netcdf-3.5.1-beta11/src/libsrc
>  
> make[2]: Entering directory `/usr/local/netcdf-3.5.1-beta11/src/libsrc'
> c89 -c -O -I.  -DNDEBUG attr.c

Note that the "c89" compiler is used instead of "/usr/bin/cc".

Please try the following:

    1.  Go to the top-level source directory.

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

    3.  Ensure that the relevant environment variables (rather than shell
        variables) are appropriately set.  For example:

            export CPPFLAGS='-Df2cFortran -DNDEBUG'
            export CC=/usr/bin/cc
            export CFLAGS=-O
            export FC=g77
            export FFLAGS=-O
            export CXX=/usr/bin/c++

        or

            setenv CPPFLAGS '-Df2cFortran -DNDEBUG'
            setenv CC /usr/bin/cc
            setenv CFLAGS -O
            setenv FC g77
            setenv FFLAGS -O
            setenv CXX /usr/bin/c++

        depending on your user-shell.

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

Please let me know if this helps.

Regards,
Steve Emmerson