From patchwork Fri Aug 19 09:09:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 660784 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sFxxq2rDWz9t0X for ; Fri, 19 Aug 2016 19:10:07 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=K8JB/JMO; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B16002DCBD; Fri, 19 Aug 2016 09:10:05 +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 jnzToXa6U4-g; Fri, 19 Aug 2016 09:10:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 6C5902E0A4; Fri, 19 Aug 2016 09:10:02 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 907D01C1309 for ; Fri, 19 Aug 2016 09:10:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8AFC08A97D for ; Fri, 19 Aug 2016 09:10:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TmYIQSMyqnlw for ; Fri, 19 Aug 2016 09:10:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by hemlock.osuosl.org (Postfix) with ESMTPS id 777BB8A907 for ; Fri, 19 Aug 2016 09:10:00 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id q128so2618811wma.1 for ; Fri, 19 Aug 2016 02:10:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=/1enXlwrb/B82sLAyZueXmB19hBjX+NtNXUT9dqElvE=; b=K8JB/JMOA62CzTMjx3fZUthLHMxCXb4DCf5vX44ti0YbjVE39QD9gp7JDDtxLfXse5 EZ1CFU0+7uJTR9gF11t9k3BUD2z53D2VTO4I6dBKT/KMnMrsf8JNN1QFhJap+1Tj0Kf3 EayVm9AYqeJiAvlUkYz73y10N2/QxIWJMe1D4OUm2Sjk/AJEW++clflLxSF142xmN7Ro EhQH3c0gmoYERzesRa7xhOO3KwgPiB2SmhT7nxlzidlZA/e9KsrSUhpBE1Z3+otWpNXM lvYpK3rTMpmZYaw9uuVeK33R353e13SWptZCoNW17CjyjdLtbgyzdFR/FnE75JPDkH8J dQag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=/1enXlwrb/B82sLAyZueXmB19hBjX+NtNXUT9dqElvE=; b=c771G8Ya+HD+edIv/HOaQeMVik9nXpW4xSlfGk0nRuTHi0Dp8AxMd4RF676BhJazdc ykj05jlxDbknbnTzaCjB7e7uXSHbkuOVFbTagYiJazMw25NF+bgbFP5X8TI9PxYYko28 EoarrGreNaM/gfh8nb2mVQE8DyihmIywKEGEamPpzSgvIZYYQ+LXHO5xAO7IxP/IRzCN ZwwsBz8HzOqjda408GGxkjcqNJ/eq6ml99LlRizcWGc66Iqa8TGrq7zKjhyqCMJO/TDU C3zG2vBypOPdVe9Bmm28s/hm4JHi2AYH0eME9Ip5lL2P93d+LT4CEstMgacn53J8jI1O /Azg== X-Gm-Message-State: AEkoousRQuG56y8nuuP6wGvmBqtmolb42qSvcou6H6qDDc+2sFNub4Uez+5ukct+UHvLfw== X-Received: by 10.194.140.35 with SMTP id rd3mr6301075wjb.88.1471597798909; Fri, 19 Aug 2016 02:09:58 -0700 (PDT) Received: from gourin.bzh.lan (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id pm1sm6101960wjb.40.2016.08.19.02.09.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Aug 2016 02:09:57 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Fri, 19 Aug 2016 11:09:53 +0200 Message-Id: <1471597793-14991-1-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 2.7.4 Cc: Joergen Pihlflyckt , "Yann E. MORIN" Subject: [Buildroot] [PATCHv2] linux: cpupower needs gettext 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: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The cpupower linux tool needs gettext, always (even without locales). We need to disable NLS, otherwise it tries to compile the .po files. We also need to pass -lintl, otherwise it forgets to link with it (because, the world is glibc-only, you did not know? And glibc does not need we link with -lintl, so why would we? Oh, yes, we also reinvented our super intelligent one-off Makefile rather than use one of the standard buildsystems). Fixes #9181: CC utils/helpers/sysfs.o In file included from utils/helpers/amd.c:9:0: ./utils/helpers/helpers.h:13:21: fatal error: libintl.h: No such file or directory #include ^ Without NLS=false (yes, we could depend on host-gettext): MSGFMT po/de.gmo make[3]: msgfmt: Command not found Without LDFLAGS=-lintl: CC cpupower ./utils/cpupower.o: In function `main': cpupower.c:(.text.startup+0x1a4): undefined reference to `libintl_textdomain' ./utils/idle_monitor/cpupower-monitor.o: In function `list_monitors': cpupower-monitor.c:(.text+0x5dc): undefined reference to `libintl_gettext' ./utils/cpupower-set.o: In function `cmd_set': cpupower-set.c:(.text+0x38): undefined reference to `libintl_textdomain' ./utils/cpupower-info.o: In function `cmd_info': cpupower-info.c:(.text+0x20): undefined reference to `libintl_textdomain' collect2: error: ld returned 1 exit status Reported-by: Joergen Pihlflyckt Signed-off-by: "Yann E. MORIN" Cc: Joergen Pihlflyckt --- Changes v1 -> v2: - don't link with -lintl when not needed --- linux/Config.tools.in | 6 ++++++ linux/linux-tool-cpupower.mk | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/linux/Config.tools.in b/linux/Config.tools.in index 09bcfab..5ada98d 100644 --- a/linux/Config.tools.in +++ b/linux/Config.tools.in @@ -3,11 +3,17 @@ menu "Linux Kernel Tools" config BR2_LINUX_KERNEL_TOOL_CPUPOWER bool "cpupower" depends on !BR2_bfin # pciutils + depends on BR2_USE_WCHAR || !BR2_NEEDS_GETTEXT # gettext select BR2_PACKAGE_PCIUTILS + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT help cpupower is a collection of tools to examine and tune power saving related features of your processor. +comment "cpupower needs a toolchain w/ wchar" + depends on !BR2_bfin + depends on !BR2_USE_WCHAR && BR2_NEEDS_GETTEXT + config BR2_LINUX_KERNEL_TOOL_PERF bool "perf" help diff --git a/linux/linux-tool-cpupower.mk b/linux/linux-tool-cpupower.mk index 4551cda..095a5ef 100644 --- a/linux/linux-tool-cpupower.mk +++ b/linux/linux-tool-cpupower.mk @@ -6,10 +6,12 @@ LINUX_TOOLS += cpupower -CPUPOWER_DEPENDENCIES = pciutils +CPUPOWER_DEPENDENCIES = pciutils $(if $(BR2_NEEDS_GETTEXT),gettext) CPUPOWER_MAKE_OPTS = CROSS=$(TARGET_CROSS) \ CPUFREQ_BENCH=false \ + NLS=false \ + $(if $(BR2_NEEDS_GETTEXT),LDFLAGS=-lintl) \ DEBUG=false define CPUPOWER_BUILD_CMDS