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

[netCDF #IWZ-787287]: Compiling NetCDF-4 with PGI 32bit mode



Robert,

> I am attaching the 2 files.

OK, From the config.log file, I see the following error in trying to 
link a C program with a Fortran subroutine:

 configure:24133: checking if Fortran "byte" is C "short"
 configure:24143: cc -c  -g -O2 conftest.c
  ...
 configure:24149: pgf95 -g -c conftestf.f
 configure:24152: $? = 0
 configure:24155: pgf95 -o conftest -g  conftestf.o conftest.o  
 /usr/bin/ld: warning: i386:x86-64 architecture of input file `conftest.o' is 
incompatible with i386 output

This indicates your C compiler, cc, is generating 64-bit objects,
but your Fortran compiler pgf95 is generating 32-bit objects, so
pgf95 can't link these together.  I think you just need to specify 
a flag to the C compiler to make it generate 32-bit objects also, 
for example by setting CFLAGS="-m32" before invoking configure, e.g.

  $ export CFLAGS=-m32
  $ export FC=pgf95
    ...
  $ make distclean
  $ ./configure ...
  $ make check
  $ make install

Alternatively, you could use pgcc instead of cc, if pgcc is also a
compiler that produces 32-bit objects.

--Russ

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



Ticket Details
===================
Ticket ID: IWZ-787287
Department: Support netCDF
Priority: Normal
Status: Closed