Score:1

C compiler cannot create executables (install netcdf using icc and ifort)

ng flag

I have installed intel oneAPI on ubuntu 20.04, further ifort and icc. The following command on terminal shows

saras# which icc
/opt/intel/oneapi/compiler/2021.4.0/linux/bin/intel64/icc
saras# which ifort
/opt/intel/oneapi/compiler/2021.4.0/linux/bin/intel64/ifort
saras# 

I tried to configure netcdf-4.1.3 using ifort and icc using the following script

export CC=icc
export CXX=icpc
export CFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export CXXFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export F77=ifort
export FC=ifort
export F90=ifort
export FFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export CPP='icc -E'
export CXXCPP='icpc -E'

./configure --prefix=my path
make
make check
make install

But I got the following error.

checking whether a default cache preemption for HDF5 was specified... 0.75
checking whether netCDF-4 logging is enabled... no
checking whether cdmremote client is to be built... no
checking whether DAP client is to be built... yes
checking for style of include used by make... GNU
checking for gcc... icc
checking whether the C compiler works... no
configure: error: in `/home/saras/Prasanth/netcdf-4.1.3':
configure: error: C compiler cannot create executables
hr flag
Have you successfully created a simple "hello world" executable with icc? Have you examined the `config.log` file for details of the failure?
ng flag
Thanks for your comment. Now it works
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.