RE: installing ghc without already having ghc

On 20 April 2005 15:13, Jessica Brennan wrote:
ghc-6.4-host/libraries/readline NetBSD-2.0 0 # gmake boot
------------------------------------------------------------------------
==fptools== gmake boot -r; in /devel/build/NetBSD/ghc/ghc-6.4-host/libraries/readline
------------------------------------------------------------------------
../../ghc/utils/hsc2hs/hsc2hs-inplace -Iinclude -I. System/Console/Readline.hsc Readline.hsc: In function `main': Readline.hsc:677: error: `UNDO_DELETE' undeclared (first use in this function) Readline.hsc:677: error: (Each undeclared identifier is reported only once Readline.hsc:677: error: for each function it appears in.) Readline.hsc:678: error: `UNDO_INSERT' undeclared (first use in this function) Readline.hsc:679: error: `UNDO_BEGIN' undeclared (first use in this function) Readline.hsc:680: error: `UNDO_END' undeclared (first use in this function) Readline.hsc:1021: error: `MULT_MATCH' undeclared (first use in this function) Readline.hsc:1044: error: `SINGLE_MATCH' undeclared (first use in this function) gmake: *** [System/Console/Readline.hs] Error 1
I have tried this with readline-5.0 both shared and static versions though I prefer to use the static version.
Can anyone with NetBSD help out here? Cheers, Simon

On 2005 Apr 21, Simon Marlow
Readline.hsc: In function `main': Readline.hsc:677: error: `UNDO_DELETE' undeclared (first use in this function) Readline.hsc:677: error: (Each undeclared identifier is reported only once Readline.hsc:677: error: for each function it appears in.) Readline.hsc:678: error: `UNDO_INSERT' undeclared (first use in this function) Readline.hsc:679: error: `UNDO_BEGIN' undeclared (first use in this function) Readline.hsc:680: error: `UNDO_END' undeclared (first use in this function) Readline.hsc:1021: error: `MULT_MATCH' undeclared (first use in this function) Readline.hsc:1044: error: `SINGLE_MATCH' undeclared (first use in this function) gmake: *** [System/Console/Readline.hs] Error 1
Jessica,
My guess is that this has to do with a difference between readline-4.x
and realine-5.0. Do you need to use readline-5.0?
In HsReadline.hsc, you'll see that it includes

On Fri, 22 Apr 2005, Tim Smith wrote:
On 2005 Apr 21, Simon Marlow
wrote: Readline.hsc: In function `main': Readline.hsc:677: error: `UNDO_DELETE' undeclared (first use in this function) Readline.hsc:677: error: (Each undeclared identifier is reported only once Readline.hsc:677: error: for each function it appears in.) Readline.hsc:678: error: `UNDO_INSERT' undeclared (first use in this function) Readline.hsc:679: error: `UNDO_BEGIN' undeclared (first use in this function) Readline.hsc:680: error: `UNDO_END' undeclared (first use in this function) Readline.hsc:1021: error: `MULT_MATCH' undeclared (first use in this function) Readline.hsc:1044: error: `SINGLE_MATCH' undeclared (first use in this function) gmake: *** [System/Console/Readline.hs] Error 1
Jessica,
My guess is that this has to do with a difference between readline-4.x and realine-5.0. Do you need to use readline-5.0?
In HsReadline.hsc, you'll see that it includes
. On FreeBSD, in /usr/include/readline/readline.h, I find this:
enum undo_code { UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END }; ... #define NO_MATCH 0 #define SINGLE_MATCH 1 #define MULT_MATCH 2
Do you have those in your system's readline.h?
You could probably port the readline library to use readline-5.0, but it might be more work than you're willing to do.
Actually I normally use readline-4.2 but ghc for netbsd required the readline-5.0 libraries, so that was what was installed. I tried both versions of readline with no luck. I even tried including readline.h directly in libraries/readline/System/Console/Readline.hsc. However I still get the error. -Jessica ~~~~~~~~~~~~~~ jib@panix.com Panix Staff
participants (3)
-
Jessica Brennan [staff]
-
Simon Marlow
-
Tim Smith