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 {} \;
相关推荐
李迟几秒前
跨系统平台实践:在内网自建kylin服务版系统yum源
linux
跳跳糖炒酸奶1 分钟前
第四章、Isaacsim在GUI中构建机器人(2):组装一个简单的机器人
人工智能·python·算法·ubuntu·机器人
odoo-卜永25 分钟前
ubuntu22.04连接爱普生打印机型号L385
linux·经验分享·ubuntu
小麦嵌入式1 小时前
Linux驱动开发实战(十一):GPIO子系统深度解析与RGB LED驱动实践
linux·c语言·驱动开发·stm32·嵌入式硬件·物联网·ubuntu
刘若水1 小时前
Linux: 进程信号初识
linux·运维·服务器
共享家95273 小时前
深入剖析Linux常用命令,助力高效操作
linux·运维·服务器
跳跳糖炒酸奶4 小时前
第四章、Isaacsim在GUI中构建机器人(1): 添加简单对象
人工智能·python·ubuntu·机器人
Zfox_4 小时前
【C++项目】从零实现RPC框架「四」:业务层实现与项目使用
linux·开发语言·c++·rpc·项目
吃旺旺雪饼的小男孩4 小时前
Ubuntu 22.04 安装和运行 EDK2 超详细教程
linux·运维·ubuntu
IT小馋猫4 小时前
Linux 企业项目服务器组建(附脚本)
linux·服务器·网络