[gambit-list] Gambit-C and cygwin

Marc Feeley feeley at iro.umontreal.ca
Mon Mar 21 07:27:31 EDT 2011

On 2011-03-21, at 3:03 AM, Valeriya Pudova wrote:

> Thanks  Mark,
> It makes sence
> It should!  Perhaps you have mingw and cygwin installed on the same machine and when you call "gcc" it uses the wrong compiler (and I think the mingw gcc defines _WINDOWS by default).  Just a guess.  I remember some time ago that someone suggested using a flag line "gcc -mno-mingw" or something to prevent this problem.  I'm not a Windows expert, so you need to dig for this yourself to verify.
> I have made few tests

I've been debugging this yesterday and I don't have a complete solution but I have discovered various bugs which have been fixed:

1) The shell-command procedure should be using /bin/sh to run the command, but it thinks that it should use CMD.EXE because it sees that COMSPEC is defined in the environment.

2) The gambc-cc.bat script, which contains a /bin/sh shell script, is being executed as a Windows batch file, because it has a ".bat" file extension.  So it quickly has problems with the syntax of the commands in it.

3) When open-process creates a process (with fork and exec) the subprocess seems to hang, so the parent process hangs also.  What is weird is that when Gambit is configured with "./configure --enable-debug" then the process no longer hangs.  I'm currently investigating this problem (which I think is the last one to solve for a clean build on CYGWIN).


More information about the Gambit-list mailing list