【问题标题】:Install zlib, hdf5 and netcdf with pgf使用 pgf 安装 zlib、hdf5 和 netcdf
【发布时间】:2021-11-24 15:00:26
【问题描述】:

我正在尝试使用 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.c
ztest212261.c:
"/usr/include/stdio.h", line 183: error: attribute "__malloc__" does not take arguments
    __attribute_malloc__ __attr_dealloc_fclose __wur;

有人可以给我一个提示吗? 提前谢谢你。

【问题讨论】:

    标签: hdf5 zlib netcdf pgi


    【解决方案1】:

    为了编译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等。

    【讨论】:

      猜你喜欢
      • 2018-06-16
      • 2014-12-10
      • 2015-10-21
      • 1970-01-01
      • 2016-07-22
      • 2012-07-31
      • 1970-01-01
      • 2020-01-24
      • 1970-01-01
      相关资源
      最近更新 更多