C compiler cannot create executables -- compile the netcdf

Hi:


I want to compile netcdf using pgi, when I config it:
sudo ./configure --prefix=/home/ww/pros/netcdf4.0.1 FC=pgf95 CXX=pgCC CC=pgcc F77=pgf77
I got a error:
C compiler cannot create executables

I have seen this problem shown in this forum
https://forums.developer.nvidia.com/t/netcdf-4-0-1-shared-library/131621/1 I encounted it now, and the way mentioned in the thread seems does not work for me(I used the export way to sepcify the cc parameter and etcs, things does not change).

And the config.log is :

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by netCDF configure 4.0.1, which was
generated by GNU Autoconf 2.62. Invocation command line was

$ ./configure --prefix=/home/ww/pros/netcdf4.0.1 FC=pgf95 CXX=pgCC CC=pgcc F77=pgf77

---------

Platform.

---------

hostname = CoM
uname -m = i686
uname -r = 2.6.31-14-generic
uname -s = Linux
uname -v = #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/X11R6/bin

\

-----------

Core tests.

-----------

configure:2291: netCDF 4.0.1
configure:2335: checking build system type
configure:2353: result: i686-pc-linux-gnu
configure:2375: checking host system type
configure:2390: result: i686-pc-linux-gnu
configure:2437: checking for a BSD-compatible install
configure:2505: result: /usr/bin/install -c
configure:2516: checking whether build environment is sane
configure:2559: result: yes
configure:2584: checking for a thread-safe mkdir -p
configure:2623: result: /bin/mkdir -p
configure:2636: checking for gawk
configure:2666: result: no
configure:2636: checking for mawk
configure:2652: found /usr/bin/mawk
configure:2663: result: mawk
configure:2674: checking whether make sets $(MAKE)
configure:2696: result: yes
configure:2888: checking user options
configure:2931: checking whether CXX is set to ‘’
configure:2935: result: no
configure:2939: checking whether FC is set to ‘’
configure:2943: result: no
configure:2947: checking whether F90 is set to ‘’
configure:2951: result: no
configure:2955: checking whether a NCIO_MINBLOCKSIZE was specified
configure:2965: result: 256
configure:2975: checking whether this is a netCDF-4.x build
configure:2983: result: yes
configure:2987: checking whether extra valgrind tests should be run
configure:2995: result: no
configure:3001: Processing NetCDF-4 options.
configure:3006: checking whether netCDF-4 is to be built
configure:3014: result: no
configure:3030: checking whether new netCDF-4 C++ API is to be built
configure:3038: result: no
configure:3042: checking whether HDF5 should do data conversions
configure:3050: result: no
configure:3061: checking whether extra example tests should be run
configure:3069: result: no
configure:3073: checking whether parallel IO tests should be run
configure:3081: result: no
configure:3085: checking whether a location for the HDF5 library was specified
configure:3093: result:
configure:3099: checking whether a location for the ZLIB library was specified
configure:3107: result:
configure:3113: checking whether a location for the SZLIB library was specified
configure:3121: result:
configure:3127: checking whether a default cache size for HDF5 was specified
configure:3137: result: 32000000
configure:3146: checking whether a default cache maximum number of elements for HDF5 was specified
configure:3156: result: 1000
configure:3165: checking whether a default cache preemption for HDF5 was specified
configure:3175: result: 0.75
configure:3184: checking whether netCDF-4 logging is enabled
configure:3192: result: no
configure:3212: checking whether DAP client is to be built
configure:3220: result: no
configure:3246: checking whether dap remote testing should be enabled
configure:3254: result: no
configure:3357: checking whether netCDF extra tests should be run (developers only)
configure:3365: result: no
configure:3384: checking whether documentation is to be installed
configure:3392: result: no
configure:3404: checking whether Fortran compiler(s) should be tested during configure
configure:3412: result: yes
configure:3416: checking whether FFIO will be used
configure:3424: result: no
configure:3440: checking whether to skip C++, F77, or F90 APIs if compiler is broken
configure:3448: result: yes
configure:3452: checking whether only the C library is desired
configure:3460: result: no
configure:3479: checking whether examples should be built
configure:3487: result: yes
configure:3491: checking whether F77 API is desired
configure:3500: result: yes
configure:3505: checking whether F90 API is desired
configure:3515: result: yes
configure:3519: checking whether fortran type sizes should be checked
configure:3527: result: yes
configure:3533: checking whether C API is desired
configure:3541: result: yes
configure:3548: checking where to get netCDF C-only library for separate fortran libraries
configure:3564: result:
configure:3579: checking whether CXX API is desired
configure:3588: result: yes
configure:3599: checking whether v2 netCDF API should be built
configure:3607: result: yes
configure:3626: checking whether the ncgen/ncdump should be built
configure:3635: result: yes
configure:3647: checking whether large file (> 2GB) tests should be run
configure:3655: result: no
configure:3674: checking whether benchmaks should be run (experimental)
configure:3682: result: no
configure:3694: checking whether extreme numbers should be used in tests
configure:3709: result: yes
configure:3723: checking where to put large temp files if large file tests are run
configure:3732: result: .
configure:3743: checking whether a win32 DLL is desired
configure:3751: result: no
configure:3775: checking whether separate fortran libs are desired
configure:3784: result: no
configure:3854: finding C compiler
configure:3974: checking for C compiler version
configure:3982: pgcc --version >&5
./configure: line 3984: pgcc: command not found
configure:3986: $? = 127
configure:3993: pgcc -v >&5
./configure: line 3995: pgcc: command not found
configure:3997: $? = 127
configure:4004: pgcc -V >&5
./configure: line 4006: pgcc: command not found
configure:4008: $? = 127
configure:4031: checking for C compiler default output file name
configure:4053: pgcc conftest.c >&5
./configure: line 4055: pgcc: command not found
configure:4057: $? = 127
configure:4095: result:
configure: failed program was:
| /* confdefs.h. /
| #define PACKAGE_NAME “netCDF”
| #define PACKAGE_TARNAME “netcdf”
| #define PACKAGE_VERSION “4.0.1”
| #define PACKAGE_STRING “netCDF 4.0.1”
| #define PACKAGE_BUGREPORT “support@unidata.ucar.edu
| #define PACKAGE “netcdf”
| #define VERSION “4.0.1”
| #define NCIO_MINBLOCKSIZE 256
| #define CHUNK_CACHE_SIZE 32000000
| #define CHUNK_CACHE_NELEMS 1000
| #define CHUNK_CACHE_PREEMPTION 0.75
| #define USE_EXTREME_NUMBERS 1
| #define TEMP_LARGE “.”
| /
end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:4102: error: C compiler cannot create executables
See `config.log’ for more details.

----------------

Cache variables.

----------------

ac_cv_build=i686-pc-linux-gnu
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=pgcc
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_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=set
ac_cv_env_CXX_value=pgCC
ac_cv_env_F77_set=set
ac_cv_env_F77_value=pgf77
ac_cv_env_FCFLAGS_set=
ac_cv_env_FCFLAGS_value=
ac_cv_env_FC_set=set
ac_cv_env_FC_value=pgf95
ac_cv_env_FFLAGS_set=
ac_cv_env_FFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=i686-pc-linux-gnu
ac_cv_path_install=’/usr/bin/install -c’
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=mawk
ac_cv_prog_make_make_set=yes

-----------------

Output variables.

-----------------

ACLOCAL=’${SHELL} /home/ww/Downloads/netcdf-4.0.1/missing --run aclocal-1.10’
ALLOCA=’’
AMDEPBACKSLASH=’’
AMDEP_FALSE=’’
AMDEP_TRUE=’’
AMTAR=’${SHELL} /home/ww/Downloads/netcdf-4.0.1/missing --run tar’
AR=’’
AUTOCONF=’${SHELL} /home/ww/Downloads/netcdf-4.0.1/missing --run autoconf’
AUTOHEADER=’${SHELL} /home/ww/Downloads/netcdf-4.0.1/missing --run autoheader’
AUTOMAKE=’${SHELL} /home/ww/Downloads/netcdf-4.0.1/missing --run automake-1.10’
AWK=‘mawk’
BINFILE_NAME=’’
BUILD_BENCHMARKS_FALSE=’’
BUILD_BENCHMARKS_TRUE=’#’
BUILD_CXX4_FALSE=’’
BUILD_CXX4_TRUE=’#’
BUILD_CXX_FALSE=’’
BUILD_CXX_TRUE=’’
BUILD_C_FALSE=’’
BUILD_C_TRUE=’’
BUILD_DAP4_FALSE=’’
BUILD_DAP4_TRUE=’’
BUILD_DAP_FALSE=’’
BUILD_DAP_TRUE=’#’
BUILD_DLL_FALSE=’’
BUILD_DLL_TRUE=’#’
BUILD_EXAMPLES_FALSE=’’
BUILD_EXAMPLES_TRUE=’’
BUILD_F77_FALSE=’’
BUILD_F77_TRUE=’’
BUILD_F90_FALSE=’’
BUILD_F90_TRUE=’’
BUILD_NCGEN4_FALSE=’’
BUILD_NCGEN4_TRUE=’’
BUILD_PARALLEL_FALSE=’’
BUILD_PARALLEL_TRUE=’’
BUILD_SEPARATE_FORTRAN_FALSE=’’
BUILD_SEPARATE_FORTRAN_TRUE=’#’
BUILD_SHARED_FALSE=’’
BUILD_SHARED_TRUE=’#’
BUILD_UTILITIES_FALSE=’#’
BUILD_UTILITIES_TRUE=’’
BUILD_V2_FALSE=’#’
BUILD_V2_TRUE=’’
CC=‘pgcc’
CCDEPMODE=’’
CFLAGS=’’
CPP=’’
CPPFLAGS=’’
CROSS_COMPILING_FALSE=’’
CROSS_COMPILING_TRUE=’#’
CURLDIR=’’
CURL_CFLAGS=’’
CURL_LIBS=’’
CXX=‘pgCC’
CXXCPP=’’
CXXDEPMODE=’’
CXXFLAGS=’’
CYGPATH_W=‘echo’
DEFS=’’
DEPDIR=’’
DSYMUTIL=’’
DUMPBIN=’’
ECHO_C=’’
ECHO_N=’-n’
ECHO_T=’’
EGREP=’’
ENABLE_DAP_REMOTE_TESTS_FALSE=’’
ENABLE_DAP_REMOTE_TESTS_TRUE=’#’
EXEEXT=’’
EXTRA_EXAMPLE_TESTS_FALSE=’’
EXTRA_EXAMPLE_TESTS_TRUE=’#’
EXTRA_TESTS_FALSE=’’
EXTRA_TESTS_TRUE=’#’
F77=‘pgf77’
FC=‘pgf95’
FCFLAGS=’’
FCFLAGS_f90=’’
FFLAGS=’’
FGREP=’’
FTPBINDIR=’’
GREP=’’
HAS_CXX=’’
HAS_DAP=’’
HAS_F77=’’
HAS_F90=’’
HAS_NC2=’’
HAS_NC4=’’
HDF5DIR=’’
INSTALL_DATA=’${INSTALL} -m 644’
INSTALL_DOCS_FALSE=’’
INSTALL_DOCS_TRUE=’#’
INSTALL_PROGRAM=’${INSTALL}’
INSTALL_SCRIPT=’${INSTALL}’
INSTALL_STRIP_PROGRAM=’$(install_sh) -c -s’
INTERNAL_OCLIB_FALSE=’’
INTERNAL_OCLIB_TRUE=’’
LARGE_FILE_TESTS_FALSE=’’
LARGE_FILE_TESTS_TRUE=’#’
LD=’’
LDFLAGS=’’
LIBOBJS=’’
LIBS=’’
LIBTOOL=’’
LIPO=’’
LN_S=’’
LTLIBOBJS=’’
MAKEINFO=’${SHELL} /home/ww/Downloads/netcdf-4.0.1/missing --run makeinfo’
MAKEWHATIS_CMD=’’
MKDIR_P=’/bin/mkdir -p’
MOD_FLAG=’’
NC_FLIBS=’’
NC_LIBS=’’
NETCDF_C_LIB=’’
NM=’’
NMEDIT=’’
NMFLAGS=’’
OBJEXT=’’
OCLIB_CFLAGS=’’
OCLIB_LIBS=’’
OTOOL64=’’
OTOOL=’’
PACKAGE=‘netcdf’
PACKAGE_BUGREPORT=‘support@unidata.ucar.edu
PACKAGE_NAME=‘netCDF’
PACKAGE_STRING=‘netCDF 4.0.1’
PACKAGE_TARNAME=‘netcdf’
PACKAGE_VERSION=‘4.0.1’
PATH_SEPARATOR=’:’
RANLIB=’’
SED=’’
SET_MAKE=’’
SHAREEXT=‘so’
SHELL=’/bin/bash’
STRIP=’’
SZLIBDIR=’’
TEST_F77_FALSE=’’
TEST_F77_TRUE=’’
TEST_PARALLEL_FALSE=’’
TEST_PARALLEL_TRUE=’’
UPPER_CASE_MOD_FALSE=’’
UPPER_CASE_MOD_TRUE=’’
USE_FFIO_FALSE=’’
USE_FFIO_TRUE=’#’
USE_HDF5_DIR_FALSE=’’
USE_HDF5_DIR_TRUE=’#’
USE_LOGGING_FALSE=’’
USE_LOGGING_TRUE=’#’
USE_NETCDF4_FALSE=’’
USE_NETCDF4_TRUE=’#’
USE_NETCDF_C_LIB_DIR_FALSE=’’
USE_NETCDF_C_LIB_DIR_TRUE=’#’
USE_RENAMEV3_FALSE=’’
USE_RENAMEV3_TRUE=’#’
USE_SZLIB_DIR_FALSE=’’
USE_SZLIB_DIR_TRUE=’#’
USE_VALGRIND_TESTS_FALSE=’’
USE_VALGRIND_TESTS_TRUE=’#’
USE_ZLIB_DIR_FALSE=’’
USE_ZLIB_DIR_TRUE=’#’
VERSION=‘4.0.1’
WHATIS=’’
ZLIBDIR=’’
ac_ct_CC=’’
ac_ct_CXX=’’
ac_ct_DUMPBIN=’’
ac_ct_F77=’’
ac_ct_FC=’’
am__fastdepCC_FALSE=’’
am__fastdepCC_TRUE=’’
am__fastdepCXX_FALSE=’’
am__fastdepCXX_TRUE=’’
am__include=’’
am__isrc=’’
am__leading_dot=’.’
am__quote=’’
am__tar=’${AMTAR} chof - “$$tardir”’
am__untar=’${AMTAR} xf -’
bindir=’${exec_prefix}/bin’
build=‘i686-pc-linux-gnu’
build_alias=’’
build_cpu=‘i686’
build_os=‘linux-gnu’
build_vendor=‘pc’
datadir=’${datarootdir}’
datarootdir=’${prefix}/share’
docdir=’${datarootdir}/doc/${PACKAGE_TARNAME}’
dvidir=’${docdir}’
exec_prefix=‘NONE’
host=‘i686-pc-linux-gnu’
host_alias=’’
host_cpu=‘i686’
host_os=‘linux-gnu’
host_vendor=‘pc’
htmldir=’${docdir}’
includedir=’${prefix}/include’
infodir=’${datarootdir}/info’
install_sh=’$(SHELL) /home/ww/Downloads/netcdf-4.0.1/install-sh’
libdir=’${exec_prefix}/lib’
libexecdir=’${exec_prefix}/libexec’
localedir=’${datarootdir}/locale’
localstatedir=’${prefix}/var’
lt_ECHO=‘echo’
mandir=’${datarootdir}/man’
mkdir_p=’/bin/mkdir -p’
oldincludedir=’/usr/include’
pdfdir=’${docdir}’
prefix=’/home/ww/pros/netcdf4.0.1’
prog=’’
program_transform_name=‘s,x,x,’
psdir=’${docdir}’
sbindir=’${exec_prefix}/sbin’
sharedstatedir=’${prefix}/com’
sysconfdir=’${prefix}/etc’
target_alias=’’

-----------

confdefs.h.

-----------

#define PACKAGE_NAME “netCDF”
#define PACKAGE_TARNAME “netcdf”
#define PACKAGE_VERSION “4.0.1”
#define PACKAGE_STRING “netCDF 4.0.1”
#define PACKAGE_BUGREPORT “support@unidata.ucar.edu
#define PACKAGE “netcdf”
#define VERSION “4.0.1”
#define NCIO_MINBLOCKSIZE 256
#define CHUNK_CACHE_SIZE 32000000
#define CHUNK_CACHE_NELEMS 1000
#define CHUNK_CACHE_PREEMPTION 0.75
#define USE_EXTREME_NUMBERS 1
#define TEMP_LARGE “.”

configure: exit 77


I wonder why?

I use http://www.pgroup.com/resources/netcdf/netcdf40_pgi2010.htm
to guide the build of netcdf.
But it had a problem.

I would correct
setenv CC pgCC
setenv CXX pgcpp
setenv FC pgf90
setenv LD pgf90
setenv CFLAGS “-O2”
setenv FFLAGS “-O2 -Msignextend”
setenv CPPFLAGS “-DpgiFortran”

to be

setenv CC pgcc
setenv CXX pgcpp ! aka pgCC
setenv FC pgf90
setenv LD pgf90
setenv F90 pgf90
setenv CFLAGS “-O2”
setenv FFLAGS “-O2”
setenv CPPFLAGS “-DpgiFortran”


to get it complete. Notice pgf77 is no used.

Thanks for your reply, however I also meet the problem-
"C compiler cannot create executables " in the config.log.
I did not know why?

I found that maybe the license is not installed correctly,since when I run
cd /home/ww/App/linux86/2020/bin
./lmgrd.rc start
THere is no output.
When I run
./lmgrd.rc stop
I got"Shutdown failed: License server machine is down or not responding. (-96,7:2 “No such file or directory”)"

What is the problem?

Hi Maven1,

What is the problem?

It could be any number of things. Can you please send a note to PGI Customer support (trs@pgroup.com) and include your license PIN number? They should be able to help you.

Thanks,
Mat