Ian Lynagh
Sorry, I meant --with-gmp-{includes,libraries}.
Ah, ok. --with-gmp-* alone, without setting environment variables, creating mk/build.mk, or anything else, gives the same error as --with-gmp-* plus environment variables ("No rule to make target `stage1//.../gmp.h', needed by `stage1/parser/cutils.o'.") Trying 6.8.2.20080317, using --with-ghc-*, setting environment variables, creating mk/build.mk, and hacking mkdependC.prl to omit dependencies on absolute paths, I get past the gmp problems, only to run into a similar problem with readline. I've put the appropriate flags for readline in $CPPFLAGS/$LDFLAGS and mk/build.mk, and the build ends with: Configuring readline-1.0.1.0... if ifBuildable/ifBuildable readline; then \ cd readline && \ cmp -s ../Makefile.local Makefile.local || cp ../Makefile.local .; \ mv GNUmakefile GNUmakefile.tmp; \ setup/Setup makefile -f GNUmakefile; \ cmp -s GNUmakefile GNUmakefile.tmp && mv GNUmakefile.tmp GNUmakefile; \ make -wr && \ setup/Setup register --inplace; \ fi mv: cannot stat `GNUmakefile': No such file or directory In file included from Readline.hsc:36: include/HsReadline.h:10:31: error: readline/readline.h: No such file or directory include/HsReadline.h:11:30: error: readline/history.h: No such file or directory Readline.hsc: In function 'main': Readline.hsc:614: error: 'ISFUNC' undeclared (first use in this function) Readline.hsc:614: error: (Each undeclared identifier is reported only once Readline.hsc:614: error: for each function it appears in.) Readline.hsc:616: error: 'ISMACR' undeclared (first use in this function) Readline.hsc:618: error: 'ISKMAP' undeclared (first use in this function) Readline.hsc:723: error: 'UNDO_DELETE' undeclared (first use in this function) Readline.hsc:724: error: 'UNDO_INSERT' undeclared (first use in this function) Readline.hsc:725: error: 'UNDO_BEGIN' undeclared (first use in this function) Readline.hsc:726: error: 'UNDO_END' undeclared (first use in this function) Readline.hsc:1089: error: 'MULT_MATCH' undeclared (first use in this function) Readline.hsc:1112: error: 'SINGLE_MATCH' undeclared (first use in this function) compiling dist/build/System/Console/Readline_hsc_make.c failed command was: gcc -c -D__GLASGOW_HASKELL__=608 -I/fs/pkgs/mount/package/host/code.dogmap.org/foreign/ghc-6.8.2.20080317+spf+0/compile/src/ghc-6.8.2.20080317/includes -I/fs/pkgs/mount/package/host/code.dogmap.org/foreign/ghc-6.8.2.20080317+spf+0/compile/src/ghc-6.8.2.20080317/gmp/gmpbuild -I/package/host/code.dogmap.org/foreign/ghc-6.8.2.20080317+spf+0/conf/gmp/include -D__GLASGOW_HASKELL__=608 -Iinclude dist/build/System/Console/Readline_hsc_make.c -o dist/build/System/Console/Readline_hsc_make.o Preprocessing library readline-1.0.1.0... make[2]: Entering directory `/fs/pkgs/mount/package/host/code.dogmap.org/foreign/ghc-6.8.2.20080317+spf+0/compile/src/ghc-6.8.2.20080317/libraries/readline' make[2]: *** No targets specified and no makefile found. Stop. make[2]: Leaving directory `/fs/pkgs/mount/package/host/code.dogmap.org/foreign/ghc-6.8.2.20080317+spf+0/compile/src/ghc-6.8.2.20080317/libraries/readline' make[1]: *** [make.library.readline] Error 2 make[1]: Leaving directory `/fs/pkgs/mount/package/host/code.dogmap.org/foreign/ghc-6.8.2.20080317+spf+0/compile/src/ghc-6.8.2.20080317/libraries' make: *** [stage1] Error 2 So next, I tried also passing --with-readline-{includes,libraries} to the toplevel ./configure. As I hoped, those arguments were relayed to the configure script for readline, but that still isn't enough: Configuring readline-1.0.1.0... if ifBuildable/ifBuildable readline; then \ cd readline && \ cmp -s ../Makefile.local Makefile.local || cp ../Makefile.local .; \ mv GNUmakefile GNUmakefile.tmp; \ setup/Setup makefile -f GNUmakefile; \ cmp -s GNUmakefile GNUmakefile.tmp && mv GNUmakefile.tmp GNUmakefile; \ make -wr && \ setup/Setup register --inplace; \ fi mv: cannot stat `GNUmakefile': No such file or directory /package/host/code.dogmap.org/foreign/gcc-4.2.3+spf+0/conf/binutils/command/ld: cannot find -lncurses collect2: ld returned 1 exit status linking dist/build/System/Console/Readline_hsc_make.o failed command was: gcc -lreadline -lncurses -L/package/host/code.dogmap.org/foreign/ghc-6.8.2.20080317+spf+0/conf/readline/library dist/build/System/Console/Readline_hsc_make.o -o dist/build/System/Console/Readline_hsc_make Preprocessing library readline-1.0.1.0... make[2]: Entering directory `/fs/pkgs/mount/package/host/code.dogmap.org/foreign/ghc-6.8.2.20080317+spf+0/compile/src/ghc-6.8.2.20080317/libraries/readline' make[2]: *** No targets specified and no makefile found. Stop. make[2]: Leaving directory `/fs/pkgs/mount/package/host/code.dogmap.org/foreign/ghc-6.8.2.20080317+spf+0/compile/src/ghc-6.8.2.20080317/libraries/readline' make[1]: *** [make.library.readline] Error 2 make[1]: Leaving directory `/fs/pkgs/mount/package/host/code.dogmap.org/foreign/ghc-6.8.2.20080317+spf+0/compile/src/ghc-6.8.2.20080317/libraries' make: *** [stage1] Error 2 There are no --with-* flags for ncurses, so the only ways I can see to say where ncurses is are the ones I'm already using, and which are apparently insufficient - $CPPFLAGS/$LDFLAGS in the environment, and SRC_HC_OPTS/SRC_HSC2HC_OPTS/SRC_CC_OPTS/GHC_CC_OPTS in mk/build.mk. paul