System.Directory.findExecutable and ghc's ld in Windows

Simon Marlow simonmarhaskell at
Mon May 15 11:41:23 EDT 2006

Esa Ilari Vuokko wrote:
> Hi!
> (please CC me as I am not subscribed)
> Happens on Cabal darcs head and Windows with ghc.
> In we try to invoke ld.  In Windows
> this file is found by deduction from ghc.exe path.
> (foo\bin\ghc.exe -> foo\gcc-lib\ld.exe).  When this absolute (rooted)
> path is passed on to rawSystem*, it gets search through PATH
> environment-variable in System.Directory.findExecutable
> (or the version in Compat.)
> System.Directory.findExecutable went through a rewrite for Windows
> between 6.4 series and 6.5 - it now uses Windows API function
> SearcPath which passes absolute paths straight throuhg, at least
> on my system (Windows XP).
> In the end, because 6.4.2 doesn't let absolute paths through,
> we need a fix.  What is the right way here?  Assume ghc 6.4.3 and
> get fix merged (see diff [1]); Add extra check for absolute path
> and file existence on findExecutable (and propagate this fix to
> base);

That sounds like the way to go to me.  That patch for System.Directory 
wasn't on the list to go into 6.4.3, I'm not sure whether it should.


More information about the cabal-devel mailing list