ExZya
ExZya

Reputation: 41

Clang error when trying to open a C file

I recently downloaded vim and I made a simple Hello World program in C. I installed clang after I saw that Gcc had errors on cmd. They both did. I also installed cygwin and tried cmd with both compilers and still nothing.

I keep on getting these errors

 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

I think I have more hope for clang than for gcc

Upvotes: 4

Views: 790

Answers (1)

anishpatel
anishpatel

Reputation: 1522

Short Answer: If your Cygwin installation is directly under your C: drive, shutdown Cygwin and try this command in the Windows command prompt:

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

This is a Cygwin fork failure.

As noted in link above, one solution is to do a 'rebase':

Read the 'rebase' package README in /usr/share/doc/rebase/, and follow the instructions there to run 'rebaseall'.

According to the README:

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.

Upvotes: 2

Related Questions