[Haskell-cafe] Cabal, xmonad-contrib, X11-xft, pkg-config ... questioning my sanity

Jacek Generowicz jacek.generowicz at cern.ch
Mon Dec 6 15:48:33 CET 2010


On 2010 Dec 6, at 15:39, Jacek Generowicz wrote:

> On 2010 Dec 6, at 14:15, Duncan Coutts wrote:
>
>>
>> In the development version of cabal we have changed that error  
>> message
>> to try and make it clear that it is looking for a program called
>> pkg-config, not a Haskell package or a C lib.
>>
>> cabal: The program pkg-config version >=0.9.0 is required but it  
>> could not be
>> found.
>>
>> Do you think that message would have helped avoid your confusion?
>
> Oooh, that's a difficult question to answer, as I had read your  
> earlier paragraph before coming to this question. After your  
> explanation explained the error message (to the extent that I now  
> wonder how on earth I ever took it to mean that it's looking for X11- 
> xft version >=0.9.0, when it quite clearly states "pkg-config  
> version >=0.9.0 is required but could not be found"), I have no idea  
> whether the new message would have been better.
>
>> Is there an alternative message that would have been better?
>
> Well, if I try to understand how I could have misunderstood the  
> original message, I suspect that it is because of the common style  
> of error message where the program generating the message precedes  
> the actual message on the same line, just like "cabal: ..." precedes  
> the message in this case. So I guess that I parsed it something like  
> "... pkg-config: version >=0.9.0 is required ..." and inferred that  
> 'version' refers to the package mentioned in an earlier message.
>
> In which case, maybe something like
>
>    cabal: version >=0.9.0 of pkg-config is required ...
>
> would have prevented me from making this particular mistake in this  
> particular case.

Another thing that would probably have made it easier to understand:  
the message is strictly correct, but is *too* specific: it talks about  
pkg-config version >=0.9.0 not being found, while the problem was that  
*no version at all* was present.

I would understand if making the error message change according to  
such subtle distinctions would be more effort that it is worth.




More information about the Haskell-Cafe mailing list