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

[netCDF #JWW-712647]: NetCDF-Fortran installation problem: "checking whether the C compiler works... no"



Hello Benjamin,

From your config.log (thank you for providing!), it appears that somehow your 
`FC` variable isn't being set.  I base that on the following chunk from 
config.log:
## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-apple-darwin16.7.0
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_F77_set=
ac_cv_env_F77_value=
ac_cv_env_FCFLAGS_set=
ac_cv_env_FCFLAGS_value=
ac_cv_env_FC_set=
ac_cv_env_FC_value=

It appears that your environmental variables are not being passed along to the 
environment when `configure` is run, resulting in the errors you're seeing. How 
exactly are you setting these variables and running `configure`?

Thanks!

-Ward



> Sorry,
> Here’s the config.log file and full standard output:
> 
> configure: netCDF-Fortran 4.4.4
> checking build system type... x86_64-apple-darwin16.7.0
> checking host system type... x86_64-apple-darwin16.7.0
> checking target system type... x86_64-apple-darwin16.7.0
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... ./install-sh -c -d
> checking for gawk... no
> checking for mawk... no
> checking for nawk... no
> checking for awk... awk
> checking whether make sets $(MAKE)... yes
> checking whether make supports nested variables... yes
> checking whether to enable maintainer-specific portions of Makefiles... no
> configure: checking user options
> checking whether extra valgrind tests should be run... no
> checking whether parallel IO tests should be run... no
> checking whether netCDF extra tests should be run (developers only)... no
> checking for doxygen... no
> configure: WARNING: Doxygen not found - documentation will not be built
> checking for dot... no
> configure: WARNING: dot not found - will use simple charts in documentation
> configure: finding C compiler
> checking for gcc... gcc
> checking whether the C compiler works... no
> configure: error: in `/Users/benjaminstocker/Downloads/netcdf-fortran-4.4.4':
> configure: error: C compiler cannot create executables
> See `config.log' for more details
> 
> Thanks,
> b
> 
> 
> --
> -------------------------------------------------------------------------------
> Benjamin D Stocker
> Postdoctoral Researcher
> 
> bstocker.net<http://bstocker.net>
> 
> ORCID: 0000-0003-2697-9096
> ResearcherID: K-3194-2015
> 
> Global Ecology Unit
> CREAF
> Universitat Autonoma de Barcelona
> -------------------------------------------------------------------------------
> 
> On 21 Sep 2017, at 15:43, Benjamin Stocker 
> <address@hidden<mailto:address@hidden>> wrote:
> 
> Hi there,
> 
> To install NetCDF-Fortran on my Mac (OS X Sierra 10.12.6), I’m following 
> steps described on 
> http://www.unidata.ucar.edu/software/netcdf/docs/building_netcdf_fortran.html.
> 
> My NetCDF-C was istalled with cmake -DCMAKE_PREFIX_PATH=/opt/local/
> 
> I want to build NetCDF-Fortran with pgf95 in /opt/local, therefore I’m trying 
> to do this:
> 
> CC=/usr/local/gfortran/bin/gcc
> CXX=/usr/bin/g++
> FC=/opt/pgi/osx86-64/16.10/bin/pgf95
> NFDIR=/opt/local
> CPPFLAGS=-I${NCDIR}/include LDFLAGS=-L${NCDIR}/lib \
> ./configure --prefix=${NFDIR}
> 
> Unfortunately, I get the following messages:
> …
> checking for gcc... gcc
> checking whether the C compiler works... no
> configure: error: in `/Users/benjaminstocker/Downloads/netcdf-fortran-4.4.4':
> configure: error: C compiler cannot create executables
> 
> The full error message and config.log are pasted in below.
> 
> I’ve also tried with pointing to PGI C and C++ compilers with
> 
> CC=/opt/pgi/osx86-64/16.10/bin/pgc
> CXX=/opt/pgi/osx86-64/16.10/bin/pgc++
> 
> Howver, I always get
> 
> checking whether the C compiler works... no
> 
> Can you help?
> Thanks!
> 
> beni
> 
> --
> -------------------------------------------------------------------------------
> Benjamin D Stocker
> Postdoctoral Researcher
> 
> bstocker.net<http://bstocker.net/>
> 
> ORCID: 0000-0003-2697-9096
> ResearcherID: K-3194-2015
> 
> Global Ecology Unit
> CREAF
> Universitat Autonoma de Barcelona
> -------------------------------------------------------------------------------
> 
> 
> 


Ticket Details
===================
Ticket ID: JWW-712647
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.