[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pkg-config "Requires" fields and propagated inputs
From: |
Ludovic Courtès |
Subject: |
Re: pkg-config "Requires" fields and propagated inputs |
Date: |
Wed, 25 Mar 2015 17:56:05 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
address@hidden (Taylan Ulrich "Bayırlı/Kammer") skribis:
> address@hidden (Ludovic Courtès) writes:
>
>> Do you have an example of a package that uses Requires.private?
>
> libxrandr is a good test case. Indeed I patched it a few days ago
> because some libraries in its Requires.private weren't propagated, which
> fixed my issue.
>
>>> However, pkg-config isn't aware of compile-time/run-time dependency
>>> differences; it's considered an error if a Requires.private of libfoo
>>> isn't found,
>>
>> Really, even without --static?
>>
>>> because as far as pkg-config is concerned, it means libfoo is
>>> dysfunctional. So we *do* need to propagate Requires.private, for the
>>> sake of pkg-config. (The problem mainly manifests in the form of
>>> ./configure scripts claiming libfoo isn't found when it's only libbar
>>> that's missing, because in that case pkg-config returns an error to
>>> the ./configure script when inquired about libfoo.)
>>
>> Do you have an example of that?
>
> I hit the issue with libxrandr while packaging mpv. It has x11 under
> its Requires.private, and:
[...]
> So while e.g. --libs actually works, --exists reports failure, and
> --print-errors explains why.
>
> One could say this is partially a bug, because if libxrandr statically
> linked against libx11, then libx11 needn't exist at build nor run time.
OK. Thanks for digging.
> It might be nice to have build-only propagated inputs. On the other
> hand, someone installing libxrandr in their profile will expect
> pkg-config on libxrandr to work without errors. More generally, they
> will expect any build operation to work; i.e. a user might want to use
> Guix-installed libraries for Guix-external development, and build-only
> propagated inputs would mean annoying such users because they now have
> to install them manually. Unless we provide a special "install for
> development" operation that is. But the complexity grows. :-)
Heh. Another option would be to have per-output propagated inputs.
That is, if a package has “out” and “lib” outputs, you’d want the
propagated inputs to apply only to “lib” since this is where the .pc is.
(This has been in ‘TODO’ for a couple of years.)
Thoughts?
Thanks,
Ludo’.