我有一个上周构建的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
运行此构建的任何提示吗?
答案 0 :(得分:0)
我使用stack new my-project simple
创建了一个新项目,并使用
从那里安装了它们。
cd my-project
stack install alex
stack install happy
我不明白如何管理这些依赖关系:看起来它们只是全局工具,尽管它们是用Haskell构建并托管在Stackage上的,但可以从任何地方引入。我安装的版本与我最初编写项目时使用的版本不同,但看起来现在一切正常。