[netcdf-porting] NetCDF with Absoft Fortran on an Intel Mac?

Clay Blankenship clay.blankenship at nsstc.uah.edu
Wed Mar 5 14:39:30 MST 2008


Thank you, that seems to have worked.  However, I still have a  
problem.  The .o files that are created under the distribution directory
have the underscores appended to the symbol names (which I need for  
compatibility with my other packages), but the .o files in the  
install libraries
do not.  How can I get the underscores appended to the symbol names  
in the .o files?

Thanks,
Clay

On Mar 5, 2008, at 2:21 PM, Russ Rew wrote:

> Hi Clay,
>
>> Has anyone built NetCDF with Absoft Fortran (10.0) on an Intel Mac?
>> I am trying to do so and having problems.  I have defined FFLAGS and
>> F90FLAGS to be "-YEXT_NAMES=LCS -YEXT_SFX=_" (symbol names in
>> lowercase and with an appended underscore)for compatibility with my
>> other packages.  I am getting a bunch of undefined references when I
>> do the "make check" and it gets to this command (I show the command
>> and the output):
>>
>> /Applications/Absoft10/bin/f90 -I../fortran -I../libsrc -I../ 
>> fortran -
>> p../f90 -YEXT_NAMES=LCS -YEXT_SFX=_ -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  ../
>> libsrc/.libs/libnetcdf.a
>> /usr/bin/ld: Undefined symbols:
>> _nf__create_
>> _nf__create_mp_
>>
>> [a whole bunch of others]
>>
>> _min_short_
>> test_get.o reference to undefined _nf__create_
>> test_get.o reference to undefined _nf__create_mp_
>> test_get.o reference to undefined _nf__enddef_
>> test_get.o reference to undefined _nf__open_
>> test_get.o reference to undefined _nf__open_mp_
>> test_get.o reference to undefined _nf_abort_
>> test_get.o reference to undefined _nf_close_
>> test_get.o reference to undefined _nf_copy_att_
>> test_get.o reference to undefined _nf_copy_var_
>> test_get.o reference to undefined _nf_create_
>> more references to undefined symbols ...
>> collect2: ld returned 1 exit status
>> link failed.
>> make[2]: *** [nf_test] Error 1
>> make[1]: *** [check-am] Error 2
>> make: *** [check-recursive] Error 1
>
> Some time ago, Roy Mendelssohn reported this worked:
>
>   If it will help anyone, I have found the following settings will
>   successfully build the full Netcdf4 distribution and pass all the
>   tests on an Intel mac using Absoft Fortran Pro 10.
>
>   FC=/Applications/Absoft10/bin/f90
>   CPPFLAGS=-DpgiFortran
>   F77=/Applications/Absoft10/bin/f90
>   FFLAGS=-YEXT_NAMES=LCS -s -YEXT_SFX=_
>   FCFLAGS=-YEXT_NAMES=LCS -s -YEXT_SFX=_
>   FCFLAGS_F90=-YEXT_NAMES=LCS -s -YEXT_SFX=_
>
> --Russ

-- 
Clay Blankenship                          clay.blankenship at nsstc.uah.edu
USRA                                                                     
              256-961-7638
National Space Science and Technology Center
Huntsville, AL 35801





More information about the netcdf-porting mailing list