unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
To: 宋文武 <iyzsong@member.fsf.org>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: inputs vs. native-inputs vs. propagated-inputs
Date: Sun, 12 Jun 2016 17:50:29 +0200	[thread overview]
Message-ID: <575D84C5.5090307@crazy-compilers.com> (raw)
In-Reply-To: <877fdur38e.fsf@member.fsf.org>

Hi,

Thanks for your answer

Am 12.06.2016 um 14:38 schrieb 宋文武:
> Hartmut Goebel <h.goebel@crazy-compilers.com> writes:
>> For for I understand. But then the manual says:
>>
>>           ‘native-inputs’ is typically used to list tools needed at
>>           build time, but not at run time, such as Autoconf, Automake,
>>           pkg-config, Gettext, or Bison.
>>
>> The first sentence implies that "inputs" are treated as needed at run
>> time.
> No, as _native_ inputs usually are tools for building (and testing),
> most time they’re not needed at run time.

This paragraph is only talking about "native-inputs" and about "needed …
not at run time". While the paragraph just above this sentence is
talking about both "inputs" and native-inputs", this "needed … not at
run time" implies "inputs" are needed at run time.

I suggest rephrasing this into something like: "Both inputs and
native-inputs are used for stuff needed at build time, not at run time.
'inputs' are for ..., e.g. library headers, ..., while 'native-inputs'
are for tools such as Autoconf, Automake, pkg-config, Gettext, or Bison."


>
>> If so, how can I as a packager find out if eg. libBBB is only used at
>> build time and libCCC need to be a propagated input?
> By looking the output of ‘guix gc –-references …’, the build time ones
> are ones not there.  

I'm the packager, so I'm the one who needs to *define* the dependencies.
There is no ‘guix gc –-references …’ I can query. So *I* need a way to
determine whether an input needs to be propagated or not.

>
>> Same for pkg-config: How to determine if this is only needed ar build
>> time (as I would always expect)? The manual says:
>>
>>           … propagated-inputs …
>>           For example this is necessary when a C/C++ library needs
>>           headers of another library to compile, or when a pkg-config
>>           file refers to another one via its ‘Requires’ field.
>>
>>   For me this is confusing.
> Many build systems use ‘pkg-config’ to check for libraries and get
> flags, a pc file usually list some other packages in its ‘Requires’
> field, if one of these packages is missing (doesn’t have a <package>.pc
> file in PKG_CONFIG_PATH), this pc file will be treated as broken, and
> the package will be reported as ‘not found’.  So propageted these
> packages make ‘pkg-config’ works, reduce the work for packaging its
> users (otherwise, those packages need to added as inputs even they’re
> not used directly).

Thanks, I misunderstood the example. I though it was talking about
"pkg-config", while it is talking about .pc files.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

  reply	other threads:[~2016-06-12 15:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-12  9:07 inputs vs. native-inputs vs. propagated-inputs Hartmut Goebel
2016-06-12 12:38 ` 宋文武
2016-06-12 15:50   ` Hartmut Goebel [this message]
2016-06-12 19:53     ` Leo Famulari
2016-06-17 20:49       ` Hartmut Goebel
2016-06-17 23:34         ` Leo Famulari
2016-06-18 19:24           ` Ludovic Courtès
2016-06-19  3:57             ` Lukas Gradl
2016-06-19 13:44               ` Ludovic Courtès
2016-06-21 13:37                 ` Lukas Gradl
2016-07-10 21:23                   ` Chris Marusich

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=575D84C5.5090307@crazy-compilers.com \
    --to=h.goebel@crazy-compilers.com \
    --cc=help-guix@gnu.org \
    --cc=iyzsong@member.fsf.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).