[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #DAH-931198]: Problem with basic make /check on mac with gnu compilers
- Subject: [netCDF #DAH-931198]: Problem with basic make /check on mac with gnu compilers
- Date: Wed, 19 May 2010 22:40:24 -0600
Hi Lydia,
> For more than a week now, I've occupied myself with trying to install netcdf
> (version 4.1.1), and despite modifying flags and other 'details', I have yet
> to come up with a combination that will work on my mac. Obviously I'm doing
> something wrong, but I just can't figure out what, and probably should have
> asked for help before now, though I wanted to exhaust all options before
> doing so. I've not had much experience installing libraries such as these
> in general, though, so my lack of experience is probably to blame.
>
> I've followed all the instructions from your website as best as I can tell,
> including suggestions in the troubleshooting to disable netcdf-4 and disable
> c++ and fortran options, leaving only the basic c options, and still run
> into trouble.
>
> Compile and make run fine, but make check does not. I get lots of errors
> that look like 'ld warning: can't find atom for N_GSYM stabs ' etc, and lots
> of 'Undefined symbol: _nf_"etc (filenames in the last example mostly start
> with _nf_).
Those warnings indicate it is still trying to build the Fortran APIs,
as those all begin with nf_ or nf90_.
> I've attached the configure, make and make check outputs.
>
> Thanks very much for any help you can offer,
I think you are using the gcc that comes with MacOS X, but a gfortran
installed in /usr/local/bin/gfortran that's not compatible with it.
On MacOS X, I've always had to use the same version gcc as gfortran,
and then things seem to work fine.
For example, I built netcdf-4.1.1 on MacOS X 10.6.3 using the gcc and
gfortran versions 4.4.1 from the gcc-leopard-intel-bin.tar.gz (Intel
Mac) link on http://hpc.sourceforge.net/, but you could probably also
use the 4.5 versions, from the gcc-snwleo-intel-bin.tar.gz (Snow
Leopard) link on the same web site. These are binary distributions, so
installation is quick and easy installing matching gcc/gfortran in
/usr/local/bin according to the instructions on that site:
... 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. You
invoke F95 by typing gfortran. You will also need to have Apple's
Developer Tools installed. ...
and setting my PATH to include /usr/local/bin fist, so those gcc and
gfortran versions were found by the configure script. Then everything
just worked when I invoked
./configure --prefix=<whatever>
make check
make install
including the Fortran and C++ interfaces.
--Russ
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: DAH-931198
Department: Support netCDF
Priority: Normal
Status: Closed