From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH] buildtools: fix build for some mktemp Date: Sat, 27 Oct 2018 00:28:00 +0100 Message-ID: <814757cf-e78a-196a-a561-92bbd2270aad@intel.com> References: <20181026184248.78908-1-ferruh.yigit@intel.com> <1826680.rqYCJSl033@xps> <1732780.omknZ3gl4j@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Thomas Monjalon Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id B121D10A3 for ; Sat, 27 Oct 2018 01:28:03 +0200 (CEST) In-Reply-To: <1732780.omknZ3gl4j@xps> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 10/26/2018 8:59 PM, Thomas Monjalon wrote: > 26/10/2018 20:31, Ferruh Yigit: >> On 10/26/2018 6:59 PM, Thomas Monjalon wrote: >>> 26/10/2018 20:42, Ferruh Yigit: >>>> build error: >>>> == Build drivers/net/tap >>>> mktemp: cannot create temp file /tmp/dpdk.auto-config-h.sh.XXX.c: >>>> Invalid argument >>>> .../buildtools/auto-config-h.sh: line 86: : No such file or directory >>>> .../drivers/net/tap/Makefile:55: recipe for target >>>> 'tap_autoconf.h.new' failed >>>> >>>> Above error observed on Wind River Linux 8.0 >>>> >>>> `mktemp` command in that system has a restrictions to have X in >>>> the template at the end and at least six of them. >>> >>> So let's comply with this requirement. >> >> We can't directly, because that temp file needs to be a .c file. > > The .c extension is mandatory? This file is compiled, it is doesn't need to have .c with proper compiler flag. > >> What can be done is create a temp file via mktemp and append .c later: >> _temp=$(mktemp -t dpdk.${0##*/}.XXXXXX) >> temp=${_temp}.c >> >> Do we need this? > > Yes I think it's better. This will create two temp files, one is empty, I will try above option. > >>>> Switched back to static assignment for `temp` in buildtools, >>>> but kept `dpdk.` prefix to preserve the common prefix intention. >>> >>> It is a regression. >>> mktemp allows to choose the temporary directory thanks to TMPDIR >>> environment variable. > > >