From: taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer)
To: guix-devel@gnu.org
Subject: pkg-config "Requires" fields and propagated inputs
Date: Thu, 19 Mar 2015 21:48:28 +0100 [thread overview]
Message-ID: <87d2444stf.fsf@taylan.uni.cx> (raw)
I would appreciate it if someone helped me wrap my head around this.
Ideally I already got it and the following summary is correct; otherwise
please correct.
Pkg-config files (e.g. lib/pkgconfig/foo.pc for libfoo) may have a
"Requires" and a "Requires.private" field.
If I'm reading pkg-config documentation[0] right, Requires are full
run-time dependencies, meaning if a program uses libfoo which Requires
libbar, the program will also want/have to use libbar's interface; OTOH
Requires.private are "link-time" dependencies, i.e. libfoo dynamically
links to libbar, so libbar needs to exist on the system at run-time, but
a program using libfoo needn't use libbar's interface.
This would mean that Requires should be propagated inputs, and
Requires.private only normal inputs; they needn't be in the profile of
the user who installs libfoo; it's enough that libfoo refers directly to
their path in the store.
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, 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.)
[0] http://people.freedesktop.org/~dbn/pkg-config-guide.html
P.S.: I'll see if I can write a tool that compares the union of the
Requires[.private] fields of all .pc files in a package to the package's
propagated inputs, so we can detect mismatches automatically.
Taylan
next reply other threads:[~2015-03-19 20:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-19 20:48 Taylan Ulrich Bayırlı/Kammer [this message]
2015-03-24 20:57 ` pkg-config "Requires" fields and propagated inputs Ludovic Courtès
2015-03-24 22:52 ` Taylan Ulrich Bayırlı/Kammer
2015-03-25 16:56 ` Ludovic Courtès
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=87d2444stf.fsf@taylan.uni.cx \
--to=taylanbayirli@gmail.com \
--cc=guix-devel@gnu.org \
/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.