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

Re: 20020911: Installing netcdf...



>To: address@hidden
>From: Virginie Hugouvieux <address@hidden>
>Subject: Installing netcdf...
>Organization: Institut Laue-Langevin
>Keywords: 200207110737.g6B7bsa17496

Hi Virginie,

> I have tried to install the Netcdf 3.5.0 library, but I encountered some 
> difficulties during the tests.
> Could you please help me to solve this problem ?
> 
> A. The command uname -a gives :
> 
> Linux vhpc 2.4.4-4GB # 1 Fri May 18 14:11:12 GMT 2001 i686 unknown
> 
> C . C compiler : /usr/bin/gcc
>      C++ compiler : /usr/bin/g++
>      Fortran compiler : /usr/bin/g77
> 
> The files B,D,E,F,G are in attachment.
 ...
> Making `all' in directory /home/hugouvie/nMOLDYN/netcdf-3.5.0/src/libsrc
> 
> make[2]: Entering directory `/home/hugouvie/nMOLDYN/netcdf-3.5.0/src/libsrc'
> /usr/bin/gcc -c -O -I.  -DNDEBUG -DpgiFortran attr.c
> /usr/bin/gcc -c -O -I.  -DNDEBUG -DpgiFortran dim.c
> /usr/bin/gcc -c -O -I.  -DNDEBUG -DpgiFortran error.c
 ...
> Making `test' in directory /home/hugouvie/nMOLDYN/netcdf-3.5.0/src/nf_test
> 
> make[2]: Entering directory `/home/hugouvie/nMOLDYN/netcdf-3.5.0/src/nf_test'
> + /usr/bin/f77 -c -O -w test_get.F
> + /usr/bin/f77 -c -O -w test_put.F
> + /usr/bin/f77 -c -O -w nf_error.F
> + /usr/bin/f77 -c -O -w nf_test.F
> + /usr/bin/f77 -c -O -w test_read.F
> + /usr/bin/f77 -c -O -w test_write.F
> + /usr/bin/f77 -c -O -w util.F
> /usr/bin/gcc -c -O   -DNDEBUG -DpgiFortran fortlib.c
> /usr/bin/f77 -o nf_test -O -w  test_get.o test_put.o nf_error.o nf_test.o 
> test_read.o test_write.o util.o fortlib.o ../libsrc/libnetcdf.a  -lm 
> /usr/lib/gcc-lib/i486-suse-linux/2.95.3/libg2c.a(open.o): In function 
> `f_open':
> open.o(.text+0x4da): the use of `tempnam' is dangerous, better use `mkstemp'
> test_get.o: In function `test_nf_get_var1_text__':
> test_get.o(.text+0x24): undefined reference to `nf_open__'
> test_get.o(.text+0xc8): undefined reference to `nf_get_var1_text__'
 ...

I believe the problem is that you are specifying the flag
"-DpgiFortran" in your CPPFLAGS (or CFLAGS) environment variable, but
you aren't actually using the PGI (Portland Group) compiler, so the
wrong Fortran-to-C calling conventions are getting used.  

Try the following and please let me know if it works:

 - Go to to the top-level source directory.

 - Execute the command "make distclean".

 - Set the environment variable CPPFLAGS to contain the string "-Df2cFortran".

 - Re-execute the configure script.

 - Execute the command "make".

 - Execute the command "make test".

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu