【问题标题】:stack cannot build network - where's config.log?堆栈无法建立网络 - config.log 在哪里?
【发布时间】:2016-05-22 12:24:08
【问题描述】:

我有一个项目要用stack 构建,它依赖于network。当我做stack build 时,它会说

[1 of 1] Compiling Main             ( /tmp/stack23678/network-2.6.2.1/Setup.hs, /tmp/stack23678/network-2.6.2.1/.stack-work/dist/i386-linux/Cabal-1.22.5.0/setup/Main.o )
Linking /tmp/stack23678/network-2.6.2.1/.stack-work/dist/i386-linux/Cabal-1.22.5.0/setup/setup ...
Configuring network-2.6.2.1...
...
checking whether the C compiler works... no
configure: error: in `/tmp/stack23678/network-2.6.2.1':
configure: error: C compiler cannot create executables
See `config.log' for more details

当然,我很乐意。但是这个config.log在哪里?或者我怎样才能重新创建它?

只是cabal install network(没有stack)可以正常工作,但stack build 怎么能使用它呢?

【问题讨论】:

    标签: haskell haskell-stack


    【解决方案1】:

    为了在这里获得更好的信息,您可以确保所有生成的文件都通过手动构建网络保存:

    stack unpack network-2.6.2.1
    cd network-2.6.2.1
    stack init
    stack build
    

    【讨论】:

    • 谢谢。 (同时,我重新安装了 gcc,这也解决了我的问题。)我确认您的答案中的方法保存了生成的文件。
    【解决方案2】:

    我认为C compiler cannot create executables 表示您没有安装可用的 C 编译器。

    config.log 是由configure 命令生成的,我认为stack 不会保存它。 stack 确实将其他日志记录输出保存在

    ~/.stack/global-project/.stack-work/logs/...
    

    它与发送到终端的内容相同,因此可能无济于事。

    【讨论】:

    • 我确实有一个可以工作的编译器。正如我所说,cabal install network 运行良好。
    猜你喜欢
    • 2012-11-03
    • 2010-11-15
    • 2013-10-26
    • 1970-01-01
    • 2017-06-15
    • 2012-02-02
    • 2011-03-20
    • 1970-01-01
    • 2012-09-08
    相关资源
    最近更新 更多