X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fbuilding%2Fbuilding.sgml;h=23c181dac84710dd88994627afbdffd3b839e873;hb=81cb7610337b33508066dd400cd371ff6033c987;hp=f7d32170f769379e84f274404385aaafe848ad4a;hpb=fcd2f5273fd1b55d505e428d628bf6094421c283;p=ghc-hetmet.git diff --git a/docs/building/building.sgml b/docs/building/building.sgml index f7d3217..23c181d 100644 --- a/docs/building/building.sgml +++ b/docs/building/building.sgml @@ -240,34 +240,10 @@ - [Windows users.] The programs ssh-keygen1, ssh1, and cvs, - seem to lock up bash entirely if they try to get user input (e.g. if - they ask for a password). To solve this, start up cmd.exe - and run it as follows: - - c:\tmp> set CYGWIN32=tty - c:\tmp> c:/user/local/bin/ssh-keygen1 - + Windows users: see the notes in about ssh wrinkles! + + - [Windows users.] To protect your - .ssh from access by anyone else, - right-click your .ssh directory, and - select Properties. If you are not on - the access control list, add yourself, and give yourself - full permissions (the second panel). Remove everyone else - from the access control list. Don't leave them there but - deny them access, because 'they' may be a list that - includes you! - [March 2003] In fact ssh 3.6.1 now seems to require - you to have Unix permissions 600 (read/write for owner only) - on the .ssh/identity file, else it - bombs out. For your local C drive, it seems that chmod 600 identity works, - but on Windows NT/XP, it doesn't work on a network drive (exact dteails obscure). - The solution seems to be to set the CYGWIN environment - variable to "ntsec neta". The CYGWIN environment variable is discussed - in the Cygwin User's Guide, - and there are more details in the Cygwin FAQ. - @@ -456,6 +432,10 @@ setsockopt IPTOS_THROUGHPUT: Invalid argument hslibs and libraries modules (for a full list of the projects available, see ). + + Remember that if you do not have + happy installed, you need to check it out + as well. @@ -491,7 +471,14 @@ $ cvs diff you the results. - + + If you changed something in the + fptools/libraries subdirectories, also run + make html to check if the documentation can + be generated successfully, too. + + + Before checking in a change, you need to update your source tree: @@ -574,17 +561,25 @@ $ cvs commit -F commit-message directory major cause of headaches. So, to avoid a lot of hassle, follow this recipe for - updating your tree: + updating your tree: $ cd fptools -$ cvs update -Pd 2>&1 | tee log +$ cvs update -P 2>&1 | tee log Look at the log file, and fix any conflicts (denoted by a - C in the first column). If you're using multiple - build trees, then for every build tree you have pointing at this - source tree, you need to update the links in case any new files - have appeared: + C in the first column). New directories may have + appeared in the repository; CVS doesn't check these out by + default, so to get new directories you have to explicitly do + +$ cvs update -d + in each project subdirectory. Don't do this at the top level, + because then all the projects will be + checked out. + + If you're using multiple build trees, then for every build + tree you have pointing at this source tree, you need to update + the links in case any new files have appeared: $ cd build-tree @@ -1205,6 +1200,12 @@ $ cvs checkout nofib/spectral egcs) have varying degrees of stability depending on the platform. + GCC 3.2 is currently known to have problems building + GHC on Sparc, but is stable on x86. + + GCC 3.3 currently cannot be used to build GHC, due to + some problems with the new C preprocessor. + If your GCC dies with “internal error” on some GHC source file, please let us know, so we can report it and get things improved. (Exception: on iX86 @@ -1236,7 +1237,7 @@ $ cvs checkout nofib/spectral (fptools/happy). It can be built from source, but bear in mind that you'll need GHC installed in order to build it. To avoid the chicken/egg problem, - install a binary distribtion of either Happy or GHC to get + install a binary distribution of either Happy or GHC to get started. Happy distributions are available from Happy's Web Page. @@ -1252,8 +1253,12 @@ $ cvs checkout nofib/spectral CVS sources, it is not needed if you just intend to build a standard source distribution. + Version 2.52 or later of autoconf is required. + NB. vesrion 2.13 will no longer work, as of GHC version + 6.1. + Autoconf builds the configure - script from configure.in and + script from configure.ac and aclocal.m4. If you modify either of these files, you'll need autoconf to rebuild configure. @@ -1293,7 +1298,7 @@ $ cvs checkout nofib/spectral PVM is the Parallel Virtual Machine on which Parallel Haskell programs run. (You only need this if you - plan to run Parallel Haskell. Concurent Haskell, which + plan to run Parallel Haskell. Concurrent Haskell, which runs concurrent threads on a uniprocessor doesn't need it.) Underneath PVM, you can have (for example) a network of workstations (slow) or a multiprocessor box @@ -1410,7 +1415,7 @@ $ make install - configure.in, + configure.ac, config.sub, config.guess: these files support the configuration process. @@ -1433,7 +1438,7 @@ $ make install only one project (happy, say), you must have a source tree whose root directory contains Makefile, mk/, - configure.in, and the project(s) you want + configure.ac, and the project(s) you want (happy/ in this case). You cannot get by with just the happy/ directory. @@ -1550,20 +1555,20 @@ $ make install issue the command autoconfautoconf (with no arguments). This GNU program converts - $(FPTOOLS_TOP)/configure.in + $(FPTOOLS_TOP)/configure.ac to a shell script called $(FPTOOLS_TOP)/configure. Some projects, including GHC, have their own configure script. If there's an - $(FPTOOLS_TOP)/<project>/configure.in, + $(FPTOOLS_TOP)/<project>/configure.ac, then you need to run autoconf in that directory too. Both these steps are completely platform-independent; they just mean that the - human-written file (configure.in) can + human-written file (configure.ac) can be short, although the resulting shell script, configure, and mk/config.h.in, are long. @@ -1584,7 +1589,7 @@ $ make install round your computer working out what architecture it has, what operating system, whether it has the vfork system call, where - yacc is kept, whether + tar is kept, whether gcc is available, where various obscure #include files are, whether it's a leap year, and what the systems manager had for lunch. It @@ -1764,17 +1769,17 @@ GhcHcOpts=-DDEBUG -Rghc-timing For example, there's a line that says: -YACC = @YaccCmd@ +TAR = @TarCmd@ - This defines the Make variables YACC - to the pathname for a yacc that + This defines the Make variables TAR + to the pathname for a tar that configure finds somewhere. If you have your - own pet yacc you want to use instead, that's + own pet tar you want to use instead, that's fine. Just add this line to mk/build.mk: -YACC = myyacc +TAR = mytar You do not have to have a @@ -2210,7 +2215,7 @@ Foo.o : Baz.hi Do NOT use ghc/compiler/ghc, or - ghc/compiler/ghc-5.xx, as these are the + ghc/compiler/ghc-6.xx, as these are the scripts intended for installation, and contain hard-wired paths to the installed libraries, rather than the libraries in the build tree. @@ -3596,10 +3601,10 @@ $ make install-docs target machine, and compiling them using gcc to get a working GHC. - NOTE: GHC version 5.xx is significantly harder - to bootstrap from C than previous versions. We recommend - starting from version 4.08.2 if you need to bootstrap in this - way. + NOTE: GHC versions 5.xx and later are + significantly harder to bootstrap from C than earlier versions. + We recommend starting from version 4.08.2 if you need to + bootstrap in this way. HC files are architecture-dependent (but not OS-dependent), so you have to get a set that were generated on @@ -3721,11 +3726,11 @@ GhcWithRegisterised=NO -# build.mk for GHC 5.xx +# build.mk for GHC 5.xx and 6.x GhcUnregisterised=YES - Version 5.xx only: use the option + Versions 5.xx and 6.x only: use the option instead of when running ./configure. @@ -4319,6 +4324,73 @@ variable. You can always invoke find with an absolute path, +Configuring SSH + +ssh comes with Cygwin, provided you remember to ask for it when +you install Cygwin. (If not, the installer lets you update easily.) Look for openssh +(not ssh) in the Cygwin list of applications! + +There are several strange things about ssh on Windows that you need to know. + + + + The programs ssh-keygen1, ssh1, and cvs, + seem to lock up bash entirely if they try to get user input (e.g. if + they ask for a password). To solve this, start up cmd.exe + and run it as follows: + + c:\tmp> set CYGWIN32=tty + c:\tmp> c:/user/local/bin/ssh-keygen1 + + + + +ssh needs to access your directory .ssh, in your home directory. +To determine your home directory ssh first looks in +c:/cygwin/etc/passwd (or wherever you have Cygwin installed). If there's an entry +there with your userid, it'll use that entry to determine your home directory, ignoring +the setting of the environment variable $HOME. If the home directory is +bogus, ssh fails horribly. The best way to see what is going on is to say + + ssh -v cvs.haskell.org + +which makes ssh print out information about its activity. + + You can fix this problem, either by correcting the home-directory field in +c:/cygwin/etc/passwd, or by simply deleting the entire entry for your userid. If +you do that, ssh uses the $HOME environment variable instead. + + + + + + To protect your + .ssh from access by anyone else, + right-click your .ssh directory, and + select Properties. If you are not on + the access control list, add yourself, and give yourself + full permissions (the second panel). Remove everyone else + from the access control list. Don't leave them there but + deny them access, because 'they' may be a list that + includes you! + + + + In fact ssh 3.6.1 now seems to require + you to have Unix permissions 600 (read/write for owner only) + on the .ssh/identity file, else it + bombs out. For your local C drive, it seems that chmod 600 identity works, + but on Windows NT/XP, it doesn't work on a network drive (exact dteails obscure). + The solution seems to be to set the $CYGWIN environment + variable to "ntsec neta". The $CYGWIN environment variable is discussed + in the Cygwin User's Guide, + and there are more details in the Cygwin FAQ. + + + + + + Other things you need to install You have to install the following other things to build GHC: