From patchwork Thu Aug 25 17:01:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Bedarkar X-Patchwork-Id: 662876 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]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sKr7X4qJ5z9sCg for ; Fri, 26 Aug 2016 03:01:59 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E210E8C653; Thu, 25 Aug 2016 17:01:57 +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 WsjyO0ZOEQIq; Thu, 25 Aug 2016 17:01:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 9C97D8C617; Thu, 25 Aug 2016 17:01:56 +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 9AF3E1C2BFE for ; Thu, 25 Aug 2016 17:01:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 979998C617 for ; Thu, 25 Aug 2016 17:01:55 +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 k800+Ga6Nqwi for ; Thu, 25 Aug 2016 17:01:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailapp01.imgtec.com (mailapp01.imgtec.com [195.59.15.196]) by whitealder.osuosl.org (Postfix) with ESMTP id 72ACB8C614 for ; Thu, 25 Aug 2016 17:01:54 +0000 (UTC) Received: from hhmail02.hh.imgtec.org (unknown [10.100.10.20]) by Forcepoint Email with ESMTPS id 5806D33A1C82F for ; Thu, 25 Aug 2016 18:01:38 +0100 (IST) Received: from PUMAIL01.pu.imgtec.org (192.168.91.250) by hhmail02.hh.imgtec.org (10.100.10.20) with Microsoft SMTP Server (TLS) id 14.3.294.0; Thu, 25 Aug 2016 18:01:41 +0100 Received: from pudesk287-linux.pu.imgtec.org (192.168.91.23) by PUMAIL01.pu.imgtec.org (192.168.91.250) with Microsoft SMTP Server (TLS) id 14.3.266.1; Thu, 25 Aug 2016 22:31:39 +0530 From: Rahul Bedarkar To: Date: Thu, 25 Aug 2016 22:31:06 +0530 Message-ID: <1472144466-17003-1-git-send-email-rahul.bedarkar@imgtec.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 X-Originating-IP: [192.168.91.23] Cc: Rahul Bedarkar Subject: [Buildroot] [PATCH 1/1] domoticz: fix build with uClibc 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" domoticz.cpp currently assumes that on GNU/Linux systems header is available. But that is not true. Since it provided by C library and uClibc can be built without backtrace support. And in such cases we get following build error. domoticz-3.4834/main/domoticz.cpp:48:22: fatal error: execinfo.h: No such file or directory #include ^ compilation terminated. This commit adds patch for detecting presence of and guards code accordingly. Fixes: http://autobuild.buildroot.net/results/393/393f839e160b51ca12ac36058718ad2f0c1b50a6/ Signed-off-by: Rahul Bedarkar Reviewed-by: Samuel Martin --- ...per-check-for-detecting-header-execinfo.h.patch | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 package/domoticz/0001-add-proper-check-for-detecting-header-execinfo.h.patch diff --git a/package/domoticz/0001-add-proper-check-for-detecting-header-execinfo.h.patch b/package/domoticz/0001-add-proper-check-for-detecting-header-execinfo.h.patch new file mode 100644 index 0000000..2e07abe --- /dev/null +++ b/package/domoticz/0001-add-proper-check-for-detecting-header-execinfo.h.patch @@ -0,0 +1,61 @@ +From 5409696dfcbb05d6e4e67e74c97487b1987639e1 Mon Sep 17 00:00:00 2001 +From: Rahul Bedarkar +Date: Thu, 25 Aug 2016 17:23:38 +0530 +Subject: [PATCH 1/1] add proper check for detecting header + +domoticz.cpp currently assumes that on GNU/Linux systems header + is available. But that is not true. Since it provided by +C library and uClibc can be built without backtrace support. And in +such cases we get following build error. + + domoticz-3.4834/main/domoticz.cpp:48:22: fatal error: execinfo.h: No such file or directory + #include + ^ + compilation terminated. + +Instead of depending on __gnu_linux__, add check for detecting +presence of and guard code for dumpstack accordingly. + +This build failure is detected by Buildroot autobuilder. +http://autobuild.buildroot.net/results/393/393f839e160b51ca12ac36058718ad2f0c1b50a6/ + +Signed-off-by: Rahul Bedarkar +--- + CMakeLists.txt | 7 +++++++ + main/domoticz.cpp | 2 +- + 2 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d3113f4..ef32f7b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -61,6 +61,13 @@ SET(EXECUTABLE_OUTPUT_PATH "" CACHE INTERNAL + "Where to put the executables for Domoticz" + ) + ++INCLUDE(CheckIncludeFiles) ++CHECK_INCLUDE_FILES (execinfo.h HAVE_EXECINFO_H) ++ ++IF(HAVE_EXECINFO_H) ++ ADD_DEFINITIONS(-DHAVE_EXECINFO_H) ++ENDIF(HAVE_EXECINFO_H) ++ + #set(CMAKE_EXE_LINKER_FLAGS "-static") + + # Macro for setting up precompiled headers. Usage: +diff --git a/main/domoticz.cpp b/main/domoticz.cpp +index 69d2ef6..c52e5ac 100644 +--- a/main/domoticz.cpp ++++ b/main/domoticz.cpp +@@ -44,7 +44,7 @@ + #include + #endif + +-#ifdef __gnu_linux__ ++#ifdef HAVE_EXECINFO_H + #include + static void dumpstack(void) { + // Notes : +-- +2.6.2 +