我正在尝试用PGI安装NetCDF。然而,要做到这一点,我首先需要安装zlib,当我尝试这样做时,我需要:
export C_INCLUDE_PATH=/the/path/to/include/:$C_INCLUDE_PATH
export PATH=/the/path/to/compilers/bin/:$PATH然后我试着:
CC=pgcc CXX=pgc++ ./configure --archs="x86_64"
我得到以下错误:
Building shared library libz.so.1.2.11 with pgcc.
Checking for size_t... No.
Checking for long long... Yes.
Failed to find a pointer-size integer type.
** ./configure aborting.```
The **configure.log** says, among other things:
```pgcc -c -O3 x86_64 ztest212261.cztest212261.c:
"/usr/include/stdio.h",第183行: error:属性"malloc“不带参数
__attribute_malloc__ __attr_dealloc_fclose __wur;有人能给我个提示吗?提前谢谢你。
发布于 2021-12-30 04:49:34
为了编译netcdf-c及其依赖项,不仅需要链接include路径,还需要链接lib路径。所以你需要做些像
export C_INCLUDE_PATH=/the/path/to/include/:$C_INCLUDE_PATH
export LD_LIBRARY_PATH=/the/path/to/lib/:$LD_LIBRARY_PATH
export PATH=/the/path/to/compilers/bin/:$PATH对于配置,还需要设置CFLAGS等。
https://stackoverflow.com/questions/70098348
复制相似问题