[Haskell-cafe] GitIt

Andrew Coppin andrewcoppin at btinternet.com
Fri Nov 19 15:47:42 EST 2010

On 19/11/2010 08:32 PM, Judah Jacobson wrote:
> Two possible fixes come to mind:
> 1) In the .cabal file for cautious-file, it says:
> Flag posix
>      description: Use POSIX-specific features
>      default: True

Ah. I hadn't seen this bit.

Yes, what's probably happened is that I altered the build dependencies, 
but the CPP flag was still turned on by default, resulting in a borked 
binary being built.

> You can use "cabal install -fposix cautious-file" to explicitly turn
> on POSIX support, and "cabal install -f-posix cautious-file" to
> explicitly turn it off.  (From above, the default is the former.)

Right. Yes, if I explicitly turn off POSIX support, that'll probably fix 
it. (I didn't know what the correct flag was to do that.)

> Incidentally, it would be better for the .cabal file to detect that
> automatically with "if os(windows)", as e.g. Haskeline does.

Tell it to whoever maintains cautious-file. ;-)

> 2) If you have a local, edited installation of a package with the same
> version number as the one on Hackage, then it seems to confuse "cabal
> install".  (This may be a bug; I'm not sure.)

It sure sounds like a bug to me... (And presumably a bug specifically 
with cabal-install, not the cabal library itself?)

> Workaround is to bump
> the version in your local installation, e.g. from 0.1.5 to
>; then "cabal install" won't try to rebuild it.

Ooo, yeah, but only if the package depending on cautious-file doesn't 
exactly pin down the required version number. ;-)

> Hope that helps,
> -Judah

Yes, I think I know how to fix this now.

PS. You have *no idea* how many different MD5 implementations I saw 
being compiled during this exercise...!

More information about the Haskell-Cafe mailing list