3

这是我尝试通过 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 下。

4

1 回答 1

1

我冒昧地猜测一下,让 Cygwin 失败的是 DOS/Windows 风格的路径:“C:\no_spaces\cygwin\usr\include”

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

The message about HsReadline.h is probably a red herring. The real issue is that Cabal can't find the underlying dev library to compile against.

于 2010-09-24T13:23:37.193 回答