[Hackage] #331: pkg-config error messages could be better

#331: pkg-config error messages could be better ----------------------------------+----------------------------------------- Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.4.0.1 Severity: normal | Keywords: Difficulty: very easy (<1 hour) | Ghcversion: 6.8.2 Platform: | ----------------------------------+----------------------------------------- Currently if you `cabal install X11-xft` but don't have the xft development package installed you get this during configure: {{{ cabal: The pkg-config package xft is required but it could not be found. }}} What is not immediately clear is that this is a native package and thus not something that `cabal-install` could have gone and fetched. So the wording of this message could be improved. Perhaps mentioning both in general terms and then specifically. For example saying that the development files for xft are not installed and that the user probably can and should install a native package that provides it. Specifically it's looking for a xft.pc file that pkg-config uses to tell is what compiler flags to use to use xft. A related problem is that the message is somewhat lost in the noise because we print the error to stdout rather than throwing it as an exception that we could print in the final summary. This problem is particulary bad when we have to have error message cross process boundaries, ie when cabal-install invokes a setup program. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/331 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#331: pkg-config error messages could be better ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.4.0.1 Severity: normal | Resolution: Keywords: | Difficulty: very easy (<1 hour) Ghcversion: 6.8.2 | Platform: ----------------------------+----------------------------------------------- Comment (by joe): I took a stab at rewording the message, trying to clarify the fact that it's not a hackage package while still keeping the message short. Here's a patch: http://heme.elem.com/darcs/cabal/ticket-331/_darcs/patches/20090916150213 -e31fe-f523ea38606c6292de44980c2d51bd1bc8110e59.gz -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/331#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#331: pkg-config error messages could be better ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.4.0.1 Severity: normal | Resolution: Keywords: | Difficulty: very easy (<1 hour) Ghcversion: 6.8.2 | Platform: ----------------------------+----------------------------------------------- Comment (by duncan): Replying to [comment:1 joe]:
I took a stab at rewording the message, trying to clarify the fact that it's not a hackage package while still keeping the message short. Here's a patch:
Thanks Joe but the change you suggest is making the message more low-level with this talk about `pkg-config --modversion` {{{ - notFound = "The pkg-config package " ++ pkg ++ versionRequirement - ++ " is required but it could not be found." + notFound = "The development package " ++ pkg ++ versionRequirement + ++ " is required but it could not be found using pkg-config --modversion" }}} The users who are confused about this message are confused about whether it's talking about a system package or a Haskell package. They've probably never heard of pkg-config and do not know what it does. I think it's ok to have a slightly longer message, perhaps more along the lines of what we show for missing C libs: {{{ Setup.hs: Missing dependency on a foreign library: * Missing header file: foo.h This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is. }}} -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/331#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#331: pkg-config error messages could be better ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.4.0.1 Severity: normal | Resolution: Keywords: | Difficulty: very easy (<1 hour) Ghcversion: 6.8.2 | Platform: ----------------------------+----------------------------------------------- Comment (by joe): Replying to [comment:2 duncan]:
They've probably never heard of pkg-config and do not know what it does.
True. (I did not.) But phrasing it as "pkg-config --modversion" gives the user the hint that it's an executable (with a man page). The long version would have pointed me in the right direction too. Either way, I think it's worthwhile to cite the exact command Cabal ran. This gives the user a starting place for troubleshooting if there is a problem with the user's system installation or they're on an unusual platform, eg. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/331#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage