From a9ba9584c6c80d430cb560e398d999344e8d3494 Mon Sep 17 00:00:00 2001 From: simonpj Date: Thu, 7 Feb 2002 14:56:29 +0000 Subject: [PATCH] [project @ 2002-02-07 14:56:29 by simonpj] Remove duplication of CVS info, and improve Win32 notes --- docs/building/building.sgml | 378 ++++++++++++++++--------------------------- 1 file changed, 143 insertions(+), 235 deletions(-) diff --git a/docs/building/building.sgml b/docs/building/building.sgml index 49fce4c..91f1995 100644 --- a/docs/building/building.sgml +++ b/docs/building/building.sgml @@ -295,7 +295,18 @@ machine in order to compile (most of) the sources, however. - [Windows users. To protect your + + + [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.] To protect your .ssh from access by anyone else, right-click your .ssh directory, and select Properties. If you are not on @@ -303,7 +314,7 @@ machine in order to compile (most of) the sources, however. 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!] + includes you! @@ -324,39 +335,88 @@ machine in order to compile (most of) the sources, however. Set the following environment variables: - - - $CVS_RSH to - ssh - - - $CVSROOT to - :ext:your-username@cvs.haskell.org:/home/cvs/root - - - - - + + + + $HOME: points to your home directory. This is where CVS + will look for its .cvsrc file. + + + + + + $CVS_RSH to ssh + + [Windows users.] Setting your CVS_RSH to + ssh assumes that your CVS client + understands how to execute shell script + ("#!"s,really), which is what + ssh is. This may not be the case on + Win32 platforms, so in that case set CVS_RSH to + ssh1. + + + $CVSROOT to + :ext:your-username + @cvs.haskell.org:/home/cvs/root + where your-username is your user name on + cvs.haskell.org. + The CVSROOT environment variable will be recorded in the checked-out tree, so you don't need to set - this every time either. Ignore the instructions for setting - CVSROOT below. + this every time. + + + + + + $CVSEDITOR: bin/gnuclient.exe + if you want to use an Emacs buffer for typing in those long commit messages. + + + + + + $SHELL: To use bash as the shell in Emacs, you need to + set this to point to bash.exe. + + + + + - Caveats: + - - Setting your CVS_RSH to - ssh assumes that your CVS client - understands how to execute shell script - ("#!"s,really), which is what - ssh is. This may not be the case on - some platforms (read: Win32), so in that case set - CVS_RSH to - ssh1. + + Put the following in $HOME/.cvsrc: + + + + checkout -P + release -d + update -P + diff -u + + + + These are the default options for the specified CVS commands, + and represent better defaults than the usual ones. (Feel + free to change them.) + + + + [Windows users.] Filenames starting with . were illegal in + the 8.3 DOS filesystem, but that restriction should have + been lifted by now (i.e., you're using VFAT or later filesystems.) If + you're still having problems creating it, don't worry; .cvsrc is entirely + optional. + - + + + [Experts.] Once your account is set up, you can get access from other machines without bothering Jeff, thus: @@ -386,6 +446,8 @@ machine in order to compile (most of) the sources, however. + + Checking Out a Source Tree @@ -405,13 +467,21 @@ machine in order to compile (most of) the sources, however. for the fptools suite, including the configuration files and some other junk. +[Windows users.] The following messages appear to be harmless: + +setsockopt IPTOS_LOWDELAY: Invalid argument +setsockopt IPTOS_THROUGHPUT: Invalid argument + + + + + You can call the fptools directory whatever you like, + CVS won't mind: + $ mv fptools directory - You can call the fptools directory whatever you like, - CVS won't mind. - NB: after you've read the CVS manual you might be tempted to try @@ -3469,240 +3539,70 @@ You should read the GHC installation guide sections on Windows (in the user guide) before continuing to read these notes. - -Because of various hard-wired infelicities, you need to copy -bash.exe (from GHC's extra-bin -directory), and perl.exe and -cat.exe (from GHC's bin directory) -to /bin (discover where your Cygwin root directory is -by typign mount). - +Before you start + + + -Before you start, you need to make sure that the user environment variable +Make sure that the user environment variable MAKE_MODE is set to UNIX. If you don't do this you get very weird messages when you type make, such as: - -/c: /c: No such file or directory - -Configuring ssh - - - - - -Generate a key, by running c:/user/local/bin/ssh-keygen1. - This generates a public key in .ssh/identity.pub, and a - private key in .ssh/identity - - - - In response to the 'Enter passphrase' question, just hit - return (i.e. use an empty passphrase). The passphrase is - a password that protects your private key. But it's a pain - to type this passphrase everytime you use ssh, so the best - thing to do is simply to protect your .ssh directory, and - .ssh/identity from access by anyone else. To do this - 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!) - - - - If you have problems running ssh-keygen1 - from within bash, start up cmd.exe and run it as follows: - - - -c:\tmp> set CYGWIN32=tty -c:\tmp> c:/user/local/bin/ssh-keygen1 +/c: /c: No such file or directory - - - - -If you don't have an account on cvs.haskell.org, send - your .ssh/identity.pub to the CVS repository administrator - (currently Jeff Lewis jlewis@galconn.com). He will set up - your account. - - - - If you do have an account on cvs.haskell.org, use TeraTerm - to logon to it. Once in, copy the - key that ssh-keygen1 deposited in /.ssh/identity.pub into - your ~/.ssh/authorized_keys. Make sure that the new version - of authorized_keys still has 600 file permission. - - - - - - - - -Configuring CVS - - - - - -From the System control panel, -set the following user environment variables (see the GHC user guide) - - - - - -HOME: points to your home directory. This is where CVS -will look for its .cvsrc file. - -CVS_RSH: c:/path_to_ghc/extra-bin/ssh +GHC uses the mingwin C compiler to +generate code, so you have to install that. Just pick up a mingwin bundle at +http://www.mingw.org/. +We install it in c:/mingw. -CVSROOT: :ext:username@cvs.haskell.org:/home/cvs/root, -where username is your userid +Install a version of GHC, and put it in your PATH. +The InstallShield tells you the path when you install it. -CVSEDITOR: bin/gnuclient.exe if you want to use an Emacs buffer for typing in those long commit messages. +Because of various hard-wired infelicities, you need to copy +bash.exe (from GHC's extra-bin +directory), and perl.exe and +cat.exe (from GHC's bin directory) +to /bin (discover where your Cygwin root directory is +by typign mount). - -SHELL: To use bash as the shell in Emacs, you need to -set this to point to bash.exe. - - - - + You should not need to install ssh +and cvs: they come with Cygwin. - -Put the following in $HOME/.cvsrc: - - - -checkout -P -release -d -update -P -diff -u - - - -These are the default options for the specified CVS commands, -and represent better defaults than the usual ones. (Feel -free to change them.) - - - -Filenames starting with . were illegal in -the 8.3 DOS filesystem, but that restriction should have -been lifted by now (i.e., you're using VFAT or later filesystems.) If -you're still having problems creating it, don't worry; .cvsrc is entirely -optional. + Check out a copy of GHC sources from +the CVS repository, following the instructions above (). + + - - -Try doing cvs co fpconfig. All being well, bytes should -start to trickle through, leaving a directory fptools -in your current directory. (You can rm it if you don't -want to keep it.) The following messages appear to be harmless: - - - -setsockopt IPTOS_LOWDELAY: Invalid argument -setsockopt IPTOS_THROUGHPUT: Invalid argument - - - -At this point I found that CVS tried to invoke a little dialogue with -me (along the lines of `do you want to talk to this host?'), but -for some reason bombed out. This was from a bash shell running in Emacs. -I solved this by invoking a Cygnus shell, and running CVS from there. -Once things are dialogue free, it seems to work OK from within Emacs. - - - - - -If you want to check out part of large tree, proceed as follows: - - - -cvs -f checkout -l papers -cd papers -cvs update cpr - - - -This sequence checks out the papers module, but none -of its sub-directories. -The "" flag says not to check out sub-directories. -The "" flag says not to read the .cvsrc file -whose default (don't check out empty directories) is -in this case bogus. - - - -The cvs update command sucks in a named sub-directory. - - - - - - -There is a very nice graphical front-end to CVS for Win32 platforms, -with a UI that people will be familiar with, at -wincvs.org. -I have not tried it yet. - - - - - - Building GHC +Building GHC - - - - - You should give the option - to - autoconf, so that it doesn't try to - build for Cygwin (unless that's what you really - want). Since it's possible to get into trouble using the - wrong C compiler, it's wise either to avoid installing - Cygwin gcc, or to explicitly specify - . - - + -You have to run autoconf both in fptools +Run autoconf both in fptools and in fptools/ghc. If you omit the latter step you'll get an error when you run ./configure: - - ...lots of stuff... creating mk/config.h @@ -3712,16 +3612,24 @@ running /bin/sh ./configure --cache-file=.././config.cache --srcdir=. ./configure: ./configure: No such file or directory configure: error: ./configure failed for ghc - - - - -You need ghc to be in your PATH before you run -configure. The InstallShield tells you the path -when you install it. + + + After autoconf run ./configure in + fptools/ thus: + + ./configure --host=i386-unknown-mingw32 --with-gcc=/mingw/bin/gcc + + Both these options are important! + It's possible to get into trouble using the + wrong C compiler! + + + + + -- 1.7.10.4