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

[netCDF #TIU-359130]: Additional information regarding ticket MAV-429067

Hi Steve,

> Regarding the MAV-429067 problem (see below), I've also  tried a C only 
> install by exporting FC=' ' and CXX=' ' prior to running configure.
> This didn't work, as configure still tried to compose a makefile with FC = 
> gfortran. Then I tried:
> ./configure âprefix=/Applications/local âdisable-netcdf-4 âdisable-dap  
>   --disable-fortran
> which worked, i.e. make , check and install all looked OK and the resulting 
> files linked with my C programs.
> I suspect the first problem I note below, i.e. the one that stops the 
> configure script with :
> 'checking if Fortran "byte" is C "signed' char"... configure: error: Could 
> not link conftestf.o and conftest.o'
> is a problem with the Xcode supplied version of gfortran. I think I could  
> figure this out on my own if I wanted to use gfortran, e.g., install another
> gfortran version.

Yes, on OSX Xcode doesn't come with a Fortran compiler, so whatever version of 
gfortran you have must have
been installed separately, and may not be compatible with the gcc that comes 
with XCode.

> The thing that has me confused is the second problem, i.e., why is the 
> configure script ignoring the environment variables that I've defined.
> I've run a test to check that a simple local bash script recognizes global 
> variables that I've set via export, and it does. That is,
> Export TEST='This is a Test'
> # TEST.scr
> Echo $TEST
> exit
> echoes $TEST when I enter TEST.scr <ret> at the command line.
> I'm doing this all with Root User enabled. Is there something about configure 
> that I'm missing?. I've looked through configure âh but can't see anything 
> that
> relates to this. This looks like a dumb problem, but for the life of me I 
> can't figure it out.

On most systems, sudo does not permit inheriting environment variables, because 
it opens a security problem.
See the "Command Environment" section of this sudo guide for workarounds:



> Dear Support-Netcdf:
> I'm trying to install a 'Classic' netcdf with dap disabled on OSX Ver. 10.8 
> (Mountain Lion with Xcode Ver. 4.5.1 ) but I'm having trouble getting the 
> configure script to work properly.
> The following logs are in the attached  zip file:
> The output of env  listing the environment variables is in env.log.
> The output of  ./configure âprefix=/Applications/local âdisable-netcdf-4 
> âdisable-dap     is  in  configure.log (the STDOUT output) and config.log.
> Although they don't contain much, the zip files also contains the STDOUT of 
> make (make.log) make check (check.log) and make install (install.log).
> The netcdf  version is -n 4.1.3 , and I'm trying to install it on a Mac 
> running OSX Mountain Lion (10.8) with an Absoft Version 11.5  Fortran compiler
> I set the following environment variables before running configure. These 
> were similar to my last successful install of  netcdf 4.0.1 on a Mac (OSX 
> Ver. 4.5.8).
> export CC=/usr/bin/gcc
> export CPPFLAGS=-DAbsoftProFortran
> export FFLAGS='-YEXT_NAMES=LCS   âs   âYEXT_SFX=_'
> export FCFLAGS='-YEXT_NAMES=LCS   âs   âYEXT_SFX=_'
> export F90=/Applications/Absoft11.5/bin/af90
> export FC=/Applications/Absoft11.5/bin/af90
> export F77=/Applications/Absoft11.5/bin/af77
> There are two problems that I can see in  configure.log.
> 1) The error the the configure script ends at, i.e.,  checking if Fortran 
> "byte" is C "signed' char"... configure: error: Could not link conftestf.o 
> and conftest.o'
> and 2) , it seems that the configure script is ignoring the environment 
> variables that I've defined.
> When I enter  env > env.log  <ret> before I run configure I get (among other 
> things, see env.log for full output)
> CPPFLAGS=-DAbsoftProFortran
> F90=/Applications/Absoft11.5/bin/af90
> F77=/Applications/Absoft11.5/bin/af77
> FC=/Applications/Absoft11.5/bin/af90
> CC=/usr/bin/gcc
> But the STDOUT of configure (in configure.log) shows:
> checking CPPFLAGS...
> âââ âââ âââ.
> checking FC... gfortran
> checking FFLAGS... -g -O2
> checking type gfortran... gfortran is /sw/bin/gfortran
> checking F90... gfortran
> checking FCFLAGS... -g -O2
> checking type gfortran... gfortran is /sw/bin/gfortran
> Any idea what I'm doing wrong?  That is,  why aren't I seeing:
> checking FC... /Applications/Absoft11.5/bin/af90
> checking FFLAGS... -YEXT_NAME=LCS -s -YEXT-SFX=_
> etc.
> -- Steven A. Mauget
> USDA-ARS  Plant Stress and Water Conservation Lab
> 3810 4th Street
> Lubbock, Texas 79424
> 806-723-5237 (Phone)
> 806-723-5272 (Fax)
> This electronic message contains information generated by the USDA solely for 
> the intended recipients. Any unauthorized interception of this message or the 
> use or disclosure of the information it contains may violate the law and 
> subject the violator to civil or criminal penalties. If you believe you have 
> received this message in error, please notify the sender and delete the email 
> immediately.
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu

Ticket Details
Ticket ID: TIU-359130
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.