`stack build` 进程退出,代码为:ExitFailure 1

`stack build` Process exited with code: ExitFailure 1

我有一个上周构建的 haskell 堆栈项目,但我一定是在我的计算机上其他地方处理另一个 haskell 项目时破坏了它。我提高了我的 stack 版本,现在这个构建失败了,没有太多细节。使用更高的 verbosity 值,我的构建会打印很多警告,但这是它打印的有关此构建错误的所有详细信息:

$ stack build --verbosity error

--  While building package happy-1.19.5 using:
      /private/var/folders/kw/c01ws73s1xn996t2c_jt_fr00000gn/T/stack1958/happy-1.19.5/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 build --ghc-options ""
    Process exited with code: ExitFailure 1


--  While building package alex-3.2.1 using:
      /private/var/folders/kw/c01ws73s1xn996t2c_jt_fr00000gn/T/stack1958/alex-3.2.1/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 build --ghc-options ""
    Process exited with code: ExitFailure 1
Progress 12/61

我的stack.yaml:

resolver: lts-8.12
packages:
- '.'
extra-deps: []
flags: {}
extra-package-dbs: []

我尝试了 stack purge 并尝试了 运行 更新的 resolver,但这些都没有帮助。

我尝试自己构建 happy

$ stack build happy-1.19.5
## (eliding lots of warnings) ##
happy> 9 warnings generated.
happy> clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
happy> Configuring happy-1.19.5...
happy> build
happy> Building happy-1.19.5...
happy> Preprocessing executable 'happy' for happy-1.19.5...
happy> setup: The program 'happy' is required but it could not be found

关于将此版本升级到 运行 的任何提示?

我用 stack new my-project simple 创建了一个新项目,然后用

从那里安装了它们
cd my-project
stack install alex
stack install happy

我不明白这些依赖项是如何管理的:看起来它们只是全局工具,尽管它们是使用 Haskell 构建并托管在 Stackage 上,但可以从任何地方引入。我安装的版本与我最初编写项目时使用的版本不同,但现在看起来一切正常 ‍♂️。