2010-08-26 117 views
3

這裏是嘗試通過安裝時,我得到的消息小集團安裝:如何在Cygwin下安裝Haskell readline?

$ 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下。

+0

您是否嘗試過使用 --extra-include-dirs =和--extra-lib-dirs = flags指向您的庫所在的文件夾? 你安裝了readline-dev和ncurses-dev嗎? 告訴我們你以前試過的是什麼。 – jakebman 2010-08-26 20:12:45

回答

1

我要大膽猜測,什麼扔Cygwin的關閉是DOS/Windows風格的路徑:「C:\ no_spaces \ Cygwin的的\ usr \包括」

嘗試導航到這些文件在cygwin貝殼。它可能看起來像「/ cygdrive/c/no_spaces/cygwin/usr/include」

有關HsReadline.h的消息可能是一條紅色鯡魚。真正的問題是Cabal無法找到要編譯的底層開發庫。