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

[netCDF #BPE-761936]: Error compiling netcdf-fortran 4.2 with PGI on OSX



Hi Jared,

> Hi, I'm trying to compile NetCDF-Fortran 4.2 on Mac OSX (10.6.8) using PGI 
> compilers (12.10).  The C package for NetCDF 4.2.1.1 appeared to build fine, 
> and the config script for the Fortran package seemed to go fine.  I get 
> errors when I run make check, however:
> 
> PGC-W-0095-Type cast required for this conversion (fort-nc4.c: 205)
> PGC-W-0095-Type cast required for this conversion (fort-nc4.c: 207)
> PGC-W-0095-Type cast required for this conversion (fort-nc4.c: 209)
> PGC-W-0095-Type cast required for this conversion (fort-nc4.c: 211)
> PGC-W-0095-Type cast required for this conversion (fort-nc4.c: 213)
> PGC-W-0095-Type cast required for this conversion (fort-nc4.c: 216)
> PGC-W-0095-Type cast required for this conversion (fort-nc4.c: 218)
> PGC-W-0095-Type cast required for this conversion (fort-nc4.c: 220)
> PGC-W-0095-Type cast required for this conversion (fort-nc4.c: 222)
> PGC-W-0095-Type cast required for this conversion (fort-nc4.c: 224)
> PGC/x86-64 OSX 12.10-0: compilation completed with warnings

I believe those warnings aren't of any concern and shouldn't have caused
the tests to fail.

> ld: duplicate symbol _main in nf_test.o and 
> /opt/pgi/osx86-64/12.10/lib/f90main.o
> make[2]: *** [nf_test] Error 2
> make[1]: *** [check-am] Error 2
> make: *** [check-recursive] Error 1

It looks as if the main program in nf_test/nf_test.F is for some reason in 
conflict
with the main program in the pgf90 run-time library, which is an error I 
haven't 
seen before.  I don't know what would cause that problem.  We don't have PGI 
compilers installed on our Mac platform for testing, so I can't duplicate the 
problem.

I don't see any indication of anything wrong in config.log.  It seems like the
linker on MacOS-X should be dyld instead of ld, and I see that the configure 
script determines dyld works OK:

  configure:16593: checking dynamic linker characteristics
  configure:17202: result: darwin10.8.0 dyld

but it seems like libtool would use the right linker.

The only other thing I can suggest is looking at the "PGI Guide to netCDF'

  http://www.pgroup.com/resources/netcdf/netcdf411_pgi2011.htm

even though it's for an older version, 4.1.1, where the Fortran API was
still bundled with the C library.  Maybe some compiler flag they suggest 
or workaround they mention will be relevant to the problem.  Alternatively,
you could post the question to the netcdfgroup mailing list, in case someone
else has succeeded with PGI compilers.

You could also check these notes from a user in 2010 who succeeded:

  http://www.unidata.ucar.edu/netcdf/docs/other-builds.html#mac_pgi

--Russ

> Do you have any idea what's going wrong?  I've attached my config.log file, 
> as well as output from the make check (makecheck.log).  If you need any other 
> info or files from me in order to help diagnose the issue, please let me 
> know.  Thanks.
> 
> Jared
> 
> 
> 
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: BPE-761936
Department: Support netCDF
Priority: Normal
Status: Closed