
I've built ghc and installed it but when I run ghci e.g. the up arrow keys don't work :-( Can someone let me know what I've done wrong and how to fix it? Thanks, Dominic.
dom@lagrange:~/ndp> ghci GHCi, version 6.9.20080517: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer ... linking ... done. Loading package base ... linking ... done. Prelude> ^[[A

Dominic Steinitz wrote:
I've built ghc and installed it but when I run ghci e.g. the up arrow keys don't work :-( Can someone let me know what I've done wrong and how to fix it? Thanks, Dominic.
sounds like missing readline package during configure be warned - there have been endless discussions on readline (because of licensing issues). best regards, Johannes.

Johannes Waldmann wrote:
Dominic Steinitz wrote:
I've built ghc and installed it but when I run ghci e.g. the up arrow keys don't work :-( Can someone let me know what I've done wrong and how to fix it? Thanks, Dominic.
sounds like missing readline package during configure
be warned - there have been endless discussions on readline (because of licensing issues).
best regards, Johannes.
Johannes, Thanks for the reply and I'm sure you are right but I'm still stuck with knowing what to do about it. I think I have a readline:
dom@lagrange:~/ghc> ls /usr/include/readline/ chardefs.h keymaps.h rlconf.h rltypedefs.h history.h readline.h rlstdc.h tilde.h
I couldn't see anywhere on http://hackage.haskell.org/trac/ghc/wiki/Building/Hacking where it mentioned readline. Ok I can see in config.log that I don't have editline. That sounds very suspicious. Mind you I'm not sure where to get it from for opensuse. I'll have a hunt around. Dominic.

Ok I can see in config.log that I don't have editline. That sounds very suspicious. Mind you I'm not sure where to get it from for opensuse. I'll have a hunt around.
I found the editline package but now I have the following. I'm not even sure installing the editline package is the right thing to do
dom@lagrange:~/editline/editline-0.2> ./Setup build Preprocessing library editline-0.2...
In file included from Editline.hsc:52:0:
include/HsEditline.h:11:0: error: conflicting types for ‘el_get’
/usr/include/histedit.h:112:0: error: previous declaration of ‘el_get’ was here compiling dist/build/System/Console/Editline_hsc_make.c failed command was: /usr/local/bin/ghc -c -package base-3.0 -Iinclude dist/build/System/Console/Editline_hsc_make.c -o dist/build/System/Console/Editline_hsc_make.o

Dominic Steinitz wrote:
Ok I can see in config.log that I don't have editline. That sounds very suspicious. Mind you I'm not sure where to get it from for opensuse. I'll have a hunt around.
I found the editline package but now I have the following. I'm not even sure installing the editline package is the right thing to do
dom@lagrange:~/editline/editline-0.2> ./Setup build Preprocessing library editline-0.2...
In file included from Editline.hsc:52:0:
include/HsEditline.h:11:0: error: conflicting types for ‘el_get’
/usr/include/histedit.h:112:0: error: previous declaration of ‘el_get’ was here compiling dist/build/System/Console/Editline_hsc_make.c failed command was: /usr/local/bin/ghc -c -package base-3.0 -Iinclude dist/build/System/Console/Editline_hsc_make.c -o dist/build/System/Console/Editline_hsc_make.o
Sorry for the running commentary but you can always hit delete. This looks a bit dodgy in configure:
if "${GhcPkgCmd-ghc-pkg}" --show-package editline >/dev/null 2>&1; then fp_cv_ghc_has_editline=yes else fp_cv_ghc_has_editline=no fi
As I suspect:
dom@lagrange:~/ghc> ghc-pkg --show-package editline ghc-pkg: unrecognized option `--show-package'
This works but configure doesn't seem to be in darcs so I'm not sure how to send a patch. Happy to raise a ticket. Let me know.
if "${GhcPkgCmd-ghc-pkg}" describe editline >/dev/null 2>&1; then fp_cv_ghc_has_editline=yes else fp_cv_ghc_has_editline=no fi
Dominic.

Dominic Steinitz wrote:
Dominic Steinitz wrote:
Ok I can see in config.log that I don't have editline. That sounds very suspicious. Mind you I'm not sure where to get it from for opensuse. I'll have a hunt around.
I found the editline package but now I have the following. I'm not even sure installing the editline package is the right thing to do
dom@lagrange:~/editline/editline-0.2> ./Setup build Preprocessing library editline-0.2...
In file included from Editline.hsc:52:0:
include/HsEditline.h:11:0: error: conflicting types for ‘el_get’
/usr/include/histedit.h:112:0: error: previous declaration of ‘el_get’ was here compiling dist/build/System/Console/Editline_hsc_make.c failed command was: /usr/local/bin/ghc -c -package base-3.0 -Iinclude dist/build/System/Console/Editline_hsc_make.c -o dist/build/System/Console/Editline_hsc_make.o
Sorry for the running commentary but you can always hit delete.
This looks a bit dodgy in configure:
if "${GhcPkgCmd-ghc-pkg}" --show-package editline >/dev/null 2>&1; then fp_cv_ghc_has_editline=yes else fp_cv_ghc_has_editline=no fi
As I suspect:
dom@lagrange:~/ghc> ghc-pkg --show-package editline ghc-pkg: unrecognized option `--show-package'
This works but configure doesn't seem to be in darcs so I'm not sure how to send a patch. Happy to raise a ticket. Let me know.
if "${GhcPkgCmd-ghc-pkg}" describe editline >/dev/null 2>&1; then fp_cv_ghc_has_editline=yes else fp_cv_ghc_has_editline=no fi
Dominic.
We seem to be back to a problem in readline again.
Preprocessing library editline-0.2... In file included from Editline.hsc:52: include/HsEditline.h:11: error: conflicting types for ‘el_get’ /usr/include/histedit.h:112: error: previous declaration of ‘el_get’ was here compiling dist/build/System/Console/Editline_hsc_make.c failed command was: gcc -c -D__GLASGOW_HASKELL__=609 -I/home/dom/ghc/includes -I/home/dom/ghc/gmp/gmpbuild -D__GLASGOW_HASKELL__=609 -Iinclude dist/build/System/Console/Editline_hsc_make.c -o dist/build/System/Console/Editline_hsc_make.o
Commenting out this line seems to make things compile.
/* extern int el_get(EditLine *e, int op, void *result); */
Finally ghci works. I think I should get points for persistence. Dominic.

On Mon, May 26, 2008 at 4:54 AM, Dominic Steinitz
Dominic Steinitz wrote:
Dominic Steinitz wrote:
Ok I can see in config.log that I don't have editline. That sounds very suspicious. Mind you I'm not sure where to get it from for opensuse. I'll have a hunt around.
Preprocessing library editline-0.2... In file included from Editline.hsc:52: include/HsEditline.h:11: error: conflicting types for 'el_get' /usr/include/histedit.h:112: error: previous declaration of 'el_get' was here compiling dist/build/System/Console/Editline_hsc_make.c failed command was: gcc -c -D__GLASGOW_HASKELL__=609 -I/home/dom/ghc/includes -I/home/dom/ghc/gmp/gmpbuild -D__GLASGOW_HASKELL__=609 -Iinclude dist/build/System/Console/Editline_hsc_make.c -o dist/build/System/Console/Editline_hsc_make.o
Commenting out this line seems to make things compile.
/* extern int el_get(EditLine *e, int op, void *result); */
Finally ghci works. I think I should get points for persistence.
Points definitely awarded! Thank you for tracking down the cause of your problem. The issue was that we weren't handling the el_get function portably enough. I've uploaded a fix to the darcs repo at http:code.haskell.org/editline ; I'll submit it for inclusion in the main repository at darcs.haskell.org as well. Thanks, -Judah
participants (3)
-
Dominic Steinitz
-
Johannes Waldmann
-
Judah Jacobson