[Fwd: [Haskell-cafe] Fun with Cabal on Windows! [Stream fusion for Hackage]]

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Mon Nov 19 17:43:06 EST 2007

On Mon, 2007-11-19 at 23:05 +0100, Thomas Schilling wrote:
> [See attached message for full report.  Short version:
> Cabal error message on win32:  
> "Setup: ld is required but it could not be found."
> Solution: add $ghc_path/gcc-lib to searched paths for ld and co.
>  -or-:  advise people to add it to their PATH var.
> ]  
> I have no Windows system, but would is this worth a bug-fix for Cabal?
> Or has it already been fixed?

It is supposed to work, so we need to figure out why it is not working.
Currently we do some special searching for ld on Windows:

  -- finding ghc's local ld is a bit tricky as it's not on the path:
  let conf''' = case os of
        Windows _ ->
          let compilerDir  = takeDirectory (programPath ghcProg)
              baseDir      = takeDirectory compilerDir
              binInstallLd = baseDir </> "gcc-lib" </> "ld.exe"
           in addKnownProgram ldProgram {
                  programFindLocation = \_ -> return (Just binInstallLd)
                } conf''
        _ -> conf''

(from Distribution.Simple.GHC)

So we are trying to look for ld.exe in ghc's gcc-lib directory. It seems
that we are not finding it for some reason.

So we could do with seeing the output of configure -v3 which shows the
location that Cabal looks for and finds all the programs it needs.

If anyone else can reproduce this on windows that'd be helpful too.


More information about the cabal-devel mailing list