Haskell ghc compiling/linking error, not creating executable. (linux)

后端 未结 2 653
萌比男神i
萌比男神i 2021-01-07 21:09

I wrote a basic hello world program in haskel and tried to compile it with: ghc filename.hs. It produces .hi and .o files but no executable and displays this error in the li

2条回答
  •  别那么骄傲
    2021-01-07 21:43

    Update - gold on Ubuntu 12.10 appears to move GNU ld to ld.bfd. To fix this problem I deleted the ld link as recommended and remade the link with

      ln -s ld.bfd ld
    

    ghc compilations are now going through.

    (Couldn't see how to subvert the settings file in usr/lib/ghc, as the entry is for gcc which passes through its commandline to ld, although this would have been my preferred option, in case something else needs ld to be the way it was.)

    Thanks to Dominic for the pointer of where to look! It was driving me crazy...

提交回复
热议问题