C 编译器无法创建可执行文件(使用 icc 和 ifort 安装 netcdf)

C 编译器无法创建可执行文件(使用 icc 和 ifort 安装 netcdf)

我在 ubuntu 20.04 上安装了 intel oneAPI,还有 ifort 和 icc。终端上以下命令显示

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# 

我尝试使用 ifort 和 icc 使用以下脚本配置 netcdf-4.1.3

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

但我收到以下错误。

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

相关内容