ghc-6.0.1 --make -O (linking errors)

Jan Scheffczyk jan@informatik.unibw-muenchen.de
Thu, 31 Jul 2003 08:55:01 +0200


Hi all,

I recently switched to ghc 6.0.1 running on a debian linux box.

When compiling a program using
  ghc --make -O
or
  ghc --make -O2
I get lots of errors while linking.
The linker concerns about undefined references to Data.FiniteMap, which I 
frequently use.
For example, the linker says:

../Options.o(.text+0xc0d): In function `s4m5T_ret':
: undefined reference to `DataziFiniteMap_lvl4_closure'

Without optimizing my code, doing a plain
  ghc --make
everything goes fine.
Similarly, compiling the same program with the older ghc 6.0 I do not get any 
linking errors, whether I optimize or not.

Any ideas, how I can get rid of the linking errors, except for switching back 
to ghc 6.0?

Best Regards,
Jan