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

[netCDF #HQJ-659259]: Error running ./configure when trying to install netCDF 3.6.3


> Thanks for your quick reply!  I combed through the error log and found
> the following things.  I'm not sure if any of these are "bad" except the
> last one, which caused ./configure to fail.  I've attached the entire
> config.log file in case I missed something.

Only the last one is causing the problem.

> To answer your other question, I'm using an older version of netCDF
> because I'm going to use it in conjunction with ROMS (Regional Ocean
> Modeling System) and I wasn't sure if a newer version would work.  Although,
> if it helps eliminate the problems I'm currently having, I'll gladly use the
> newer one!

New netCDF releases are supposed to support existing data and existing programs
without requiring any conversion of data or changes to existing programs.  So
if you build netCDF-4.1.1 (the latest released version) using the configure
options --disable-netcdf-4 and --disable-dap, the result will only support
netCDF-3 formats and data model, and it should work fine with ROMS.

However, you should also be able to build from netCDF-3.6.3, although it will
have a few bugs that have been fixed in later releases.

> 7)
> configure:23854: checking if Fortran "byte" is C "signed char"
> configure:23864: cc -c  -g -O2 conftest.c
> conftest.c: In function 'sub_':
> conftest.c:4: warning: incompatible implicit declaration of built-in
> function 'exit'
> configure:23867: $? = 0
> configure:23870: gfortran -O3 -c conftestf.f
> configure:23873: $? = 0
> configure:23876: gfortran -o conftest -O3  conftestf.o conftest.o
> ld: warning: in conftetest.o, file was built for unsupported file format
> which is not the architecture being linked (i386)
> Undefined symbols:
> "_sub_", referenced from:
> _MAIN__ in conftestf.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> configure:23879: $? = 1
> configure:23902: error: Could not link conftestf.o and conftest.o

You are using /usr/bin/cc for the C compiler (Apple build from gcc 4.2.1), 
but GNU Fortran 4.3.0 from 2007 as the Fortran compiler.  I think that is 
the problem, that you need compatible versions of gfortran and gcc, because 
gfortran is just a front-end to gcc.  If you put /usr/local/bin in front of
/usr/bin in your path, the version of gcc found there would be compatible 
with the gfortran found there and may work.

Alternatively, you could get a more up-to-date gfortran and matching gcc
from a site such as http://hpc.sourceforge.net/, which has binaries that
are easy to install.  For example, if you are using Snow Leopard, you could
install the binary package gcc-snwleo-intel-bin.tar.gz which has both gcc
and a matching gfortran, installed according to the instructions given there:

  ... Download my binaries, and cd to the download folder. Then gunzip  
  gcc-bin.tar.gz (if your browser didn't do so already) and sudo tar -xvf 
  gcc-bin.tar -C /. It installs everything in /usr/local. ...

That site also says you need the latest version of Apple's Developer Tools 

I've verified that combination builds from either netcdf-3.6.3 or 


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

Ticket Details
Ticket ID: HQJ-659259
Department: Support netCDF
Priority: Normal
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.