[Haskell-cafe] stack: pandoc fails to build as dependency

Niklas Hamb├╝chen mail at nh2.me
Wed Oct 16 23:41:36 UTC 2019

On 16/10/2019 16:22, Neil Mayhew wrote:
> On 2019-10-16 7:57 a.m., Olaf Klinke wrote:
>> pandoc   > collect2: error: ld returned 1 exit status
>> pandoc   > `gcc' failed in phase `Linker'. (Exit code: 1)
> [...] Can you get more info about what the linker error is?

Indeed, the linker exiting with status 1 without any stderr message sounds like your linker is crashing.

Consider `stack build --cabal-verbose`, and if that doesn't provide the necessary level of detail yet, take the last `ghc` invocation it makes, run that directly and add `-v` to that to get GHC's verbose output, which will show you the full linker invocation (which you may then, again, run directly, thus drilling down to the tool that exits with an error unexpectedly).

Alternatively, you may use `strace -fy` on the top-level to get a full understanding of all IO that any process involved does, but it will be verbose.

More information about the Haskell-Cafe mailing list