[cairo] Making configure error message more clear
behdad.esfahbod at gmail.com
Thu Mar 25 14:14:33 PDT 2010
On 03/25/2010 05:04 PM, Behdad Esfahbod wrote:
> On 03/22/2010 02:10 PM, Carl Worth wrote:
>> On Thu, 18 Mar 2010 21:15:33 +0100, Arjen Nienhuis <a.g.nienhuis at gmail.com> wrote:
>>>> Below is an exchange I recently had with a new user trying to use cairo
>>>> who got this error and followed its advice, (browsed to the URL, found
>>>> pixman, downloaded it, installed it to the default /usr/local/). But the
>>>> user still got the same message, and never knew to adjust the
>>>> PKG_CONFIG_PATH environment variable.
>>> Why isn't PKG_CONFIG_PATH set to $PREFIX/lib/pkgconfig by default?
>> I've often wondered why pkg-config doesn't do that by default.
>> But I suppose that we could just have cairo's configure script set that
>> environment variable that way if it's not already set. That would be a
>> nice solution for this problem.
> Interesting. Why pkg-config doesn't do it is not hard to see. Why shouldn't
> it provide a macro to do that, good q. I'll fix it in cairo and propose other
> packages doing the same.
Actually thinking about it more, I see why that would be wrong:
- If we only use $PREFIX/lib/pkgconfig if PKG_CONFIG_PATH is not set, then
user setting PKG_CONFIG_PATH to another location will break the build since
they now have to add $PREFIX/lib/pkgconfig manually.
- If we always append $PREFIX/lib/pkgconfig to PKG_CONFIG_PATH, the user
can't disable that dir.
At any rate, defaulting is not good. The second option, meh, handy but can
cause very hard-to-debug bugs.
> Though I do wish that even this step weren't necessary. It seems to me
> that with all of our software configuring itself for /usr/local by
> default, that pkg-config should *also* be looking there by default. (And
> then, I'd like the dynamic loader to look there by default as well.)
That's a plausible argument. Doesn't quite belong here though.
More information about the cairo