bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: Simon Josefsson <simon@josefsson.org>
Cc: bug-gnulib@gnu.org
Subject: Re: link dependencies
Date: Thu, 21 Jan 2021 19:01:57 +0100	[thread overview]
Message-ID: <7196089.E70L7gZszV@omega> (raw)
In-Reply-To: <871reeqme9.fsf@latte.josefsson.org>

Simon Josefsson wrote:
> >  
> > +Link:
> > +$(LIB_GETRANDOM)
> > +
> >  License:
> >  LGPLv2+
> 
> Is this part needed?  The module depends on getrandom.  Is it because
> that is only a conditional dependency?
> 
> > diff --git a/modules/crypto/gc-tests b/modules/crypto/gc-tests
> > index 7b153d1..5a16ba3 100644
> > --- a/modules/crypto/gc-tests
> > +++ b/modules/crypto/gc-tests
> > @@ -8,4 +8,4 @@ configure.ac:
> >  Makefile.am:
> >  TESTS += test-gc
> >  check_PROGRAMS += test-gc
> > -test_gc_LDADD = $(LDADD) @LIB_CRYPTO@
> > +test_gc_LDADD = $(LDADD) @LIB_CRYPTO@ $(LIB_GETRANDOM)

In test_gc_LDADD, $(LIB_GETRANDOM) is needed, to avoid the link error on MSVC.

The 'Link' section in the module description is only informative.

Originally, we thought that it would be good to note, in the 'Link' section,
only the immediate link dependencies of the module, and let the user use
  ./gnulib-tool --extract-recursive-link-directive MODULE
for the rest.

But in the past few years, it has turned out that this does not work well:
As a user of a module, we don't look at the recursive dependencies closure
any more (partly because this closure is so large, often). The user of a
module looks at the module description _only_.

And so, the 'Link' section needs to contain the recursive link directive.
And when changing some module to use 'getrandom', all direct and indirect
callers of this module must get $(LIB_GETRANDOM) added to their module
descriptions.

Note that we don't (yet) follow this rule strictly for $(LIBINTL) and
$(LIBUNISTRING). But for more rarely used libraries like $(LIB_GETRANDOM)
it's worth it.

Bruno



  reply	other threads:[~2021-01-21 18:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20 11:13 [PATCH] gc-random: Replace implementation with call to getrandom simon--- via Gnulib discussion list
2021-01-20 20:48 ` Bruno Haible
2021-01-21 16:34   ` simon--- via Gnulib discussion list
2021-01-21 18:01     ` Bruno Haible [this message]
2021-01-21 18:16       ` link dependencies simon--- via Gnulib discussion list

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://lists.gnu.org/mailman/listinfo/bug-gnulib

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

  git send-email \
    --in-reply-to=7196089.E70L7gZszV@omega \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=simon@josefsson.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).