微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在 Ubuntu 上从源代码安装 netcdf-4.7.4 错误:未声明的标识符

如何解决在 Ubuntu 上从源代码安装 netcdf-4.7.4 错误:未声明的标识符

过去几天,我一直在尝试从源代码安装带有 C 支持(编译 MPAS-Atmosphere 模型所需)的 NetCDF 4.7.4 版,但我无法克服以下错误。另外,我正在使用官方网站上的说明: https://www.unidata.ucar.edu/software/netcdf/docs/getting_and_building_netcdf.html

“make check”时出现错误

../libtool: line 1748: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)
nc4mem.c: In function 'NC4_open_image_file':
nc4mem.c:47:25: error: 'H5LT_FILE_IMAGE_DONT_copY' undeclared (first use in this function)
  h5->mem.imageflags |= (H5LT_FILE_IMAGE_DONT_copY | H5LT_FILE_IMAGE_DONT_RELEASE);
                         ^
nc4mem.c:47:25: note: each undeclared identifier is reported only once for each function it appears in
nc4mem.c:47:53: error: 'H5LT_FILE_IMAGE_DONT_RELEASE' undeclared (first use in this function)
  h5->mem.imageflags |= (H5LT_FILE_IMAGE_DONT_copY | H5LT_FILE_IMAGE_DONT_RELEASE);
                                                     ^
nc4mem.c:50:24: error: 'H5LT_FILE_IMAGE_OPEN_RW' undeclared (first use in this function)
  h5->mem.imageflags |= H5LT_FILE_IMAGE_OPEN_RW;
                        ^
nc4mem.c: In function 'NC4_create_image_file':
nc4mem.c:73:27: error: 'H5LT_FILE_IMAGE_OPEN_RW' undeclared (first use in this function)
     h5->mem.imageflags |= H5LT_FILE_IMAGE_OPEN_RW;
                           ^
Makefile:628: recipe for target 'libnchdf5_la-nc4mem.lo' Failed
make[1]: *** [libnchdf5_la-nc4mem.lo] Error 1
make[1]: Leaving directory '/p1-nemo/danilocs/mpaslibs/netcdf-c-4.7.4/libhdf5'
Makefile:707: recipe for target 'check-recursive' Failed
make: *** [check-recursive] Error 1

使用的配置选项是:

CFLAGS='-I${H5DIR}/include' CPPFLAGS='-I${H5DIR}/include -I${ZDIR}/include -I${CURLDIR}/include' LDFLAGS='-L${H5DIR}/lib -L${ZDIR}/lib -L${CURLDIR}/lib' ./configure --prefix=${NCDIR}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。