|
|
# Known pitfalls in building Glasgow Haskell
|
|
|
|
|
|
|
|
|
WARNINGS about pitfalls and known "problems":
|
|
|
|
|
|
1. One difficulty that comes up from time to time is running out of space
|
|
|
in `TMPDIR`. (It is impossible for the configuration stuff to
|
|
|
compensate for the vagaries of different sysadmin approaches to temp
|
|
|
space.)
|
|
|
|
|
|
The quickest way around it is `setenv TMPDIR /usr/tmp` or
|
|
|
even `setenv TMPDIR .` (or the equivalent incantation with your shell
|
|
|
of choice).
|
|
|
|
|
|
The best way around it is to say
|
|
|
|
|
|
```wiki
|
|
|
export TMPDIR=<dir>
|
|
|
```
|
|
|
|
|
|
in your `build.mk` file. Then GHC and the other
|
|
|
tools will use the appropriate directory in all cases.
|
|
|
1. You may occasionally see a warning from the C compiler when compiling some
|
|
|
Haskell code, eg. "warning: assignment from
|
|
|
incompatible pointer type". These are usually harmless, but it's a good idea to
|
|
|
report it on the mailing list so that we can fix it.
|
|
|
1. Similarly, `ar`chiving warning messages like the following are not
|
|
|
a problem:
|
|
|
|
|
|
```wiki
|
|
|
ar: filename GlaIOMonad__1_2s.o truncated to GlaIOMonad_
|
|
|
ar: filename GlaIOMonad__2_2s.o truncated to GlaIOMonad_
|
|
|
...
|
|
|
```
|
|
|
1. GHC's sources go through `cpp` before being compiled, and `cpp` varies
|
|
|
a bit from one Unix to another. One particular gotcha is macro calls
|
|
|
like this:
|
|
|
|
|
|
```wiki
|
|
|
SLIT("Hello, world")
|
|
|
```
|
|
|
|
|
|
Some `cpp`s treat the comma inside the string as separating two macro
|
|
|
arguments, so you get
|
|
|
|
|
|
```wiki
|
|
|
:731: macro `SLIT' used with too many (2) args
|
|
|
```
|
|
|
|
|
|
Alas, `cpp` doesn't tell you the offending file!
|
|
|
Workaround: don't put weird things in string args to `cpp` macros. |
|
|
This page has become the [Building Guide FAQ](building/faq). |