简体   繁体   English

构建GHC:尽管成功安装了cabal,但配置失败仍然很快乐

[英]Building GHC: configure fails on happy despite successful cabal install

I am attempting to build GHC from source following this page . 我试图在此页面之后从源代码构建GHC。 When installing dependencies, I had to install happy and alex : 安装依赖项时,我必须安装happyalex

$ cabal install alex happy
Resolving dependencies...
Configuring alex-3.2.1...
Configuring happy-1.19.5...
Building happy-1.19.5...
Building alex-3.2.1...
Installed alex-3.2.1
Installed happy-1.19.5

yet when running configure I get an error message: 但是在运行configure我收到一条错误消息:

$ ./configure
...
checking for happy... no
checking for version of happy... 
configure: error: Happy version 1.19.4 or later is required to compile GHC.

I am running on Debian stretch : 我在Debian运行stretch

$ uname -a 
Linux <host> 4.8.0-1-amd64 #1 SMP Debian 4.8.5-1 (2016-10-28) x86_64 GNU/Linux

Can anyone suggest an obvious step I could try to resolve this? 任何人都可以建议一个明显的步骤我可以尝试解决这个问题

You should install alex and happy as Debian packages as well. 您应该安装alexhappy作为Debian软件包。 On a Debian machine, you can use apt-get for that: 在Debian机器上,您可以使用apt-get

sudo apt-get install alex happy

I suspect you simply don't have them on your PATH. 我怀疑你的PATH上根本就没有它们。 Make sure to include something like 确保包含类似的内容

PATH="$HOME/.cabal/bin:$PATH"

in your .bashrc (or startup files for whatever shell you use). 在你的.bashrc(或你使用的任何shell的启动文件)。 Installing them through the package manager simply installed them in a location that was already on your PATH. 通过包管理器安装它们只需将它们安装在PATH上已有的位置即可。

Even if you have things working now, you should consider modifying your .bashrc while it's fresh in your head, as other cabal-install'd executables will get put there in the future. 即使你现在有工作,你也应该考虑修改你的.bashrc,因为其他的cabal-install'd可执行文件将在未来放置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM