From patchwork Wed Aug 27 21:53:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 383576 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 7B0D6140129 for ; Thu, 28 Aug 2014 07:53:50 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B85243002C; Wed, 27 Aug 2014 21:53:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t-UGehLcise6; Wed, 27 Aug 2014 21:53:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 37749304D0; Wed, 27 Aug 2014 21:53:48 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id B18821C2A07 for ; Wed, 27 Aug 2014 21:53:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id AD2B53002C for ; Wed, 27 Aug 2014 21:53:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QdRCDm8oxNEv for ; Wed, 27 Aug 2014 21:53:41 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from smtp5-g21.free.fr (smtp5-g21.free.fr [212.27.42.5]) by silver.osuosl.org (Postfix) with ESMTPS id AA756304D0 for ; Wed, 27 Aug 2014 21:53:41 +0000 (UTC) Received: from localhost.localdomain (unknown [81.57.22.125]) by smtp5-g21.free.fr (Postfix) with ESMTP id D8726D4801A; Wed, 27 Aug 2014 23:53:38 +0200 (CEST) From: Romain Naour To: buildroot@buildroot.net Date: Wed, 27 Aug 2014 23:53:21 +0200 Message-Id: <1409176401-13970-1-git-send-email-romain.naour@openwide.fr> X-Mailer: git-send-email 1.9.3 Subject: [Buildroot] [PATCH v3 1/1] package/xscreensaver: fix linking with intl X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net 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. If "LIBS=-lintl" is removed from XSCREENSAVER_CONF_ENV, then the -lintl is missing during xscreensaver build if the toolchain needs gettext. xscreensaver.o: In function `main': undefined reference to `libintl_bindtextdomain' undefined reference to `libintl_textdomain' Backport a patch applied in 5.28 that fix linking issue with intl and remove "LIBS=-lintl" from XSCREENSAVER_CONF_ENV. Note: gettext package is always selected with xscreensaver when BR2_NEEDS_GETTEXT is set due to dependencies on libgtk2 and libglib2. Fixes: http://autobuild.buildroot.net/results/39b/39b6ad07ad59d87afeca6e427c69f580bed35700/build-end.log Signed-off-by: Romain Naour --- v3: Check if xscreensaver needs gettext if BR2_NEEDS_GETTEXT or BR2_NEEDS_GETTEXT_IF_LOCALE (Thomas Petazzoni) Select gettext only if BR2_NEEDS_GETTEXT_IF_LOCALE is set Add a backported patch to fix the linking issue with intl Remove "LIBS=-lintl" from XSCREENSAVER_CONF_ENV 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 + ...nsaver-0003-driver-fix-linking-with-lintl.patch | 35 ++++++++++++++++++++++ package/xscreensaver/xscreensaver.mk | 2 -- 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 package/xscreensaver/xscreensaver-0003-driver-fix-linking-with-lintl.patch diff --git a/package/xscreensaver/Config.in b/package/xscreensaver/Config.in index e2534a6..6260040 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_IF_LOCALE 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-0003-driver-fix-linking-with-lintl.patch b/package/xscreensaver/xscreensaver-0003-driver-fix-linking-with-lintl.patch new file mode 100644 index 0000000..51551c6 --- /dev/null +++ b/package/xscreensaver/xscreensaver-0003-driver-fix-linking-with-lintl.patch @@ -0,0 +1,35 @@ +From 2336fa7901733a434c38637bf39f3e282e78e1c1 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Wed, 27 Aug 2014 22:44:21 +0200 +Subject: [PATCH 1/1] driver: fix linking with lintl + +The libintl is missing during xscreensaver build if +glib2 was build with gettext. + +xscreensaver.o: In function `main': +undefined reference to `libintl_bindtextdomain' +undefined reference to `libintl_textdomain' + +Backport a patch applied in 5.28 + +Signed-off-by: Romain Naour +--- + driver/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/driver/Makefile.in b/driver/Makefile.in +index af077ca..ce7055c 100644 +--- a/driver/Makefile.in ++++ b/driver/Makefile.in +@@ -776,7 +776,7 @@ XScreenSaver_Xm_ad.h: XScreenSaver-Xm.ad + # The executables linked in this directory. + # + xscreensaver: $(SAVER_OBJS) +- $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS) ++ $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS) $(INTL_LIBS) + + xscreensaver-command: $(CMD_OBJS) + $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS) +-- +1.9.3 + diff --git a/package/xscreensaver/xscreensaver.mk b/package/xscreensaver/xscreensaver.mk index 0e84d27..751a0c9 100644 --- a/package/xscreensaver/xscreensaver.mk +++ b/package/xscreensaver/xscreensaver.mk @@ -14,8 +14,6 @@ XSCREENSAVER_LICENSE_FILES = hacks/screenhack.h hacks/glx/chessmodels.h XSCREENSAVER_DEPENDENCIES = jpeg libglade libgtk2 xlib_libX11 xlib_libXt \ $(if $(BR2_PACKAGE_GETTEXT),gettext) -XSCREENSAVER_CONF_ENV = $(if $(BR2_PACKAGE_GETTEXT),LIBS=-lintl) - # otherwise we end up with host include/library dirs passed to the # compiler/linker XSCREENSAVER_CONF_OPT = \