| 57 | | Pugs needs the Glasgow Haskell Compiler (GHC) 6.4 or above. To install GHC, |
| 58 | | download a binary build from http://haskell.org/ghc/. Although source code |
| 59 | | for GHC is available, it will take a very long time to build by yourself. |
| 60 | | |
| 61 | | Pugs needs Parrot 0.2.2 or above to support Perl 6 Rules and PIR evaluation. |
| 62 | | To install Parrot, follow the instructions at http://www.parrotcode.org/. |
| 63 | | |
| 64 | | http://www.jwcs.net/~jonathan/perl6/ has binary builds for Win32. If you'd |
| 65 | | like to build by hand, http://wiki.kn.vutbr.cz/mj/?Perl%206%20and%20Parrot has |
| 66 | | instructions (and binaries, too). |
| 67 | | |
| 68 | | For dynamic loading/inlining of Haskell modules, you should install the |
| 69 | | hs-plugin library, available here: |
| 70 | | |
| 71 | | http://www.cse.unsw.edu.au/~dons/code/hs-plugins |
| 72 | | |
| 73 | | To install Pugs on your system, simply type this in the command line: |
| 74 | | |
| 75 | | cpansign -v # optional; see SIGNATURE for details |
| 76 | | perl Makefile.PL |
| 77 | | make # or 'nmake' on Win32 |
| 78 | | make test |
| 79 | | make install |
| 80 | | |
| 81 | | Optionally you may use the GHC environment variable to set the ghc |
| 82 | | executable before you run "perl Makefile.PL", for example: |
| 83 | | |
| 84 | | export GHC=${HOME}/bin/ghc (bash) |
| 85 | | setenv GHC ${HOME}/bin/ghc (csh) |
| 86 | | |
| 87 | | CAVEATS FOR GCC 4.0 USERS |
| 88 | | ------------------------- |
| 89 | | |
| 90 | | Mac OS X 10.4 "Tiger" users may see this error message when compiling Pugs: |
| 91 | | |
| 92 | | ___DISCARD__ |
| 93 | | collect2: ld returned 1 exit status |
| 94 | | |
| 95 | | Until GHC 6.4.1 is released, you need to need to issue this command first: |
| 96 | | |
| 97 | | sudo gcc_select 3.3 |
| 98 | | |
| 99 | | Then recompiling Pugs using a clean tree. Other users of GCC 4.0 systems |
| 100 | | may also need to switch to use GCC 3.3 to compile Pugs at this moment. |
| 101 | | |
| 102 | | CAVEATS FOR x86_64 MACHINES |
| 103 | | --------------------------- |
| 104 | | |
| 105 | | Until GHC 6.4.1 is released, users with x86_64 (64 bit Athlon) CPU's should |
| 106 | | consider using a development snapshot of GHC. GHC 6.4 had bugs on x86_64 |
| 107 | | which break garbage collection and rules (regexps). These bugs were fixed |
| 108 | | in GHC CVS by around 11-May. There are hints on using snapshots at the end |
| 109 | | of this section. |
| 110 | | |
| 111 | | Here are the known problems: |
| 112 | | |
| 113 | | (1) GHC 6.4 has a garbage collector bug on x86_64 (64 bit Athlon) machines; |
| 114 | | users may see crashes complaining about "strange objects". |
| 115 | | |
| 116 | | Until GHC 6.4.1 is released, a partial workaround is to avoid GC by |
| 117 | | requesting a large heap, using either command line arguments: |
| 118 | | |
| 119 | | ./pugs +RTS -A200M -RTS |
| 120 | | |
| 121 | | or an environment variable: |
| 122 | | |
| 123 | | GHCRTS='-A200M' |
| 124 | | |
| 125 | | These request a 200 MB heap, which is sufficient to run most programs. |
| 126 | | |
| 127 | | Running all tests unfortunately requires a lot more memory (perhaps 1000M). |
| 128 | | A possible alternative, which someone could explore and report on, would be |
| 129 | | to try using a 32-bit GHC instead. |
| 130 | | |
| 131 | | (2) Rules (regexps) may not work with GHC 6.4 on x86_64. Users may see |
| 132 | | "internal error: adjustor creation not supported on this platform". |
| 133 | | There is no known workaround. This bug has been fixed in current |
| 134 | | development snapshots. |
| 135 | | |
| 136 | | Hints on using a development snapshot of GHC: |
| 137 | | |
| 138 | | Note that this will take a long time, and it may not work. |
| 139 | | |
| 140 | | First, check if a sufficiently recent "Stable" source snapshot is available |
| 141 | | (as of 15-May, there isn't one yet). If not, you might try a "HEAD" snapshot |
| 142 | | (it is not clear anyone has actually tried this). Otherwise, use might use |
| 143 | | cvs to grab your own snapshot: |
| 144 | | |
| 145 | | CVSROOT=:pserver:anoncvs@glass.cse.ogi.edu:/cvs; export CVSROOT |
| 146 | | cvs login # passord cvs |
| 147 | | cvs checkout fpconfig |
| 148 | | cd fptools |
| 149 | | cvs checkout ghc hslibs libraries happy alex |
| 150 | | |
| 151 | | autoreconf |
| 152 | | ./configure |
| 153 | | make |
| 154 | | make install |
| 155 | | |
| 156 | | There are no guarantees with a CVS snapshot. It may not even compile. |
| 157 | | |
| | 57 | See the INSTALL file for instructions on building and installing Pugs. |