2016-01-25 56 views
1

我试图建立在NixOS一个新Stack项目与GHCJS如下指令编译器在http://docs.haskellstack.org/en/stable/ghcjs.html错误在试图创建GHCJS编译

我已经包含在我的stack.yaml文件中的新Stack项目下面的代码行(全部在一行上,因为标签空间似乎给问题):

# Compiler specifying the GHCJS compiler for this project (using improved base). 
compiler: ghcjs-0.2.0.20151230.3_ghc-7.10.2 
compiler-check: match-exact 
setup-info: 
    ghcjs: source: 
     ghcjs-0.2.0.20151230.3_ghc7.10.2: 
      url: "https://github.com/nrolland/ghcjs/releases/download/v.0.2.0.20151230.3/ghcjs-0.2.0.20151230.3.tar.gz" 

,我已经检索到的,当我跑stack setup

Could not parse '/home/lorkaan/pandocJS/stack.yaml': 
InvalidYaml (Just (YamlParseException {yamlProblem = "mapping values are not allowed in this context", yamlContext = "", yamlProblemMark = YamlMark {yamlIndex = 487, yamlLine = 12, yamlColumn = 17}})) 
See https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md. 
以下错误消息

此外,我试图消除setup-info字段,因为堆栈抱怨这件事,让我stack.yaml文件,如:

# Compiler specifying the GHCJS compiler for this project (using improved base). 
compiler: ghcjs-0.2.0.20151230.3_ghc-7.10.2 
compiler-check: match-exact 

产生此输出与堆栈设置命令:

Warning: /home/lorkaan/pandocJS/stack.yaml: Unrecognized field in ProjectAndConfigMonoid: compiler 
Preparing to install GHC to an isolated location. 
This will not interfere with any system-level installation. 
Already downloaded.     
The following executables are missing and must be installed: make 

有谁有任何想法为什么这会发生?

回答

4
  1. 第一个错误是因为您的YAML配置中的基本语法错误。正确的版本应该是:
setup-info: 
    ghcjs: 
     source: 
      ghcjs-0.2.0.20151230.3_ghc7.10.2: 
       url: "https://github.com/nrolland/ghcjs/releases/download/v.0.2.0.20151230.3/ghcjs-0.2.0.20151230.3.tar.gz" 
  • 第二个错误是因为正是它说:你缺乏make效用。您需要使用您的Linux发行版的软件包管理系统来安装make。由于我不知道你在使用哪种发行版,因此我只能推荐简单地执行$ make命令并查看环境是否足够智能以指出可以找到哪个包.Ubuntu通常会这样做。那么它只是一个apt-get install-在包装上,或者可能在yum install上,例如在上面。 CentOS和Fedora等。
  • P.S.像你这样的问题通常会因为没有足够的努力来诊断问题而陷入低谷(或者在一个问题下把两个完全不同的问题),但是我会给你带来怀疑的好处,希望你下一次会更加整洁。时间。