package/libgpg-error: optionally depends on gettext
PATCH v2 1/2 package/libgpg-error: optionally depends on gettext
configure.ac has AM_GNU_GETTEXT(), which will enable i18n if a gettext library is found. For uClibc, it is found if the gettext package has been built, and it will add -lintl to the link flags. For musl and glibc, it is always found, in libc itself so nothing is added to the link flags.
---
Discovered while investigating
http://autobuild.buildroot.net/results/f81/f81eabb37788aa6dcdadf4034889c84bef78b876/
v2: use BR2_PACKAGE_GETTEXT condition instead of BR2_NEEDS_GETTEXT
--- package/libgpg-error/libgpg-error.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/libgpg-error/libgpg-error.mk +4 -0
@@ -11,6 +11,10 @@ LIBGPG_ERROR_LICENSE_FILES = COPYING COPYING.LIB LIBGPG_ERROR_INSTALL_STAGING = YES LIBGPG_ERROR_CONFIG_SCRIPTS = gpg-error-config +ifeq ($(BR2_PACKAGE_GETTEXT),y) +LIBGPG_ERROR_DEPENDENCIES += gettext +endif + define LIBGPG_ERROR_FIX_CROSS_COMPILATION cd $(@D)/src/syscfg && \ ln -s lock-obj-pub.$(call qstrip, $(BR2_PACKAGE_LIBGPG_ERROR_SYSCFG)).h \
Signature · 1 line
2.9.3
PATCH v2 2/2 package/iputils: link with -lintl
libgcrypt pulls in gpg-error which links with libintl if available. Since iputils doesn't use libtool, -lintl has to be passed explicitly for static builds.
Fixes:
http://autobuild.buildroot.net/results/f81/f81eabb37788aa6dcdadf4034889c84bef78b876
http://autobuild.buildroot.net/results/f29/f296e8fba1e79f96d3d119aa4c8207ed4b80694b
http://autobuild.buildroot.net/results/478/478a88cd892a119970cfca717ea7f5517bfc4cea
http://autobuild.buildroot.net/results/920/920d2d1d967691779f79fa54a38fac5adc5a8ee4
---
v2: add BR2_STATIC_LIBS to the condition (Baruch)
Only add -lintl when libgcrypt is selected.
I also tested without libgcrypt (thus without -lintl) and with libcap, nettle, openssl. No problem there.
--- package/iputils/iputils.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/iputils/iputils.mk +7 -0
@@ -36,6 +36,13 @@ endif ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) IPUTILS_MAKE_OPTS += USE_GCRYPT=yes IPUTILS_DEPENDENCIES += libgcrypt +# When gettext is enabled (BR2_PACKAGE_GETTEXT=y), and provides libintl +# (BR2_NEEDS_GETTEXT=y), libgpg-error will link with libintl, and libgpg-error +# is pulled in by libgcrypt. Since iputils doesn't use libtool, we have to link +# with libintl explicitly for static linking, +ifeq ($(BR2_STATIC_LIBS)$(BR2_NEEDS_GETTEXT)$(BR2_PACKAGE_GETTEXT),yyy) +IPUTILS_MAKE_OPTS += ADDLIB='-lintl' +endif else IPUTILS_MAKE_OPTS += USE_GCRYPT=no endif
Signature · 1 line
2.9.3
PATCH v2 1/2 package/libgpg-error: optionally depends on gettext
In reply to Arnout Vandecappelle (Essensium/Mind)Arnout,
Quoted 8 lines · Arnout Vandecappelle (Essensium/Mind)
configure.ac has
AM_GNU_GETTEXT(), which will enable i18n if a gettext library is found. For uClibc, it is found if the gettext package has been built, and it will add -lintl to the link flags. For musl and glibc, it is always found, in libc itself so nothing is added to the link flags.Cc Matthew Weber <[email protected]>
Using http://autobuild.buildroot.net/results/e59247f73ba4af4cd5d7ef285c4d359b4c930def,
tested the uclibc autobuilder failure case where a "make clean
iputils" would build but "make clean all" would not because of the gettext dependency not forcing gettext to build before libgpg-error in the successful case. These two cases now both build successfully.
Successfully tested (qemu_x86_64_defconfig) updated to be a glibc x86_64 target with iputils enabled. ie no gettext enabled.
Quoted 27 lines
---
Discovered while investigating
http://autobuild.buildroot.net/results/f81/f81eabb37788aa6dcdadf4034889c84bef78b876/v2: use
BR2_PACKAGE_GETTEXTcondition instead ofBR2_NEEDS_GETTEXT--- package/libgpg-error/libgpg-error.mk | 4 ++++ 1 file changed, 4 insertions(+)package/libgpg-error/libgpg-error.mk +4
-1@@ -11,6 +11,10 @@ LIBGPG_ERROR_LICENSE_FILES = COPYING COPYING.LIB LIBGPG_ERROR_INSTALL_STAGING = YES LIBGPG_ERROR_CONFIG_SCRIPTS = gpg-error-config +ifeq ($(BR2_PACKAGE_GETTEXT),y) +LIBGPG_ERROR_DEPENDENCIES += gettext +endif + define LIBGPG_ERROR_FIX_CROSS_COMPILATION cd $(@D)/src/syscfg && \ ln -s lock-obj-pub.$(call qstrip, $(BR2_PACKAGE_LIBGPG_ERROR_SYSCFG)).h \ --2.9.3
Signature · 2 lines
Thanks, Matt
PATCH v2 1/2 package/libgpg-error: optionally depends on gettext
In reply to Arnout Vandecappelle (Essensium/Mind)Hello,
Quoted 11 lines · Arnout Vandecappelle (Essensium/Mind)
configure.ac has
AM_GNU_GETTEXT(), which will enable i18n if a gettext library is found. For uClibc, it is found if the gettext package has been built, and it will add -lintl to the link flags. For musl and glibc, it is always found, in libc itself so nothing is added to the link flags.Cc Matthew Weber <[email protected]>---
Discovered while investigating
http://autobuild.buildroot.net/results/f81/f81eabb37788aa6dcdadf4034889c84bef78b876/
Both applied, thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com