all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: "Taylan Ulrich \"Bayırlı/Kammer\"" <taylanbayirli@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: pkg-config "Requires" fields and propagated inputs
Date: Wed, 25 Mar 2015 17:56:05 +0100	[thread overview]
Message-ID: <87y4mlrp7e.fsf@gnu.org> (raw)
In-Reply-To: <877fu62el9.fsf@taylan.uni.cx> ("Taylan Ulrich \=\?utf-8\?Q\?\=5C\=22Bay\=C4\=B1rl\=C4\=B1\=2FKammer\=5C\=22\=22's\?\= message of "Tue, 24 Mar 2015 23:52:18 +0100")

taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:

> ludo@gnu.org (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’.

  reply	other threads:[~2015-03-25 16:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-19 20:48 pkg-config "Requires" fields and propagated inputs Taylan Ulrich Bayırlı/Kammer
2015-03-24 20:57 ` Ludovic Courtès
2015-03-24 22:52   ` Taylan Ulrich Bayırlı/Kammer
2015-03-25 16:56     ` Ludovic Courtès [this message]
2015-03-25 19:48       ` Taylan Ulrich Bayırlı/Kammer
2015-03-26 22:03 ` Taylan Ulrich Bayırlı/Kammer
2015-03-31 12:14   ` Ludovic Courtès
2015-04-29 20:17     ` Taylan Ulrich Bayırlı/Kammer
2015-05-03 19:48       ` Ludovic Courtès
2015-05-03 20:57         ` Taylan Ulrich Bayırlı/Kammer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y4mlrp7e.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=taylanbayirli@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.