通过Cygwin安装的Clang格式不会运行

时间:2018-05-18 16:18:19

标签: cygwin clang clang-format

当我尝试在Cygwin64终端中运行clang-format时,我得到以下输出:

$ clang-format
: CommandLine Error: Option 'disable-symbolication' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options

我也无法在Git Bash中运行它,获得以下输出:

$ clang-format
      1 [main] clang-format (2208) C:\cygwin64\bin\clang-format.exe: *** fatal error - cygheap base mismatch detected - 0x180301410/0x1802FD410.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.

cygwin1.dll中只有一个C:\cygwin64\bin,重新启动并没有帮助。

clang --version给出:

$ clang --version
clang version 5.0.1 (tags/RELEASE_501/final)
Target: x86_64-unknown-windows-cygnus
Thread model: posix
InstalledDir: /usr/bin

1 个答案:

答案 0 :(得分:1)

这不是一个很大的答案,但这是我最终要做的。这有点棘手,所以我将在这里进行记录。

请注意,我实际上降级了doxygen,因为最新版本依赖于clang-format-5

Uninstall clang 5.0.1-2
Uninstall doxygen 1.8.14-2 (automatically added)
Uninstall libclang5.0 5.0.1-2
Uninstall vim-clang-format 4.0.1-1
Install doxygen 1.8.13-3

然后(按Back)

Uninstall clang 5.0.1-2 (automatically added)
Uninstall doxygen 1.8.13-3 (automatically added)
Install clang 4.0.1-1
Install doxygen 1.8.13-3

毕竟,尽管不再有clang格式的条目,但我的clang-format-4.0.1仍在计算机上且可运行。

相关问题