From patchwork Sun Aug 7 09:19:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 656450 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 3s6Zk35sxPz9sCY for ; Sun, 7 Aug 2016 19:19:23 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 5BEBC30BB7; Sun, 7 Aug 2016 09:19:21 +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 pXaO5YaWs+Nu; Sun, 7 Aug 2016 09:19:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 9F8F9309A4; Sun, 7 Aug 2016 09:19:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id DAC171C0B72 for ; Sun, 7 Aug 2016 09:19:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D48BD86B6C for ; Sun, 7 Aug 2016 09:19:15 +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 jnJPYjeNaYpy for ; Sun, 7 Aug 2016 09:19:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (down.free-electrons.com [37.187.137.238]) by whitealder.osuosl.org (Postfix) with ESMTP id 1358A8654D for ; Sun, 7 Aug 2016 09:19:15 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 056233AF; Sun, 7 Aug 2016 11:19:13 +0200 (CEST) Received: from localhost (132.230.147.77.rev.sfr.net [77.147.230.132]) by mail.free-electrons.com (Postfix) with ESMTPSA id 97FCA2E1; Sun, 7 Aug 2016 11:19:13 +0200 (CEST) From: Thomas Petazzoni To: buildroot@buildroot.org Date: Sun, 7 Aug 2016 11:19:11 +0200 Message-Id: <1470561551-22910-1-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.7.4 Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH] procps-ng: fix BR2_STATIC_LIBS=y build 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 procps-ng package currently fails to build on BR2_STATIC_LIBS=y configurations. Indeed, by default NUMA support is enabled, and it requires dlopen(). As hinted by the configure script, passing --disable-numa allows to disable NUMA support. However, once this is done, another issue pops up: dlopen() is also used by the SELinux support. But even when SELinux support is disabled, the procps-ng code incorrectly includes . This is addressed by the addition of a patch. Fixes: http://autobuild.buildroot.net/results/b385bf435085728aece6323a5006ba9fa6631744/ Signed-off-by: Thomas Petazzoni --- ...put.c-include-dlfcn.h-only-when-necessary.patch | 32 ++++++++++++++++++++++ package/procps-ng/procps-ng.mk | 6 ++++ 2 files changed, 38 insertions(+) create mode 100644 package/procps-ng/0003-ps-output.c-include-dlfcn.h-only-when-necessary.patch diff --git a/package/procps-ng/0003-ps-output.c-include-dlfcn.h-only-when-necessary.patch b/package/procps-ng/0003-ps-output.c-include-dlfcn.h-only-when-necessary.patch new file mode 100644 index 0000000..dca28fa --- /dev/null +++ b/package/procps-ng/0003-ps-output.c-include-dlfcn.h-only-when-necessary.patch @@ -0,0 +1,32 @@ +From 4fc9a348026a945aec8eddffc7613de9cb10b10c Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 7 Aug 2016 11:08:26 +0200 +Subject: [PATCH] ps/output.c: include only when necessary + +dlopen() functionality is only used when SELinux support is enabled, so + only needs to be included when ENABLE_LIBSELINUX is +defined. This fixes the build in configurations where is not +available. + +Signed-off-by: Thomas Petazzoni +--- + ps/output.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/ps/output.c b/ps/output.c +index 42c04cf..f540832 100644 +--- a/ps/output.c ++++ b/ps/output.c +@@ -46,7 +46,9 @@ + */ + + #include ++#if ENABLE_LIBSELINUX + #include ++#endif + #include + #include + #include +-- +2.7.4 + diff --git a/package/procps-ng/procps-ng.mk b/package/procps-ng/procps-ng.mk index 51a70a5..ce0f68a 100644 --- a/package/procps-ng/procps-ng.mk +++ b/package/procps-ng/procps-ng.mk @@ -47,4 +47,10 @@ PROCPS_NG_CONF_OPTS += \ --enable-watch8bit endif +# numa support requires libdl, so explicitly disable it when +# BR2_STATIC_LIBS=y +ifeq ($(BR2_STATIC_LIBS),y) +PROCPS_NG_CONF_OPTS += --disable-numa +endif + $(eval $(autotools-package))