[netcdfgroup] -DpgiFortran needed for GCC 4.4?

Hi,

I was trying to build netcdf-4.1.1 on our upgraded linux installs ... which now 
feature gcc-4.4 (which apparently is incompatible with the Fortran modules 
created with the older gcc). I get linking troubles when trying to use the 
built Fortran lib, like those:

/data/scratch3/torgis/src/netcdf-4.1.1/nf_test/test_read.F:932: undefined 
reference to `nf_close_'
test_read.o: In function `test_nf_inq_att':
/data/scratch3/torgis/src/netcdf-4.1.1/nf_test/test_read.F:865: undefined 
reference to `nf_open_'
/data/scratch3/torgis/src/netcdf-4.1.1/nf_test/test_read.F:882: undefined 
reference to `nf_strerror_'
/data/scratch3/torgis/src/netcdf-4.1.1/nf_test/test_read.F:871: undefined 
reference to `nf_inq_att_'
/data/scratch3/torgis/src/netcdf-4.1.1/nf_test/test_read.F:874: undefined 
reference to `nf_inq_att_'
/data/scratch3/torgis/src/netcdf-4.1.1/nf_test/test_read.F:877: undefined 
reference to `nf_inq_att_'
/data/scratch3/torgis/src/netcdf-4.1.1/nf_test/test_read.F:880: undefined 
reference to `nf_inq_att_'
/data/scratch3/torgis/src/netcdf-4.1.1/nf_test/test_read.F:892: undefined 
reference to `nf_close_'
test_read.o: In function `test_nf_inq_vartype':
/data/scratch3/torgis/src/netcdf-4.1.1/nf_test/test_read.F:832: undefined 
reference to `nf_open_'
/data/scratch3/torgis/src/netcdf-4.1.1/nf_test/test_read.F:836: undefined 
reference to `nf_inq_vartype_'
/data/scratch3/torgis/src/netcdf-4.1.1/nf_test/test_read.F:839: undefined 
reference to `nf_inq_vartype_'
/data/scratch3/torgis/src/netcdf-4.1.1/nf_test/test_read.F:842: undefined 
reference to `nf_inq_vartype_'
/data/scratch3/torgis/src/netcdf-4.1.1/nf_test/test_read.F:849: undefined 
reference to `nf_close_'
test_read.o: In function `test_nf_inq_varndims':
/data/scratch3/torgis/src/netcdf-4.1.1/nf_test/test_read.F:801: undefined 
reference to `nf_open_'
/data/scratch3/torgis/src/netcdf-4.1.1/nf_test/test_read.F:805: undefined 
reference to `nf_inq_varndims_'
/data/scratch3/torgis/src/netcdf-4.1.1/nf_test/test_read.F:808: undefined 
reference to `nf_inq_varndim


Knowing such issues with other 3rd party compilers, I added -DpgiFortran to 
CPPFLAGS for the netcdf build and that works. I guess some version checking 
needs to be updated to correctly work with current gcc versions?
I suspect that it will be tiresome to tell people to define that preprocessor 
flag on for the system-installed gcc...


Alrighty then,

Thomas.

-- 
Dipl. Phys. Thomas Orgis
Atmospheric Modelling
Alfred-Wegener-Institute for Polar and Marine Research



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