From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id D11931B346 for ; Thu, 2 Nov 2017 01:25:14 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP; 01 Nov 2017 17:25:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,331,1505804400"; d="scan'208";a="1213073258" Received: from silpixa00372839.ir.intel.com (HELO silpixa00372839.ger.corp.intel.com) ([10.237.222.154]) by fmsmga001.fm.intel.com with ESMTP; 01 Nov 2017 17:25:12 -0700 From: Ferruh Yigit To: Thomas Monjalon Cc: dev@dpdk.org, Ferruh Yigit Date: Thu, 2 Nov 2017 00:25:10 +0000 Message-Id: <20171102002510.26917-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.13.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] buildtools: fix icc build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Nov 2017 00:25:15 -0000 There are random build errors in test reports [1]. Build error is not directly related to DPDK but observed during DPDK build. When I get similar unexpected build errors in my system, found out that /dev/null is invalid. It seems ICC overwrites the /dev/null with "icc -o /dev/null" instead of sending output to /dev/null. This is not always reproducible, so hard to say what exactly is triggering the error. I suspect test-report build errors can be because of the same reason, and it is good to add a protection for this case. Instead of sending output to /dev/null save it to the tmp folder and remove it back when done. [1] http://dpdk.org/ml/archives/test-report/2017-November/034053.html Failure #3 /usr/src/linux-headers-4.4.0-97-generic/include/linux/sysfs.h:517:37: error: pointer targets in passing argument 2 of ‘kernfs_find_and_get’ differ in signedness [-Werror=pointer-sign] return kernfs_find_and_get(parent, name); Signed-off-by: Ferruh Yigit --- buildtools/auto-config-h.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/buildtools/auto-config-h.sh b/buildtools/auto-config-h.sh index 4356d7e38..cb8bce9b8 100755 --- a/buildtools/auto-config-h.sh +++ b/buildtools/auto-config-h.sh @@ -114,9 +114,9 @@ printf "\ " "$include" "$code" > "${temp}" && if ${CC} ${CPPFLAGS} ${EXTRA_CPPFLAGS} ${CFLAGS} ${EXTRA_CFLAGS} \ ${AUTO_CONFIG_CFLAGS} \ - -c -o /dev/null "${temp}" 1>&${out} 2>&${err} + -c -o ${temp}.o "${temp}" 1>&${out} 2>&${err} then - rm -f "${temp}" + rm -f "${temp}" "${temp}.o" printf "\ #ifndef %s #define %s 1 @@ -125,7 +125,7 @@ then " "${macro}" "${macro}" "${macro}" >> "${file}" && printf 'Defining %s.\n' "${macro}" else - rm -f "${temp}" + rm -f "${temp}" "${temp}.o" printf "\ /* %s is not defined. */ -- 2.13.6