[Buildroot] [PATCH 1/2] package/util-linux: libuuid needs -lintl

Yann E. MORIN yann.morin.1998 at free.fr
Sun Nov 30 11:57:42 UTC 2014


Thomas, Peter, All,

On 2014-11-29 16:59 +0100, Yann E. MORIN spake thusly:
> When gettext is needed (with locales), libuuid needs to be linked
> against -lintl.
> 
> In dynamic link, this is solved via the DT_NEEDED ELF tag, but for
> static links, it does not get pulled in automatically.
> 
> fix that by adding a Libs.private section to uid.pc, but only if
> it needed.
> 
> First part at fixing:
>     http://autobuild.buildroot.net/results/c46/c467aeec258909bb82eda77123803944f97d8df8/
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
> ---
>  package/util-linux/util-linux.mk | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
> index 6ecd16d..dc10193 100644
> --- a/package/util-linux/util-linux.mk
> +++ b/package/util-linux/util-linux.mk
> @@ -128,6 +128,14 @@ endif
>  
>  UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_GETTY_SYMLINK
>  
> +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE)$(BR2_PACKAGE_UTIL_LINUX_LIBUUID),yy)
> +define UTIL_LINUX_TWEAK_UUID_PC
> +	$(SED) '/Libs\.private: .*/d' $(STAGING_DIR)/usr/lib/pkgconfig/uuid.pc
> +	printf "Libs.private: -lintl\n" >>$(STAGING_DIR)/usr/lib/pkgconfig/uuid.pc
> +endef
> +UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_TWEAK_UUID_PC
> +endif

We've been discussing this on IRC, that we should come up with a patch
that could be upstreamable. Unfortunately, I have no idea on how to do
that...

It all boils down to util-linux not using the standard expansion
mechanism of autoconf (i.e. to replace @VARIABLE@ in .in files with the
value detected by ./configure).

Also, the way they are checking for gettext is way beyond my
understanding (well, I think I grasped most of it), and they have no
variable that expressly states whether -lintl is needed, just a LIBINTL
variable that contains whatever must be used to link with the
gettext-providing library.

The amount of work to fix that is way above the time left before our
release, so I believe we should go with that patch for now, and revisit
it later when we have some more time.

Opinions?

>  $(eval $(autotools-package))
>  $(eval $(host-autotools-package))
>  
> -- 
> 1.9.1
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'


More information about the buildroot mailing list