问题
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