Library netcdf.a problems when built with GNU gcc

From: Lew Randerson <LRanderson_at_Pppl.GOV>
Date: Mon, 15 Feb 1999 09:00:19 -0800

This concerns the netcdf library distributed by
unidata.ucar.aedu:pub/ncar when built with GNU gcc


When linking against library netcd, built with GNU gcc, using Digital
f77 and ld in debug mode we get the following load time error message

==== Here's the error message
========================================================================
$ /bin/f77 -g foo.f -L/scratch/randerso/lib -lnetcdf
ld:
Object file format error in: /scratch/randerso/lib/libnetcdf.a(nc.o):
local_is_complete: iaux(82) > iauxMax(80) for obj
/scratch/randerso/lib/libnetcdf.a(nc.o)
fort: Severe: Failed while trying to link.


==== Here's the relevant version numbers
========================================================================
Operating system is DU V4.0D
Fortran compiler is DIGITAL Fortran 77 V5.1-156-3882K
Loader is /usr/ucb/ld version 3.11
Gcc compiler is gcc version 2.7.2.3
netcdf version is 3.4


==== Here's the netcdf Build commands
========================================================================
$ cd /scratch/netcdf-3.4/src
$ CPPFLAGS=-DNDEBUG CC=gcc CFLAGS=-O FC=f77 FFLAGS=-O CXX=c++ ./configure
--prefix=/scratch/randerso
$ /bin/make
$ /bin/make test
$ /bin/make install


==== Here's the source that made the error
========================================================================
$ cd ~/TestFORTRAN/Karney_001
$ cat foo.f
      call nf_open
      end
$ /bin/f77 -g foo.f -L/scratch/randerso/lib -lnetcdf
ld:
Object file format error in: /scratch/randerso/lib/libnetcdf.a(nc.o):
local_is_complete: iaux(82) > iauxMax(80) for obj
/scratch/randerso/lib/libnetcdf.a(nc.o)
fort: Severe: Failed while trying to link.



There's no link problems if the library is built with DU cc

Thanks in advance for any help
--Lew
lranderson_at_pppl.gov
Received on Mon Feb 15 1999 - 13:59:52 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:39 NZDT