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

20040405: netCDF 5.1 build on Linux using NAG Fortran-95



Sandy,

>Date: Mon, 05 Apr 2004 15:42:32 -0400
>From: Sandy Sillman <address@hidden>
>Organization: University of Michigan
>To: Steve Emmerson <address@hidden>
>Subject: Re: 20040405: netCDF 5.1 build on Linux using NAG Fortran-95
> Keywords: 200404012156.i31LuuCT013274 netCDF 3.5.1

The above message contained the following:

> Thanks. Unfortunately, with your settings, the problem still persists.
> "make test" fails.  (Slightly different failure than before.)

Actually, the failure is significantly different.  (see below)

>  I noticed that I was able to perform the netCDF INSTALL successfully, even
> though the TEST fails.  I don't know if I will be able to use netCDF with
> this - I suspect that it will fail when I first try to run the program.

I predict that your program won't fail due to the Fortran-90 netCDF
interface.  (see below)

> I am enclosing the macros.make, config.log, configure.log, make.log and
> test.log from this attempt.  I am also enclosing the install.log from the
> PREVIOUS attempt - I did not install it again.
> 
> '-dusty' is a flag that allows f95 to use obsolescent code.
> 
> FYI:  Here is a summary of relevant material:
> 
> SETTINGS:
>             setenv CC /usr/bin/gcc
>             setenv CPPFLAGS "-DNDEBUG -DNAGf90Fortran"
>             setenv CFLAGS -O
>             setenv FC /usr/local/bin/f95
>             setenv FFLAGS "-O -dusty -w"
>             setenv F90 /usr/local/bin/f95
>             setenv F90FLAGS "-O -w=unused -mismatch_all"
>             unsetenv FPP
> 
> 
> uname -a
> Linux ravenclaw.engin.umich.edu 2.4.20-24.9 #1 Mon Dec 1 11:43:36 EST 2003
> i686 athlon i386 GNU/Linux
> 
> VERSION:
> 3.5.1
> 
> 
> ERROR MESSAGES FROM config.log AND test.log ARE SHOWN HERE
>   
> config.log:  
...

> test.log: 
> 
> make[2]: Entering directory
> `/home/sillman/cmaq03/lib/netCDF/netcdf-3.5.1/src/nf_test'
> + /usr/local/bin/f95 -c -O -dusty -w test_get.F
> + /usr/local/bin/f95 -c -O -dusty -w test_put.F
> + /usr/local/bin/f95 -c -O -dusty -w nf_error.F
> + /usr/local/bin/f95 -c -O -dusty -w nf_test.F
> + /usr/local/bin/f95 -c -O -dusty -w test_read.F
> + /usr/local/bin/f95 -c -O -dusty -w test_write.F
> + /usr/local/bin/f95 -c -O -dusty -w util.F
> /usr/bin/gcc -c -O   -DNDEBUG -DNAGf90Fortran fortlib.c
> /usr/local/bin/f95 -o nf_test -O -dusty -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
> nf_test.o(.text+0x208): In function `main':
> : undefined reference to `getarg_'
> nf_test.o(.text+0x23f): In function `main':
> : undefined reference to `iargc_'
> nf_test.o(.text+0x285): In function `main':
> : undefined reference to `getarg_'
> nf_test.o(.text+0x2d1): In function `main':
> : undefined reference to `getarg_'
> collect2: ld returned 1 exit status
> make[2]: *** [nf_test] Error 1
> make[2]: Leaving directory
> `/home/sillman/cmaq03/lib/netCDF/netcdf-3.5.1/src/nf_test'
> make[1]: *** [subdir_target] Error 1
> make[1]: Leaving directory
> `/home/sillman/cmaq03/lib/netCDF/netcdf-3.5.1/src'
> make: *** [nf_test/test] Error 2

The "make test" in the nf_test/ subdirectory failed because the NAG
Fortran-95 linker couldn't resolve the getarg(3f) symbols.  These
symbols are the standard UNIX way of passing command-line arguments to
programs.  It appears that NAG Fortran-95 doesn't supply a standard UNIX
development environment.  For more on this see

    http://www.unidata.ucar.edu/cgi-bin/msgout?/glimpse/netcdf/4475

You might be OK (see the above link).  In which case a "make install"
would be appropriate.

Regards,
Steve Emmerson