6

我正在尝试使用官方教程中提供的安装指南在 OSX Lion 中安装 Idris 语言。我已经安装了GMP。这是我得到的错误:

$ cabal install idris
Resolving dependencies...
Configuring libffi-0.1...
cabal: The pkg-config package libffi is required but it could not be found.
[1 of 1] Compiling Main             ( /var/folders/f0/dlx6tl5x18z4k4_vq0fkqtb80000gn/T/llvm-general-3.3.5.0-61662/llvm-general-3.3.5.0/Setup.hs, /var/folders/f0/dlx6tl5x18z4k4_vq0fkqtb80000gn/T/llvm-general-3.3.5.0-61662/llvm-general-3.3.5.0/dist/setup/Main.o )
Linking /var/folders/f0/dlx6tl5x18z4k4_vq0fkqtb80000gn/T/llvm-general-3.3.5.0-61662/llvm-general-3.3.5.0/dist/setup/setup ...
setup: The program llvm-config version ==3.3.* is required but it could not be
found.
cabal: Error: some packages failed to install:
idris-0.9.9 depends on llvm-general-3.3.5.0 which failed to install.
libffi-0.1 failed during the configure step. The exception was:
ExitFailure 1
llvm-general-3.3.5.0 failed during the configure step. The exception was:
ExitFailure 1

尝试在没有 LLVM 的情况下安装 Idris 会产生此错误:

$ cabal install idris -f-LLVM
Resolving dependencies...
Configuring libffi-0.1...
cabal: The pkg-config package libffi is required but it could not be found.
cabal: Error: some packages failed to install:
idris-0.9.9 depends on libffi-0.1 which failed to install.
libffi-0.1 failed during the configure step. The exception was:
ExitFailure 1
4

2 回答 2

6

我在 OSX Mavericks 上遇到了同样的问题。为了让 Idris 编译,我使用 homebrew 安装 gmp,然后我必须执行 'export PKG_CONFIG_PATH=/usr/local/Cellar/libffi/3.0.13/lib/pkgconfig',然后 'cabal install idris -f-LLVM '。我得到了从这个站点导出 PKG_CONFIG_PATH 变量的提示:

https://groups.google.com/d/msg/idris-lang/gxcdvRIA2OI/NqKSd4zHkI4J

Mavericks 已经安装了 libffi,我不想从源代码安装第二个副本,这是 PKG_CONFIG_PATH 技巧帮助我避免的。执行“brew info libffi”以找到正确的导出路径。希望有人能很快为伊德里斯创造一个自制配方......

于 2013-11-10T16:49:15.790 回答
3

第一个错误表明您应该安装发行版的 LLVM 开发包(而不是通过 cabal),第二个错误表明您应该安装 GCC libffi 库的开发包。您使用的是什么 Linux 发行版?或者你在 Windows/Mac 上?

于 2013-09-04T06:21:02.593 回答