From patchwork Fri Dec 12 22:51:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 420709 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id B000F1400DE for ; Sat, 13 Dec 2014 09:51:49 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id BD504A30D5; Fri, 12 Dec 2014 22:51:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MKoys2ZK_p2P; Fri, 12 Dec 2014 22:51:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id B9DDBA30C4; Fri, 12 Dec 2014 22:51:45 +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 1BA531C2211 for ; Fri, 12 Dec 2014 22:51:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0BD463390D for ; Fri, 12 Dec 2014 22:51:44 +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 ISwBpW92qVuD for ; Fri, 12 Dec 2014 22:51:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by silver.osuosl.org (Postfix) with ESMTPS id 34F3A33907 for ; Fri, 12 Dec 2014 22:51:42 +0000 (UTC) Received: by mail-wi0-f180.google.com with SMTP id n3so4023231wiv.7 for ; Fri, 12 Dec 2014 14:51:40 -0800 (PST) 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=s1PiyRpbcmpokbzq88ZhDwJoh+5ET9Y7V7mW9X2N2EI=; b=qMaSNs5DHXhQRF4lVnKidaJvUfeyli0szsegSYpIc+llT7AXEyn+aPxyiPsNgZ0IDZ e3XSVeAfIBaszfgknQKYVMnWNBajpWO3jsl2QPyjOLjOovobyHrOZCISf2OQiwFqhbHk Sqblde3U8CL3DOpomtOQW/zT6SQchOfKGWPaUY6Zm1fVlHP33+vJmw/LEU+S5Cu0HAwL amW66qlcH62zjYhUYmfnVcYf/bZbDCrbYXqZAB02aVwkrFcI6MwsEQeRIi+wKun06IBA MaoIeAN+sRheQIib4VlrXw0zzKDcYzcUMsl7QKHWCBQXYD1uMVxTeVxoDIZeZf4fb8pe txUQ== X-Received: by 10.180.211.34 with SMTP id mz2mr4076454wic.56.1418424700784; Fri, 12 Dec 2014 14:51:40 -0800 (PST) Received: from gourin.bzh.lan (ks3095497.kimsufi.com. [94.23.60.27]) by mx.google.com with ESMTPSA id ej10sm3728557wib.2.2014.12.12.14.51.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Dec 2014 14:51:39 -0800 (PST) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Fri, 12 Dec 2014 23:51:33 +0100 Message-Id: <1418424693-10108-1-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 1.9.1 Cc: "Yann E. MORIN" , Peter Korsgaard Subject: [Buildroot] [PATCH] package/collectd: fix build without libgcrypt 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" In case lthe libgcrypt development files are present on the host system, collectd's ./configure will mistakenly try to use them and will call the host system's libgcrypt-config, thus leading it to use path to the host system includes and libraries. Fix that in two ways: - explicitly disable libgcrypt support when libgcrypt is not enabled; - pass the complete path to libgcrypt-config when libgcrypt is enabled. However, collectd's configure.ac is uterly broken. The code in configure.ac has special code to check for libgcrypt-config, and use whatever is provided via --with-libgcrypt=/path/to/libgcrypt-config. But that is promptly forgotten because they then call the AM_PATH_LIBGCRYPT macro, that just does it all again from scratch, and does not use the value previously found. Instead, we set LIBGCRYPT_CONFIG in the environment and point it to our own libgcrypt-config. Should fix numerous build issues: http://autobuild.buildroot.net/results/ad4/ad408aef5fb92fe9e031c7dbaf6999776b40ace4/ http://autobuild.buildroot.net/results/967/96735bfa91bcf2e3dff89f69c0a12ed406e9efb9/ ... http://autobuild.buildroot.net/results/3bd/3bdd9bdffb1d55414787d38fc2656d7a3391a957/ ... (the first two are with the paranoid wrapper, the third one was before the paranoid wrapper.) Signed-off-by: "Yann E. MORIN" Cc: Romain Naour Cc: Peter Korsgaard --- To be noted: even though this fixes the afore-mentioned issues, there are potentially more failures lurking around the corner: checking for Python CPPFLAGS... /usr/include/python2.7 Fun times ahead... :-/ --- package/collectd/collectd.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/collectd/collectd.mk b/package/collectd/collectd.mk index 4647bd5..dce2b23 100644 --- a/package/collectd/collectd.mk +++ b/package/collectd/collectd.mk @@ -134,6 +134,9 @@ endif ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) COLLECTD_DEPENDENCIES += libgcrypt COLLECTD_CONF_OPTS += --with-libgcrypt=$(STAGING_DIR)/usr + COLLECTD_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config +else + COLLECTD_CONF_OPTS += --with-libgcrypt=no endif # released software should not break on minor warnings