Ubuntu按转发HDF5

源码编译流程

bash 复制代码
./configure --prefix=/usr/local/hdf5 --enable-cxx
make
make check                # run test suite.
sudo make install
make check-install        # verify installation.

输出

复制代码
:~/project/3rd_party/hdf5-1.14.3$ ./configure --prefix=/usr/local/hdf5 --enable-cxx
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking shell variables initial values... done
checking if basename works... yes
checking if xargs works... yes
checking for cached host... none
checking enable warnings as
.................................................
             Shared C++ Library: yes
             Static C++ Library: yes

                           Java: no


Features:
---------
                     Parallel HDF5: no
  Parallel Filtered Dataset Writes: no
                Large Parallel I/O: no
                High-level library: yes
Dimension scales w/ new references: no
                  Build HDF5 Tests: yes
                  Build HDF5 Tools: yes
                   Build GIF Tools: no
                      Threadsafety: no
               Default API mapping: v114
    With deprecated public symbols: yes
            I/O filters (external): deflate(zlib)
                     Map (H5M) API: no
                        Direct VFD: no
                        Mirror VFD: no
                     Subfiling VFD: no
                (Read-Only) S3 VFD: no
              (Read-Only) HDFS VFD: no
    Packages w/ extra debug output: none
                       API tracing: no
              Using memory checker: no
            Function stack tracing: no
                  Use file locking: best-effort
         Strict file format checks: no
      Optimization instrumentation: no

附录

如果在执行./configure --prefix=/usr/local/hdf5 --enable-cxx的时候出现下面的错误

输出

复制代码
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/hello/project/3rd_party/hdf5-1.14.3/bin/missing: line 3: $'\r': command not found
/home/hello/project/3rd_party/hdf5-1.14.3/bin/missing: line 5: $'\r': command not found
/home/hello/project/3rd_party/hdf5-1.14.3/bin/missing: line 8: $'\r': command not found
/home/hello/project/3rd_party/hdf5-1.14.3/bin/missing: line 13: $'\r': command not found
/home/hello/project/3rd_party/hdf5-1.14.3/bin/missing: line 18: $'\r': command not found
/home/hello/project/3rd_party/hdf5-1.14.3/bin/missing: line 21: $'\r': command not found
/home/hello/project/3rd_party/hdf5-1.14.3/bin/missing: line 26: $'\r': command not found
/home/hello/project/3rd_party/hdf5-1.14.3/bin/missing: line 32: syntax error near unexpected token `$'in\r''
'home/hello/project/3rd_party/hdf5-1.14.3/bin/missing: line 32: `case $1 in
configure: WARNING: 'missing' script is too old or missing
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
configure: error: cannot run /bin/bash ./bin/config.sub

这是configure脚本文件中存在Windows风格的行结束符(CRLF)。Linux等Unix基础的系统期望行结束符只是LF,额外的CR字符被解释为命令的一部分,导致错误。

你可以使用dos2unix这样的工具来转换你文件中的行结束符。如果还没有安装,你可以使用sudo apt-get install dos2unix来安装。

使用下面的额命令把当前文件里的所有包含windows风格的行结束符的文件转换成unix风格的行结束符

复制代码
find . -type f -exec dos2unix {} \;
相关推荐
深夜情感老师23 分钟前
centos离线安装ssh
linux·centos·ssh
foo1st4 小时前
JDK(Ubuntu 18.04.6 LTS)安装笔记
java·笔记·ubuntu
菜鸟射手5 小时前
QT creater和vs2017文件路径问题
linux·c++·windows·qt
@Aurora.5 小时前
【项目日记(三)】
linux·服务器·网络
白总Server6 小时前
Nginx 中间件
大数据·linux·运维·服务器·nginx·bash·web
望获linux7 小时前
实时操作系统在服务型机器人中的关键作用
linux·机器人·操作系统·开源软件·rtos·具身智能
哈哈幸运7 小时前
Linux Sed 深度解析:从日志清洗到 K8s 等12个高频场景
linux·运维·编辑器·sed
心随_风动7 小时前
主流操作系统对比分析(macOS、Linux、Windows、Unix)
linux·windows·macos
啊吧怪不啊吧8 小时前
Linux常见指令介绍下(入门级)
linux·开发语言·centos
陈大大陈8 小时前
基于 C++ 的用户认证系统开发:从注册登录到Redis 缓存优化
java·linux·开发语言·数据结构·c++·算法·缓存