problems with darcs on Snow Leopard: i rebuilt
zlib after adding flags to hsc2hs script forcing the compiler into
32bit mode. That cured the immediate problem. But after that darcs
began reporting 'memory allocation failure' randomly with huge amounts
of memory. Particularly after creating empty repository, adding empty
file to it and recording changes darcs check fails. I finally gave up
and downloaded pre-built binary that worked fine. Apparently the
problem is related to the issue ghc toolchain have on SL: by default
gcc compiles everything in 64-bit mode and ghc knows nothing about it.
>
We need somebody knowledgeable about MacOS X and with one of those 64 bit
machines to report on (1) what the exact details behind this are and (2) what
are the best practices for getting Darcs working on Snow Leopard.
Maybe it's time to recruit for a Mac Czar.
I'm the original reporter of the problem, I own Mac with Snow Leopard and have
some knowledge of Mac OS X. What information can be useful? Any directions on
debugging darcs to isolate the problem?
Ok, I reinstalled every package after patching hsc2hs and everything works great
know. So the problem really have nothing to do with darcs, it's hsc2hs and ghc
itself. I'll try to close the bug.
Pavel: any chance you could write up a step-by-step guide to building
darcs on Snow Leopard, assuming Haskell Platform perhaps?
http://wiki.darcs.net/MacPorts
It seems like this would help out a lot of non-Haskeller darcs users!
Here is how I built it on OSX 10.6, thanks to kowey suggestions:
1- Installed "haskell-platform-2009.2.0.2-i386.dmg"
2- Patched ghc and hsc2hs as described in:
http://www.haskell.org/haskellwiki/Mac_OS_X#Mac_OS_X_10.6_.28Snow_Leopard.29
3- Rebuild zlib and mmap:
$ cabal install --reinstall zlib mmap
4- Build darcs branch-2.4:
$ cabal update
$ cabal install
The resulting binary is at least able to run record with interactive
hunk edition.