From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 0/2] Add gettext-tiny package
Date: Sat, 9 Mar 2019 23:37:42 +0100 [thread overview]
Message-ID: <20190309233742.3095c546@windsurf> (raw)
In-Reply-To: <20190212215520.7422-1-vadim4j@gmail.com>
Hello,
On Tue, 12 Feb 2019 23:55:18 +0200
Vadim Kochan <vadim4j@gmail.com> wrote:
> Add lightweight alternative for the GNU gettext package - gettext-tiny.
> The sources are used from sabotage-linux project. Some files are used
> from the original gettext gnu like po/*, gettextize and some m4 files.
>
> The original gettext package is renamed to gettext-gnu because now gettext is
> a virtual package and gettext-gnu and gettext-tiny became as gettext providers.
>
> The main purpose of gettext-tiny is to be used only for the host if NLS
> is not enabled.
I finally took some time to play around with this. The first thing is
that I didn't like a lot the download of lots of gettext-gnu files from
gettext-tiny. I've played a bit with this, and ended up trying to use
the gettext-gnu tarball instead. See:
https://github.com/tpetazzoni/buildroot/tree/gettext-tiny
https://github.com/tpetazzoni/buildroot/commit/22936b22944f49646c8732fb2742a526d0a556e2#diff-e5eacf305a325109262748204673e7b5R19
for the details. It also avoids the need to patch to get config.rpath,
because config.rpath is available in the gettext-gnu tarball.
I also reworked how the virtual package was handled, but I then
understood that I had mistaken that only the host package was really a
virtual package with two implementation: the target gettext package has
only one implementation: gettext-gnu.
However, the ecryptfs-utils case has shown that it is possible for a
package to need a gettext implementation even if BR2_SYSTEM_ENABLE_NLS
is disabled. So from there, we have two solutions:
- Patch ecryptfs-utils itself so that it doesn't use gettext when
--disable-nls is used. Perhaps this is the right thing to do. In
this case, we could indeed mandate that the target gettext package
is only available when BR2_SYSTEM_ENABLE_NLS=y, and therefore indeed
have the gettext virtual package always point to gettext-gnu.
- Alternatively, support gettext-tiny as a target package, which would
provide both libintl and the gettext program (the latter to please
ecryptfs-utils).
I was initially worried that some packages that don't understand
--disable-nls might try to link with libintl, and that we would
therefore need a target gettext package even if BR2_SYSTEM_ENABLE_NLS.
However, libintl is only a replacement library for the gettext
functions that don't exist in uclibc/musl, but do exist in glibc.
Because in glibc they are part of the C library itself, I don't think
any package is ever going to link explicitly with libintl. It's only
Buildroot that ensures -lintl is passed to the LIBS/LDFLAGS when
needed. So I believe we're good.
So, perhaps the good solution is option (1) above ?
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2019-03-09 22:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-12 21:55 [Buildroot] [PATCH v3 0/2] Add gettext-tiny package Vadim Kochan
2019-02-12 21:55 ` [Buildroot] [PATCH v3 1/2] package/gettext: Turn into virtual package Vadim Kochan
2019-02-12 21:55 ` [Buildroot] [PATCH v3 2/2] package/gettext-tiny: Add new package Vadim Kochan
2019-03-09 22:37 ` Thomas Petazzoni [this message]
2019-03-10 0:20 ` [Buildroot] [PATCH v3 0/2] Add gettext-tiny package Vadim Kochan
2019-03-10 9:11 ` Thomas Petazzoni
2019-03-10 10:18 ` Yann E. MORIN
2019-03-10 23:05 ` Vadim Kochan
2019-03-11 8:02 ` Thomas Petazzoni
2019-03-11 10:46 ` Vadym Kochan
2019-03-11 8:01 ` 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=20190309233742.3095c546@windsurf \
--to=thomas.petazzoni@bootlin.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