* [Buildroot] [PATCH v2 1/1] package/xscreensaver: fix linking with intl
@ 2014-08-25 23:13 Romain Naour
2014-08-26 7:23 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Romain Naour @ 2014-08-25 23:13 UTC (permalink / raw)
To: buildroot
xscreensaver doesn't build with (e)glibc toolchain when gettext package is selected.
With (e)glibc libintl is provided by the libc whereas with uClibc it's provided by gettext.
Linking with intl is only needed if the toolchain needs gettext.
Fixes:
http://autobuild.buildroot.net/results/39b/39b6ad07ad59d87afeca6e427c69f580bed35700/build-end.log
Signed-off-by: Romain Naour <romain.naour@openwide.fr>
---
V2:
Select gettext package only when the toolchain needs gettext (Thomas Petazzoni)
(ie: when BR2_NEEDS_GETTEXT is set)
Build tested with an glibc based toolchain and without gettext package selected.
Build tested with an uClibc based toolchain and with gettext package selected.
---
package/xscreensaver/Config.in | 1 +
package/xscreensaver/xscreensaver.mk | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/package/xscreensaver/Config.in b/package/xscreensaver/Config.in
index e2534a6..11c01ae 100644
--- a/package/xscreensaver/Config.in
+++ b/package/xscreensaver/Config.in
@@ -10,6 +10,7 @@ config BR2_PACKAGE_XSCREENSAVER
select BR2_PACKAGE_JPEG
select BR2_PACKAGE_XLIB_LIBX11
select BR2_PACKAGE_XLIB_LIBXT
+ select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
help
XScreenSaver is the standard screen saver collection shipped on most
Linux and Unix systems running the X11 Window System.
diff --git a/package/xscreensaver/xscreensaver.mk b/package/xscreensaver/xscreensaver.mk
index 0e84d27..dba15bf 100644
--- a/package/xscreensaver/xscreensaver.mk
+++ b/package/xscreensaver/xscreensaver.mk
@@ -12,9 +12,10 @@ XSCREENSAVER_LICENSE = MIT-like GPLv2+
XSCREENSAVER_LICENSE_FILES = hacks/screenhack.h hacks/glx/chessmodels.h
XSCREENSAVER_DEPENDENCIES = jpeg libglade libgtk2 xlib_libX11 xlib_libXt \
- $(if $(BR2_PACKAGE_GETTEXT),gettext)
+ $(if $(BR2_NEEDS_GETTEXT),gettext)
-XSCREENSAVER_CONF_ENV = $(if $(BR2_PACKAGE_GETTEXT),LIBS=-lintl)
+# Linking with intl is only needed when the toolchain needs gettext
+XSCREENSAVER_CONF_ENV = $(if $(BR2_NEEDS_GETTEXT),LIBS=-lintl)
# otherwise we end up with host include/library dirs passed to the
# compiler/linker
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2 1/1] package/xscreensaver: fix linking with intl
2014-08-25 23:13 Romain Naour
@ 2014-08-26 7:23 ` Thomas Petazzoni
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2014-08-26 7:23 UTC (permalink / raw)
To: buildroot
Dear Romain Naour,
On Tue, 26 Aug 2014 01:13:06 +0200, Romain Naour wrote:
> + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
Have you verified if it's really BR2_NEEDS_GETTEXT or
BR2_NEEDS_GETTEXT_IF_LOCALE that should be used?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2 1/1] package/xscreensaver: fix linking with intl
@ 2014-08-27 21:52 Romain Naour
0 siblings, 0 replies; 3+ messages in thread
From: Romain Naour @ 2014-08-27 21:52 UTC (permalink / raw)
To: buildroot
Hi Thomas,
Le 26/08/2014 09:23, Thomas Petazzoni a ?crit :
> Dear Romain Naour,
>
> On Tue, 26 Aug 2014 01:13:06 +0200, Romain Naour wrote:
>
>> + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
>
> Have you verified if it's really BR2_NEEDS_GETTEXT or
> BR2_NEEDS_GETTEXT_IF_LOCALE that should be used?
>
gettext package is always selected with xscreensaver when BR2_NEEDS_GETTEXT is
set due to dependencies on libgtk2 and libglib2.
This is libglib2 that select gettext package when BR2_NEEDS_GETTEXT is set.
But, It seems that xscreensaver can live without gettext by looking at
utils/xscreensaver-intl.h.
So, it's seems correct to select gettext package when
BR2_NEEDS_GETTEXT_IF_LOCALE is set but the build fail with the following link error:
xscreensaver.o: In function `main':
undefined reference to `libintl_bindtextdomain'
undefined reference to `libintl_textdomain'
That why I added BR2_NEEDS_GETTEXT...
Ok, I just found a patch that fix this issue in version 5.28.
Please see v3.
Thanks for your review !
Best regards
Romain
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-27 21:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-27 21:52 [Buildroot] [PATCH v2 1/1] package/xscreensaver: fix linking with intl Romain Naour
-- strict thread matches above, loose matches on Subject: below --
2014-08-25 23:13 Romain Naour
2014-08-26 7:23 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox