【发布时间】:2020-07-14 20:52:55
【问题描述】:
此特定错误已在 Stack Overflow 的多个其他上下文中出现,通常与 Cygwin 或 git(以及涉及其他可执行文件)有关。我没有在 MSYS2 的上下文中看到这一点,我不知道如何解决它。这发生在使用 pacman -S gcc 安装 gcc 版本 9.3.0 的全新 MSYS2 安装上。当我去运行我的makefile时,这是出现的错误:
0 [main] cc1 (2724) C:\msys64_close\usr\lib\gcc\x86_64-pc-msys\9.3.0\cc1.exe:
*** fatal error - cygheap base mismatch detected - 0x180346408/0x180317408.
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 不存在于 msys64 文件夹中的任何位置。 MSYS2 主页指出:
Cygwin 提供了一个名为 cygwin1.dll 的运行时库,它在必要时提供了 POSIX 兼容层。该库的 MSYS2 变体称为 msys-2.0.dll...
我不确定问题出在 gcc 还是 MSYS2。我尝试从http://repo.msys2.org/ 安装旧版本的 gcc,但每次我尝试使用低于 9.3.0 的版本时,我都会收到警告说 gcc 由于未解决的依赖关系而无法“升级”。
任何帮助将不胜感激。
【问题讨论】:
-
请务必发送
pacman -Suy以确保所有系统文件都是最新的。 -
这正是导致此类问题的原因(以及这里对我的影响)。当你这样做时,你需要确保如果 msys-2.0.dll 被更新,你也会在你的软件仓库中更新这个库的任何旧版本(可能需要在 MSYS2 中编译软件)。