From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] package/iputils: link with -lintl
Date: Thu, 25 Aug 2016 15:37:48 +0200 [thread overview]
Message-ID: <20160825153748.5a8bbb7a@free-electrons.com> (raw)
In-Reply-To: <00309b95-ef5b-ba21-ecaa-7b62010718b5@mind.be>
Hello,
On Thu, 25 Aug 2016 15:17:37 +0200, Arnout Vandecappelle wrote:
> > Not correct. There are several packages that optionally depend on
> > gettext. For example, look at coreutils, it does exactly what I saying
> > above: it depends on gettext if BR2_PACKAGE_GETTEXT=y and that's it.
> >
> > Same for gdbm, gptfdisk, libconfuse, popt, etc, etc.
> >
> > So no, you've not followed the pattern used everywhere else :-)
>
> Ahem. Looking back in my console logs: I grepped for BR2_NEEDS_GETTEXT and I
> found the pattern I mentioned. Self-fulfilling prophecy :-)
Hehe :-)
> >> Oh, and BR2_NEEDS_GETTEXT is still needed as well, because the gettext package
> >> can also be built for glibc and musl, but in that case gpg-error doesn't link
> >> with it (because the functionality is already available in libc).
> >
> > Just use the optional dependency I mentioned above. When the gettext
> > package is built with a musl or glibc toolchain, it doesn't build and
> > install a libintl library, since the C library already provides the
> > functionality. So adding gettext as an optional dependency is just fine.
>
> I mean it is needed (or rather, makes sense) for iputils. If
> BR2_PACKAGE_GETTEXT && !BR2_NEEDS_GETTEXT, then libgpg-error doesn't link with
> libintl, so iputils doesn't need -lintl. And since libintl doesn't even exist,
> adding -lintl will give an error. No?
Hum, yes, I guess so. So, to sum up:
* Your PATCH 1 needs to be adjusted to:
ifeq ($(BR2_PACKAGE_GETTEXT),y)
LIBGPG_ERROR_DEPENDENCIES += gettext
endif
* Your PATCH 2 needs to be adjusted to:
# When gettext is enabled (BR2_PACKAGE_GETTEXT=y), and provides
# libintl (BR2_NEEDS_GETTEXT=y), we need to link with libintl
# explicitly when static linking, since our dependencies might use it.
ifeq ($(BR2_NEEDS_GETTEXT)$(BR2_PACKAGE_GETTEXT)$(BR2_STATIC_LIBS),yyy)
IPUTILS_MAKE_OPTS += ADDLIB='-lintl'
endif
Is this correct?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-08-25 13:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-24 23:10 [Buildroot] [PATCH 1/2] package/libgpg-error: optionally depends on gettext Arnout Vandecappelle
2016-08-24 23:10 ` [Buildroot] [PATCH 2/2] package/iputils: link with -lintl Arnout Vandecappelle
2016-08-25 3:51 ` Baruch Siach
2016-08-25 8:18 ` Thomas Petazzoni
2016-08-25 8:56 ` Arnout Vandecappelle
2016-08-25 8:57 ` Arnout Vandecappelle
2016-08-25 13:07 ` Thomas Petazzoni
2016-08-25 13:17 ` Arnout Vandecappelle
2016-08-25 13:37 ` Thomas Petazzoni [this message]
2016-08-25 14:39 ` Arnout Vandecappelle
2016-08-25 8:33 ` [Buildroot] [PATCH 1/2] package/libgpg-error: optionally depends on gettext Thomas Petazzoni
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=20160825153748.5a8bbb7a@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/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