4

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

Scooter
  • 6,802
  • 8
  • 41
  • 64
ExZya
  • 41
  • 1
  • That's an unusual error! I would suggest that something is corrupt in your cygwin installation. Have you tried reinstalling everything from scratch? – autistic Aug 20 '15 at 03:14
  • Any other suggestion? I really don't want to use an Ide or even make my own compiler xD. Something else to do I tried reinstalling multiple times – ExZya Aug 20 '15 at 03:15
  • Please describe your reinstallation procedure. It's possible that you might be extracting binaries from cached sources that were corrupt when downloaded, and haven't been redownloaded. Did you remove *every part of the installation* prior to trying to reinstall? – autistic Aug 20 '15 at 03:31
  • 1
    what were the gcc errors? I've installed mingw (a windows native version of gcc) on several computers and never had problems. In fact most of the programming I do on Windows I use ntEmacs and mingw. See the accepted answer to this SO question: http://stackoverflow.com/questions/29028808/is-there-an-offline-mingw-installer – thurizas Aug 20 '15 at 03:36
  • 1
    Silly question time: when did you last reboot? And how much memory do you have on the machine? – Jonathan Leffler Aug 20 '15 at 04:16
  • Okie I reinstall by deleting the files I installed then reinstalling them. Gcc errors I may need to check again and I haven't rebooted after the installation Sorry for late comment too – ExZya Aug 20 '15 at 04:29
  • Those strange errors used to happen when you mix different versions of the cygwin1.dll in the **same system**. Note that some Windows programs embed the cygwin1.dll for private use, but that DLL is not actually private because it uses shared segments or global objects or somethig like that. So different versions of that DLL will not work together. My advice is to look for those rogue cygwin programs and kill them! – rodrigo Aug 20 '15 at 07:56

1 Answers1

2

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.
anishpatel
  • 1,472
  • 1
  • 16
  • 23