stack cannot build network - where's config.log?

巧了我就是萌 提交于 2019-12-20 06:17:11

问题


I have a project to build with stack and it depends on network. When I do stack build, it says

[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

Sure, I'd love to. But where is this config.log? Or how can I re-create it?

Just cabal install network (without stack) works fine but how could stack build use this?


回答1:


In order to get better information here, you can make sure all generated files are saved by manually building network:

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



回答2:


I think C compiler cannot create executables means you don't have a working C compiler installed.

config.log is generated by the configure command, and I don't think stack saves that. stack does save other logging output in

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

It's the same as what was emitted to your terminal, so it may not help.



来源:https://stackoverflow.com/questions/37354416/stack-cannot-build-network-wheres-config-log

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!