From patchwork Mon Dec 28 17:12:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 561411 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id C3229140CC3 for ; Tue, 29 Dec 2015 11:51:54 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=QPRuanHr; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0C0F788317; Tue, 29 Dec 2015 00:51:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vUJFVASN83FZ; Tue, 29 Dec 2015 00:51:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 88D6588451; Tue, 29 Dec 2015 00:51:52 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id A5F4A1C129D for ; Tue, 29 Dec 2015 00:51:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9763E2F480 for ; Tue, 29 Dec 2015 00:51:51 +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 fWqmANJf8j1o for ; Tue, 29 Dec 2015 00:51:48 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by silver.osuosl.org (Postfix) with ESMTPS id 27DF0AFF8D for ; Mon, 28 Dec 2015 17:12:49 +0000 (UTC) Received: by mail-wm0-f48.google.com with SMTP id f206so13924349wmf.0 for ; Mon, 28 Dec 2015 09:12:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=bJDvASKuyKncbhX/Aw9cqu22nYrGsh+pN0f/gcdM6SE=; b=QPRuanHrxB8Fr3NWKnHrwIRP5Te6KDkAI4vm1yQeb0KqTX76BQuzBHQmskBxOZqOLJ h/nAVzxue5FnHErWlUC8cX1lZWwELUmEPLekE07l565DOCfTSMbqvumIUhpoBWB0NCkJ eAXXSU0k1nhsiv8elc9sEGACB6fJOb3aj4mmSJcDJC7N5F6gDRTjDENo7I1q4zbZKEj8 lLj8xKfDvTTbXibZAdiMbhoK1gVqNToNpf2nnFD3o+Oq9S/EmyCNuCA6YKSEiyeGDm5P doDTBCXwXPhrCoZ4mLG2w8WZZoqL+FIFd9ZBu+EOyFjtET3n5p5PKatZejfCB4hQlKd0 z1cw== X-Received: by 10.28.170.139 with SMTP id t133mr14159767wme.50.1451322767764; Mon, 28 Dec 2015 09:12:47 -0800 (PST) Received: from bobook.localdomain (ANantes-655-1-104-36.w90-59.abo.wanadoo.fr. [90.59.39.36]) by smtp.gmail.com with ESMTPSA id c26sm29206707wmi.21.2015.12.28.09.12.46 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Dec 2015 09:12:46 -0800 (PST) From: Samuel Martin To: buildroot@buildroot.org Date: Mon, 28 Dec 2015 18:12:26 +0100 Message-Id: <1451322746-3828-1-git-send-email-s.martin49@gmail.com> X-Mailer: git-send-email 2.6.4 MIME-Version: 1.0 Cc: =?UTF-8?q?No=C3=A9=20Rubinstein?= Subject: [Buildroot] [PATCH] package/tpm-tools: fix build with locale support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" tpm-tools needs to link with libintl when locale support is enabled. However, tpm-tools' build-system internally builds a couple of static libraries used to build the final programs. When linking these libraries or the final programs, we need to explicitly tell the linker to link with libintl in order to resolve all the missing symbols. Fixes: http://autobuild.buildroot.org/results/560/56020558ec298ac4007bf7f6ce030b3f2fa1157d/ http://autobuild.buildroot.org/results/17f/17fc6ca79765fd9ecdacec4f5a2b58caa554d48d/ http://autobuild.buildroot.org/results/2d2/2d2c655429df62da2b8746a564fc064609e96001/ http://autobuild.buildroot.org/results/d52/d5259b83e7a269bca019d024366aa201f5a174fd/ http://autobuild.buildroot.org/results/11c/11cb0d1e51459e75e5f376cb07ce0188f8f050c4/ http://autobuild.buildroot.org/results/bad/bad9a97b4fff00732f2efb043bbb76a99963c491/ http://autobuild.buildroot.org/results/2f8/2f8bd534e6fcd9d356fe9087cb1394b9b2c4192c/ and many others... Signed-off-by: Samuel Martin Cc: NoƩ Rubinstein --- ...e.am-make-sure-libintl-LDFLAGS-are-added-.patch | 33 ++++++++++++++++++++++ package/tpm-tools/Config.in | 1 + package/tpm-tools/tpm-tools.mk | 5 +++- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 package/tpm-tools/0002-lib-Makefile.am-make-sure-libintl-LDFLAGS-are-added-.patch diff --git a/package/tpm-tools/0002-lib-Makefile.am-make-sure-libintl-LDFLAGS-are-added-.patch b/package/tpm-tools/0002-lib-Makefile.am-make-sure-libintl-LDFLAGS-are-added-.patch new file mode 100644 index 0000000..544b338 --- /dev/null +++ b/package/tpm-tools/0002-lib-Makefile.am-make-sure-libintl-LDFLAGS-are-added-.patch @@ -0,0 +1,33 @@ +From 5a2fb77973b54aaefa192146561e06d5020d4fa0 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Mon, 28 Dec 2015 11:04:11 +0100 +Subject: [PATCH] lib/Makefile.am: make sure libintl LDFLAGS are added when + building the internal static library + +The build-system internally builds a couple of static libraries used to build +the final programs. + +When linking these libraries and the final programs, we need to explicitly tell +the linker to link with libintl in order to resolve all the missing symbols. + +Signed-off-by: Samuel Martin +--- + lib/Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/lib/Makefile.am b/lib/Makefile.am +index cef6a2f..3c65e15 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -28,6 +28,8 @@ lib_LTLIBRARIES = libtpm_unseal.la + noinst_LTLIBRARIES = libtpm_tspi.la \ + libtpm_utils.la + ++LIBS += $(INTLLIBS) ++ + # + # Common build flags (with gettext support) + AM_CPPFLAGS = -I$(top_srcdir)/include -D_LINUX -DLOCALEDIR=\"$(localedir)\" +-- +2.6.4 + diff --git a/package/tpm-tools/Config.in b/package/tpm-tools/Config.in index d54be3e..dd59aaa 100644 --- a/package/tpm-tools/Config.in +++ b/package/tpm-tools/Config.in @@ -2,6 +2,7 @@ config BR2_PACKAGE_TPM_TOOLS bool "tpm-tools" select BR2_PACKAGE_TROUSERS select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE depends on BR2_TOOLCHAIN_HAS_THREADS # trousers depends on !BR2_STATIC_LIBS # trousers help diff --git a/package/tpm-tools/tpm-tools.mk b/package/tpm-tools/tpm-tools.mk index 20df489..9dd844d 100644 --- a/package/tpm-tools/tpm-tools.mk +++ b/package/tpm-tools/tpm-tools.mk @@ -10,7 +10,10 @@ TPM_TOOLS_SITE = http://downloads.sourceforge.net/project/trousers/tpm-tools/$(T TPM_TOOLS_STRIP_COMPONENTS = 2 TPM_TOOLS_LICENSE = Common Public License Version 1.0 TPM_TOOLS_LICENSE_FILES = LICENSE -TPM_TOOLS_DEPENDENCIES = trousers openssl +TPM_TOOLS_DEPENDENCIES = trousers openssl \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) +# lib/Makefile.am is patched +TPM_TOOLS_AUTORECONF = YES TPM_TOOLS_CONF_OPTS = --disable-pkcs11-support