【问题标题】:Clang error when trying to open a C file尝试打开 C 文件时出现 Clang 错误
【发布时间】:2015-10-28 09:53:50
【问题描述】:

我最近下载了vim,用C做了一个简单的Hello World程序。看到gcc在cmd上有错误后,我安装了clang。他们都做到了。我还安装了 cygwin 并用两个编译器尝试了 cmd,但仍然没有。

我不断收到这些错误

 1 [main] clang 304 child_info_fork::abort: C:\cygwin\bin\cygLLVM-3.5.dll:
 Loaded to different address: parent(0x1A10000) != child(0x1710000) clang:
 error: unable to execute command: posix_spawn failed: Resource temporarily
 unavailable

我觉得clang比gcc更有希望

【问题讨论】:

  • 这是一个不寻常的错误!我建议您的 cygwin 安装中存在某些问题。您是否尝试过从头开始重新安装所有内容?
  • 还有其他建议吗?我真的不想使用 Ide,甚至不想制作自己的编译器 xD。其他事情我尝试重新安装多次
  • 请描述您的重新安装过程。您可能正在从下载时已损坏且尚未重新下载的缓存源中提取二进制文件。在尝试重新安装之前,您是否删除了安装的每个部分?
  • 什么是 gcc 错误?我已经在几台计算机上安装了 mingw(gcc 的 Windows 原生版本)并且从未出现过问题。事实上,我在 Windows 上进行的大部分编程都使用 ntEmacs 和 mingw。请参阅此 SO 问题的公认答案:stackoverflow.com/questions/29028808/…
  • 愚蠢的提问时间:你上次重启是什么时候?你的机器有多少内存?

标签: c cygwin clang


【解决方案1】:

简答:如果您的 Cygwin 安装直接位于 C: 驱动器下,请关闭 Cygwin 并在 Windows 命令提示符下尝试此命令:

C:\cygwin\bin\dash.exe -c '/usr/bin/rebaseall -v'

这是一个 Cygwin fork failure。

如上面链接中所述,一种解决方案是执行“rebase”:

阅读/usr/share/doc/rebase/ 中的“rebase”包自述文件,并按照那里的说明运行“rebaseall”。

根据自述文件:

Use the following procedure to rebase your entire system:

    1. shutdown all Cygwin processes and services
    2. start ash or dash (do not use bash or a terminal emulator like rxvt
       or mintty). The easiest way to do this is to use Windows Explorer
       and navigate to the top level of your cygwin installation, and
       double-click ash.exe or dash.exe in the bin/ directory.
    3. execute /bin/rebaseall (in the ash/dash window)

If you get any errors due to DLLs being in-use or read-only, then take the
appropriate action and rerun rebaseall.  Otherwise, you run the risk of fork()
failing.

【讨论】:

    猜你喜欢
    • 2020-11-17
    • 1970-01-01
    • 2011-10-06
    • 2017-10-02
    • 2013-02-06
    • 1970-01-01
    • 2016-11-03
    • 1970-01-01
    • 2017-09-28
    相关资源
    最近更新 更多