BuildingUnderWindows

The Simple Way

To get working Haskell under Windows, you should use the Haskell Platform. From there, just open a cmd.exe window and type cabal update and cabal install darcs -f-curl.

Development

To run the functional tests bundled with darcs (which is quite essential if you want to work on darcs itself), you need at least MSYS. It comes with an easy-to-use installer. (You should find it under MSYS Base System, Current Release, MSYS-.exe.)

Building with cURL

[FIXME this process needs to be checked]

You may get better http performance if you build and install darcs with cURL support. However, doing this is much harder than the above. Also, installing this stuff is probably easier as an administrator (msys, at least). You need bash and a C compiler:

MSYS/MinGW - a minimal GNU tools for Windows

  1. Download and run MSYS-1.0.10.exe (current) as admin - installing this will give you the basic tools, like tar.
  2. Download and run msysDTK-1.0.1.exe (current) as admin
  3. Setup your fstab
cp /etc/fstab.sample /etc/fstab # Close your MSYS window
  1. Create an easy-to-type location for your stuff
mkdir /tmp/dstuff
cd /tmp/dstuff
mkdir mingw
mkdir msys
  1. Download MinGW using the easy installer. I think I did the full install. Alternatively, grab these packages and put them in /tmp/dstuff/mingw:
  2. mingw-runtime-3.9.tar.gz (current)
  3. gcc core 3.4.5 (candidate) - other versions may work
  4. binutils-2.16.91-20060119-1.tar.gz (candidate) - has to be this ~ version

  5. w32api-3.6.tar.gz (current)
  6. Untar all your packages. In MSYS:

mkdir /mingw
cd /mingw
for f in /tmp/dstuff/mingw/*.tar.gz; do tar xzf $f; done
cd /
for f in /tmp/dstuff/msys/*.tar.bz2; do tar -x --overwrite -j -f $f; done
  1. Create some handy directories:
mkdir /usr/src
mkdir -p /usr/local/bin

OpenSSL

  1. Visit http://www.slproweb.com/products/Win32OpenSSL.html (OpenSSL binaries)
  2. Download the OpenSSL installer and run it as an administrator
  3. Get expected library names for these:
cd /c/OpenSSL/lib/MinGW
cp libeay32.a libcrypto.a
cp sslea32.a libssl.a

curl

  1. Visit http://curl.haxx.se/download.html
  2. Obtain the source tarball
  3. Compile curl
tar xzf curl-7.18.1.tar.gz
cd curl-7.18.1
./configure --with-ssl=/c/OpenSSL
make
make install

darcs

  1. Copy the curl includes and libraries into the relevant locations [FIXME]:
cp /c/OpenSSL/lib/MinGW/* /mingw/lib
cp /c/OpenSSL/lib/MinGW/* /c/ghc/ghc-6.6/gcc-lib
cp -R /usr/local/include/curl /mingw/include 
cp -R /usr/local/include/curl /c/ghc/ghc-6.6/gcc-lib/include
cp /usr/local/lib/libcurl* /mingw/lib
cp /usr/local/lib/libcurl* /c/ghc/ghc-6.6/gcc-lib         
  1. Download darcs:
cd /tmp/dstuff
download http://www.darcs.net/darcs-2.3.0.tar.gz
tar xzf darcs-2.3.0.tar.gz
  1. Build it once:
cd darcs-2.3.0
cabal install
  1. [FIXME static builds?]
  2. Make sure libcurl-4.dll is on your path:
export PATH=/usr/local/lib:${PATH}
  1. Enjoy!

[FIXME, the troubleshooting bits seemed pretty out of date, and basically all related to automake/autoconf/make related problems that should not exist anymore… so I deleted it.]

CategoryWindows