[netcdfgroup] Error compiling netcdf-fortran 4.2 with PGI on OSX

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.  
For the Fortran package the configure script goes fine, but I get the following 
on make check:

Making check in f90
make  check-am
make[2]: Nothing to be done for `check-am'.
Making check in fortran
make  check-am
Making check in nf_test
make  nf_test tst_f77_v2 ftst_vars ftst_vars2 ftst_vars3 ftst_vars4 ftst_vars5 
ftst_vars6 ftst_types ftst_types2 ftst_types3 ftst_groups f90tst_vars tst_types 
tst_types2 f90tst_vars_vlen tst_f90_nc4 f90tst_grps f90tst_fill f90tst_fill2 
f90tst_vars3 f90tst_vars4 f90tst_vars2 ftst_v2     ftest tst_f90
source='fortlib.c' object='fortlib.o' libtool=no \
DEPDIR=.deps depmode=none /bin/sh ../depcomp \
pgcc -DHAVE_CONFIG_H -I. -I.. -I../fortran   -DpgiFortran 
-I/usr/local/netcdf/4.2.1.1-pgi/include -I/usr/local/include  -Msignextend  -c 
-o fortlib.o fortlib.c
/bin/sh ../libtool --tag=F77   --mode=link pgf77 -I../fortran  -I../f90 -w   
-L/usr/local/netcdf/4.2.1.1-pgi/lib -L/usr/local/lib -o nf_test test_get.o 
test_put.o nf_error.o nf_test.o test_read.o test_write.o util.o fortlib.o 
../fortran/libnetcdff.la  -lnetcdf
libtool: link: pgf77 -I../fortran -I../f90 -w -o nf_test test_get.o test_put.o 
nf_error.o nf_test.o test_read.o test_write.o util.o fortlib.o  
-L/usr/local/netcdf/4.2.1.1-pgi/lib -L/usr/local/lib 
../fortran/.libs/libnetcdff.a -L/usr/local/netcdf/4.2.1.1-gnu/lib 
/usr/local/netcdf/4.2.1.1-gnu/lib/libnetcdf.dylib 
/usr/local/lib/libhdf5_hl.dylib /usr/local/lib/libhdf5.dylib -lm -lz
ld: duplicate symbol _main in nf_test.o and 
/opt/pgi/osx86-64/12.10/lib/pgfmain.o
make[2]: *** [nf_test] Error 2
make[1]: *** [check-am] Error 2
make: *** [check-recursive] Error 1

For what it's worth, I get the same "duplicate symbol _main in nf_test.o and 
/opt/pgi/osx86-64/12.10/lib/pgfmain.o" error when I try to build NetCDF 3.6.3 
with PGI compilers as well.  Has anyone on the list successfully compiled 
NetCDF (any version) on OSX using PGI 12.xx compilers, or does anyone have any 
suggestions?  I've tried the tips in the "PGI Guide to NetCDF" for NetCDF 4.1.1 
(http://www.pgroup.com/resources/netcdf/netcdf411_pgi2011.htm), but that did 
not fix the problems.

Cheers,
Jared
  • 2013 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: