From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: inputs vs. native-inputs vs. propagated-inputs Date: Sun, 12 Jun 2016 15:53:28 -0400 Message-ID: <20160612195328.GB1615@jasmine> References: <575D2646.6030000@crazy-compilers.com> <877fdur38e.fsf@member.fsf.org> <575D84C5.5090307@crazy-compilers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCBS0-0005ak-Nu for help-guix@gnu.org; Sun, 12 Jun 2016 15:53:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCBRy-0001Ni-I8 for help-guix@gnu.org; Sun, 12 Jun 2016 15:53:39 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:57227) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCBRx-0001L4-4V for help-guix@gnu.org; Sun, 12 Jun 2016 15:53:38 -0400 Content-Disposition: inline In-Reply-To: <575D84C5.5090307@crazy-compilers.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Hartmut Goebel Cc: help-guix On Sun, Jun 12, 2016 at 05:50:29PM +0200, Hartmut Goebel wrote: > Am 12.06.2016 um 14:38 schrieb 宋文武: > > Hartmut Goebel 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." 'Inputs' do typically get used at run-time, as do propagated-inputs. I found it hard to understand the distinctions by reading. It was only when I had been making packages for a while that I understood. I've tried to improve this text but I haven't come up with anything yet. > >> 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? You will need at least a little knowledge about the programs you are packaging and how they are supposed to build and run. I read a bit about each program to guess about how libAAA uses it. > 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. Test the program in an isolated environment and see if it works without propagating the inputs. You can set up an environment with only libAAA ... $ guix environment --container --ad-hoc libAAA ... and then somehow exercise libAAA to see if it can find its dependencies. Also, once you've built the package, using `guix gc --references` is a good way to inspect it. The type of input chosen by the packager does not dictate how libAAA uses the dependency. The package could erroneously retain a reference to a native-input like Automake, and `guix gc --references` will show you this. So, if libCCC appears in `guix gc --references /gnu/store/...-libAAA`, it's reasonable to guess that libCCC does not need to be propagated. Or, the package could lack a reference to something you *know* is needed at run-time. So you can address that with propagated-inputs or setting some build-time configuration. Is it making more sense?