This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> Full Name: Adam Wolf > Email Address: address@hidden > Organization: Stanford / Carnegie Inst > Package Version: 3.6.3 and 4 > Operating System: linux x86-64 > Hardware: > Description of problem: * I am trying to compile netcdf for g95. The first step - configure - works with no options, using pgf90. However, when I set F90=g95, FC=g77, CC=gcc, I run into the error: > > error: Fortran could not compile .f90 files > > * I checked the config.log and it turns out it is not using g95 as I asked it: > > configure:5510: checking for Fortran flag to compile .f90 files > configure:5532: g77 -c -g -O2 conftest.f90 >&5 > g77: conftest.f90: linker input file unused because linking not done > configure:5539: $? = 0 > configure: failed program was: > | program main > | > | end > configure:5532: g77 -c -g -O2 -qsuffix=f=f90 conftest.f90 >&5 > g77: unrecognized option `-qsuffix=f=f90' > g77: conftest.f90: linker input file unused because linking not done > configure:5539: $? = 0 > configure: failed program was: > | program main > | > | end > configure:5532: g77 -c -g -O2 -Tf conftest.f90 >&5 > g77: conftest.f90: linker input file unused because linking not done > configure:5539: $? = 0 > configure: failed program was: > | program main > | > | end > configure:5558: result: unknown > configure:5561: error: Fortran could not compile .f90 files > > * Note that the config commands being used work fine if g95 is used: > > [adamwolf@biosphere netcdf-4.0]$ cat >conftest.f90 <<_ACEOF > > program main > > > > end > > _ACEOF > [adamwolf@biosphere netcdf-4.0]$ g95 -c -g -O2 conftest.f90 > > * Any ideas? Thanks so much for your attention. > Adam > > Set FC=g95, and leave F90 unset. That will use g95 for both the F77 and F90 APIs. If you really do want to use g77 for the F77 API, set F77=g77 and F90=g95. Good luck, Ed Ticket Details =================== Ticket ID: GWV-937005 Department: Support netCDF Priority: Normal Status: Closed