如何在Cygwin下安装Haskell readline?

时间:2010-08-26 11:00:30

标签: haskell cygwin readline

以下是尝试在via cabal-install中安装时收到的消息:

$ cabal install --extra-include-dirs="C:\no_spaces\cygwin\usr\include" --extra-lib-dirs="C:\no_spaces\cygwin\lib" readline
Resolving dependencies...
Configuring readline-1.0.1.0...
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for GNUreadline.framework... checking for readline... no
checking for tputs in -lncurses... yes
checking for readline in -lreadline... yes
checking for rl_readline_version... yes
checking for rl_begin_undo_group... yes
checking for rl_erase_empty_line... yes
checking for rl_free_undo_list... yes
checking for rl_completion_word_break_hook in -lreadline... yes
configure: creating ./config.status
config.status: creating config.mk
config.status: creating readline.buildinfo
config.status: creating include/HsReadlineConfig.h
config.status: include/HsReadlineConfig.h is unchanged
cabal.exe: Missing dependencies on foreign libraries:
* Missing header file: HsReadline.h
* Missing C libraries: readline, ncurses
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
cabal.exe: Error: some packages failed to install:
readline-1.0.1.0 failed during the configure step. The exception was:
ExitFailure 1

我有readline.h等等,很明显它似乎找到了它们。缺少HsReadline.h是一个问题似乎很奇怪:这不是我试图安装的软件包的一部分吗?

任何关于如何使这项工作的建议将不胜感激。无论是在gnuWin32 readline,MinGW还是cygwin下,我都花了好几天试图让它工作。

1 个答案:

答案 0 :(得分:1)

我打算猜测,抛出Cygwin的是DOS / Windows风格的路径:“C:\ no_spaces \ cygwin \ usr \ include”

尝试在Cygwin shell中导航到这些文件。它可能看起来像“/ cygdrive / c / no_spaces / cygwin / usr / include”

关于HsReadline.h的消息可能是一个红色的鲱鱼。真正的问题是Cabal无法找到要编译的底层开发库。