首页 > 解决方案 > 无法在 AiX 7.2 机器上使用已编译的二进制文件(版本 1.10.2)创建 Subversion 存储库

问题描述

我们使用编译命令在 AiX 机器上编译了 subversion 1.10.2:-

./configure CFLAGS="-I/temp1110/subversion/zlib" --without-berkeley-db --with-apr=/temp1110/subversion/apr --with-apr-util=/temp1110/subversion/apr-util --with-lz4=internal --with-utf8proc=internal --disable-nls

而在使用“make”命令生成所需文件之后。我们无法创建存储库。通过命令后./svnadmin create /temp1110/home/Repo_test",我们得到错误:

svnadmin: E000009: 无法自动写入'/temp1110/home/Repo_test/db/current' svnadmin: E000009: 无法将文件'/temp1110/home/Repo_test/db' 刷新到磁盘:错误的文件号

知道如何解决这个问题吗?

标签: svnaix

解决方案


好吧,你无法解决这个问题,这是颠覆中的一个错误。

或者更确切地说是一个 AIX 特定的问题:fsync(2)调用一个目录返回errno=EBADF,这让人subverions/libsvn_subr/io.c:svn_io_flush_to_disk很难过。

这可以通过以下补丁修复:

--- subversion/libsvn_subr/io.cold  2018-01-19 05:00:11.000000000 +0100
+++ subversion/libsvn_subr/io.c     2018-12-22 20:25:42.000000000 +0100
@@ -4286,7 +4286,13 @@
      return svn_error_wrap_apr(status, _("Can't move '%s' to '%s'"),
                                svn_dirent_local_style(from_path, pool),
                                svn_dirent_local_style(to_path, pool));
- 
+ #if !defined(_AIX)
+     /* on Aix, you cannot do fsync(2) on a directory,
+        also you cannot open a file for APR_WRITE
+        if its access bits are 444
+        Nonetheless this is a very useful peace of code,
+        just not for AIX.
+     */
  #if defined(SVN_ON_POSIX)
    if (flush_to_disk)
      {
@@ -4314,7 +4320,7 @@
        SVN_ERR(svn_io_file_close(file, pool));
      }
  #endif
- 
+ #endif
    return SVN_NO_ERROR;
  }

推荐阅读