unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Leo Famulari <leo@famulari.name>
To: Hartmut Goebel <h.goebel@crazy-compilers.com>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: inputs vs. native-inputs vs. propagated-inputs
Date: Fri, 17 Jun 2016 19:34:33 -0400	[thread overview]
Message-ID: <20160617233433.GA10924@jasmine> (raw)
In-Reply-To: <57646277.4020400@crazy-compilers.com>

On Fri, Jun 17, 2016 at 10:49:59PM +0200, Hartmut Goebel wrote:
> >>> 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.
> 
> IC. I was hoping. I could just package some stuff without any knowledge.
> E.g  to make basic libraries and programs available so others can add
> more programs. Obviously I was wrong here :-(

To clarify: it does not require expert knowledge. If the upstream
maintainers have used a standard build system like Python's setuptools
or Automake, packaging for Guix is almost as easy as filling out a form.

> > Also, once you've built the package, using `guix gc --references` is a
> > good way to inspect it. 
> 
> This is what I do not get: If I do not specify some dependency, how will
> it be listed with `gc --references` (except the case there is another
> dependency). And if `gc --references` would be able to find dependencies
> I missed, why at all should one list dependencies?

`gc --references` is a diagnostic tool that looks at the result of
building the package, and reports what it finds. It's up to us to decide
if the result is what we expected.

I _think_ that `gc --references` works by querying the database for a
list of references in the store item you give it as an argument. I think
that the information in the database is created after building, by
scanning the files of the package's output in /gnu/store, looking for
strings that appear to be paths in /gnu/store. I say "I think" because I
am not sure. I don't understand that part of the code very well yet.

Here's an example of how I use it:
http://lists.gnu.org/archive/html/guix-devel/2016-06/msg00367.html

That package, msgpack, requires zlib to build and run.  After adding
zlib to msgpack's inputs, msgpack's build system is able to find zlib
and build msgpack successfully.

But, I used `guix gc --references` to list the references in
'/gnu/store/...-msgpack' to other store items, and there are no
references to zlib. That is, there are no strings in the msgpack output
that are paths like '/gnu/store/...-zlib'.

For some reason, the build process is not recording the location of zlib
into the built msgpack binaries. So, msgpack will probably not work
until we fix that.

I hope this helps.

  reply	other threads:[~2016-06-17 23:34 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
2016-06-12 19:53     ` Leo Famulari
2016-06-17 20:49       ` Hartmut Goebel
2016-06-17 23:34         ` Leo Famulari [this message]
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=20160617233433.GA10924@jasmine \
    --to=leo@famulari.name \
    --cc=h.goebel@crazy-compilers.com \
    --cc=help-guix@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.
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).