簡體   English   中英

在 Debian 上制作 hdf5-1.14.0:“ssize_t”的類型沖突

[英]Make hdf5-1.14.0 on Debian: conflicting types for ‘ssize_t’

我嘗試在虛擬機 Linux #1 SMP Debian 5.10.140-1 (2022-09-02) 上從源代碼構建 HDF5。 我遵循了基本說明:

         gunzip < hdf5-1.14.0.tar.gz | tar xf -
         cd hdf5-1.14.0
         ./configure --prefix=/usr/local/hdf5 
         make
         make check                # run test suite.
         make install
         make check-install        # verify installation

配置步驟成功運行(在刪除導致錯誤的文件中不需要的換行符 \r 之后,如1中所述)但 make 命令返回以下錯誤:

Making all in src
make[1]: entrata nella directory «/home/myname/hdf5-1.14.0/src»
make  all-am
make[2]: entrata nella directory «/home/myname/hdf5-1.14.0/src»
  CC       H5.lo
In file included from H5private.h:36,
                 from H5.c:21:
/usr/include/stdio.h:77:19: error: conflicting types for ‘ssize_t’
   77 | typedef __ssize_t ssize_t;
      |                   ^~~~~~~
In file included from H5private.h:26,
                 from H5.c:21:
H5public.h:273:13: note: previous declaration of ‘ssize_t’ was here
  273 | typedef int ssize_t;
      |             ^~~~~~~
In file included from H5.c:21:
H5private.h:438: warning: "LOCK_SH" redefined
  438 | #define LOCK_SH 0x01
      | 
In file included from /usr/include/x86_64-linux-gnu/bits/fcntl.h:61,
                 from /usr/include/fcntl.h:35,
                 from H5private.h:31,
                 from H5.c:21:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:237: note: this is the location of the previous definition
  237 | # define LOCK_SH 1 /* Shared lock.  */
      | 
In file included from H5.c:21:
H5private.h:439: warning: "LOCK_EX" redefined
  439 | #define LOCK_EX 0x02
      | 
In file included from /usr/include/x86_64-linux-gnu/bits/fcntl.h:61,
                 from /usr/include/fcntl.h:35,
                 from H5private.h:31,
                 from H5.c:21:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:238: note: this is the location of the previous definition
  238 | # define LOCK_EX 2 /* Exclusive lock.  */
      | 
In file included from H5.c:21:
H5private.h:440: warning: "LOCK_NB" redefined
  440 | #define LOCK_NB 0x04
      | 
In file included from /usr/include/x86_64-linux-gnu/bits/fcntl.h:61,
                 from /usr/include/fcntl.h:35,
                 from H5private.h:31,
                 from H5.c:21:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:239: note: this is the location of the previous definition
  239 | # define LOCK_NB 4 /* Or'd with one of the above to prevent
      | 
In file included from H5.c:21:
H5private.h:441: warning: "LOCK_UN" redefined
  441 | #define LOCK_UN 0x08
      | 
In file included from /usr/include/x86_64-linux-gnu/bits/fcntl.h:61,
                 from /usr/include/fcntl.h:35,
                 from H5private.h:31,
                 from H5.c:21:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:241: note: this is the location of the previous definition
  241 | # define LOCK_UN 8 /* Remove lock.  */
      | 
make[2]: *** [Makefile:1737: H5.lo] Errore 1
make[2]: uscita dalla directory «/home/myname/hdf5-1.14.0/src»
make[1]: *** [Makefile:1201: all] Errore 2
make[1]: uscita dalla directory «/home/myname/hdf5-1.14.0/src»
make: *** [Makefile:729: all-recursive] Errore 1

HDF5 為 Windows 等平台定義了幾個 POSIX 事物,包括 ssize_t。 如果它在 Linux 上被重新定義,可能是因為 header 被錯誤解析了。

你為什么在 Linux 上得到 Windows 行尾? 你從哪里得到源壓縮包?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM