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).
Marc
Afficher les réponses par date
On 2011-03-21, at 7:27 AM, Marc Feeley wrote:
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:
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.
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.
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).
The problem is now solved (fixes pushed to the repo). It was a problem with the implementation of the heartbeat interrupts which were interrupting the call to "select", which caused open-process to fail.
Please update your Gambit and let me know if it fixes your problems.
Marc