c - 在 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}
解决方案
推荐阅读
- python - 为什么 findAll 不从网页返回预期的 div 数?
- ubuntu - 为什么优雅地关闭 emacs 守护进程很重要?
- swift - 如果我创建一个 UILabel 作为我的 LoadView() 的一部分,与创建一个文件私有 uilabel 有什么区别?
- html - 如何从浏览器手机打开微信并打开其中的链接
- snowflake-cloud-data-platform - 雪花V8引擎版
- node.js - 在 VS Code(或其他 IDE)中调试节点
- angular - 如何在 Angular 8 i18n 中使用 API 响应消息?
- linux - 如何在 Mac 上安装 linux google chrome 二进制文件?
- c# - MongoDb 上的更新文档
- azure - 将新块上传到现有 Azure BlockBlob 时,块 ID 的最大长度是多少