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

[netCDF #WGQ-990828]: netcdf fortran libraries

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.


  • Subject: [netCDF #WGQ-990828]: netcdf fortran libraries
  • Date: Thu, 16 Mar 2017 11:06:18 -0600

Hello Marko,

I think I see the issue.  The symptom of the problem is that arguments are 
being passed to libtool that it does not expect.  I suspect this to be the 
issue because, at the bottom of the make.log file you provided, I see the 
following line:

 > /bin/sh ../libtool  --tag=F77   --mode=link  -I../fortran   -I../fortran    
 > -o nf_test f03lib_f_interfaces.o test_get.o test_put.o nf_error.o nf_test.o 
 > test_read.o test_write.o util.o f03lib.o ../fortran/libnetcdff.la -lnetcdf

This is missing something; it should instead read along the lines of:

> /bin/sh ../libtool  --tag=F77   --mode=link [fortran compiler]  -I../fortran  
>  -I../fortran    -o nf_test f03lib_f_interfaces.o test_get.o test_put.o 
> nf_error.o nf_test.o test_read.o test_write.o util.o f03lib.o 
> ../fortran/libnetcdff.la -lnetcdf

I believe you will need to set the F77 environmental variable to `pgfortran`, 
e.g. 

    $ F77=pgfortran .//configure

This should result in the following command being run at compile time:

> /bin/sh ../libtool  --tag=F77   --mode=link pgfortran -I../fortran   
> -I../fortran    -o nf_test f03lib_f_interfaces.o test_get.o test_put.o 
> nf_error.o nf_test.o test_read.o test_write.o util.o f03lib.o 
> ../fortran/libnetcdff.la -lnetcdf

Give this a try and if the issue persists, please provide the updated config 
and make logs and I will see what we can sort out!

Thank you very much, have a terrific day,

-Ward

> Hi,
> 
> I am trying to build the netcdf fortran libraries v4.4.4 on my
> MacBookPro under 10.12 Sierra. I am using a slightly older netcdf-C
> library v4.2.1 on my computer.
> 
> Installing the fortran libraries with gfortran works fine, except for
> the new 4.4 features (rename groups), but when I try to install them
> with pgfortran I get an error message, see attached log files.
> 
> Do you have any idea what's going wrong?
> 
> Many thanks
> Marko
> 
> 
> 
> 
> --
> Dr. Marko Scholze
> Senior Lecturer
> Department of Physical Geography and Ecosystem Science
> Lund University, Sölvegatan 12, SE-223 62 Lund
> Phone:+46 46 222 4082
> www.nateko.lu.se
> 
> 
> 
> 


Ticket Details
===================
Ticket ID: WGQ-990828
Department: Support netCDF
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.