Mark Baily wrote:
Hi,
I'm having trouble compiling v 2.5 on win32 using visual studio 2005.
After using CMake to produce the .sln file for visual studio then
building the Release (or MinSizeRelease) version, it gets to using
chicken-boot.exe to compile stub.scm and sits there on 100% CPU usage
in what appears to be an infinite loop.
I read in an earlier thread someone else had this problem running
inside a Parallels virtual machine, but I am not running inside a VM
and still get the problem. I also read that it might be that Visual
Studio 2005 Express Edition causes memory thrashing. However, I am
using Visual Studio 2005 Academic Edition which is the full compiler.
Also, the infinite loop does not occur inside the compiler itself but
rather inside chicken-boot.exe.
I also don't want to build using mingw as I need to link chicken with
other visual studio 2005 apps/libraries; I'm not sure if this is
possible with a mingw-chicken.
Has anyone else come across the problem and know a solution?
I guess I'll have to download VS 2005 Express and see if I can
duplicate the behavior. At least we now know it isn't limited to the
Parallels Virtual Machine, nor to VS 2005 Express.
On MSVC we used to set C_DEFAULT_TARGET_STACK_SIZE=300000 to avoid some
kind of thrashing problem. Something about Chicken emitting so many C
functions and MSVC handling that gracelessly because of poor memory
design. I was unable to observe any problem with my Visual Studio .NET
2003 compiler, so at one point I removed the code, but I left a
historical footnote. Try changing line 863 of CMakeLists.txt
SET(C_DEFAULT_TARGET_STACK_SIZE \(128*1024\))
to
SET(C_DEFAULT_TARGET_STACK_SIZE 300000)
and recompiling for MSVC. If that solves your problem then we know the
culprit. If it doesn't, you might try a larger value. If that doesn't
fix it, then we're back to head scratching.
Cheers,
Brandon Van Every