following on from Simon's question about improvements to the building guide, I decided to keep a log while building ghc HEAD on a new machine. something like this might be useful as a quick text reference for windows builders, in _addition_ to the more extensive building guide? no explanations, no alternatives, no trouble-shooting advice, just the minimum to get there, one concrete example, all in one place.
if not, I hope some people might find it of use here in the archives, and it triggered the suggestions I sent in separate emails.. note that I didn't do many of the things mentioned in 13.2/13.3/13.4 of the building guide, either because they are no longer needed with recent cygwin (1.5.16-1)/windows (XP,sp2), or because the current practice is to use some tools from mingw or from ghc binary snapshots, or because I've "automated" the package selection, etc. it assumes that the changes suggested in TODO-list at the end will be implemented (e.g., I used 'ghc-depends' from a local dir, but that wouldn't be of any use to others, so I suggest to host that at haskell.org/ghc/cygwin), where marked with (*). also, I installed from an external hard disk, and looked up the URLs for the downloads and the cvs commands by which I filled that hard disk afterwards, and I went through a few iterations/ tests/distcleans, so it would be useful if someone else could confirm that this is actually sufficient as it stands. so it is a mixture of compact reference for future use and a concrete almost-log of a successful build, in one of the many possible configurations, at one point in time. cheers, claus ---------------------build.log ; this could be a script, but we might want to inspect things, ; choose download sites, etc; also, running all downloads ; through a virus checker before use may sound paranoid, ; but will it be paranoid enough?-) - get&install some editor (vim, emacs, whatever) - get&install cygwin (http://www.cygwin.com) ; i used 1.5.16-1, installed in c:\cygwin - run 'setup.exe' select 'download to local directory'; choose download directory choose your preferred main mirror and add 'http://www.haskell.org/ghc/cygwin' (*) in addition to 'Base' (default install), select 'Devel->ghc-depends' ('ghc-depends' will not actually install anything itself, but forces additional packages to be added by 'setup.exe') - after download, run 'setup.exe' from download directory select 'install from local directory' in addition to 'Base' category (default install), select 'Devel->ghc-depends' to install other packages ghc build depends on (*) - get&install mingw (http://www.mingw.org/) ; i used MinGW-3.1.0-1.exe ; installed in c:\mingw - you probably want to add GLUT ; (http://www.xmission.com/~nate/glut.html) ; i used glut-3.7.3-mingw32.tar - get recent binary snapshot of ghc-6.4.1 for mingw ; (http://www.haskell.org/ghc/dist/stable/dist/) - unpack in c:/ghc - add C:\ghc\ghc-6.4.1\bin to %PATH% (Start->Control Panel->System->Advanced->Environment Variables) - get cvs version of ghc ; also, subscribe to [email protected], or follow the mailing list ; archive, in case you checkout a version with problems ; http://www.haskell.org//pipermail/cvs-all/ - mkdir c:/fptools; cd c:/fptools ; (or whereever you want your cvs tree to be) - export CVSROOT=:pserver:[EMAIL PROTECTED]:/cvs - cvs login ; pw: cvs - cvs checkout fpconfig - cd fptools - cvs checkout ghc hslibs libraries - build ghc, using cygwin and mingw, targetting mingw - export PATH=/cygdrive/c/ghc/ghc-6.4.1/tools:$PATH ; for haddock, alex, happy (*) - export PATH=/cygdrive/c/mingw/bin:$PATH ; without, we pick up some cygwin tools at best! - cd c:/fptools/fptools ; (if you aren't there already) - autoreconf - ./configure --host=i386-unknown-mingw32 --with-gcc=C:/Mingw/bin/gcc.exe ; we use cygwin, but build for windows - cp mk/build.mk.sample mk/build.mk - in mk/build.mk: uncomment line: BuildFlavour = perf add line: BIN_DIST=1 add line: SplitObjs = NO - make 2>&1 | tee make.log ; always useful to have a log around - package up binary distribution - make binary-dist Project=Ghc 2>&1 | tee make-bin-dist.log ; always useful to have a log around - cd ghc-6.5 - chmod +x ../distrib/prep-bin-dist-mingw ; if you're happy with the script's contents (*) - ../distrib/prep-bin-dist-mingw ; then tar up, unpack where wanted, and enjoy ------------------------ TODO (see separate emails): (*) - provide ghc-depends cygwin-package at haskell.org/ghc/cygwin; ; by default, setup.exe only installs Base category. ; ghc-depends is an empty package, conforming to the layout ; expected by cygwin's setup.exe, that lists the additional ; cygwin packages needed for building cvs ghc - ghc-depends does not yet provide 2ps/2pdf support ; one could add tetex to the requirements, but some folks ; might have a complete miktex installation anyhow? - configure results are not propagated to documentation generators ; if configure doesn't find 2ps/2pdf converters, make shouldn't ; try to do any conversion depending on those tools - this bug ; results in calling 'xxx.dvi -o xxx.ps' during 'make bin-dist' ; at the moment! - re-package tools in mingw binary snapshots: - haddock can't find its auxiliary files ; they are not in the same dir as haddock.exe in the ; current snapshots - copy from doc/html/libraries - using happy/haddock/alex from ghc-6.4.1/ is problematic ; there's a lot of other stuff in that directory, eg. configure ; will be confused by finding INSTALL. ; move tools and their aux files to ghc-6.4.1/tools - feed prep-bin-dist-mingw from configure ; to get the right default settings for ghc/gcc directories, ; simply ask fptools/configure.ac to process the script ; could also be used to get gcc_version - prep-bin-dist-mingw misses a couple of things ; uses bash features, should be '#!/bin/bash' ; should copy html users_guide as well ; should copy glut dlls with the rest of glut _______________________________________________ Cvs-ghc mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/cvs-ghc
