From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by dpdk.org (Postfix) with ESMTP id 842685690 for ; Thu, 5 Mar 2015 20:08:11 +0100 (CET) Received: by wiwl15 with SMTP id l15so5474258wiw.4 for ; Thu, 05 Mar 2015 11:08:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=d7qpyoCfdCDLnmpnMr4foOWQEi7DllpzkmYk//RrFiI=; b=Yu0KPqbb/jxAFnij2c0DlCSyd5w/ck8CbfkHhIYCbxG/pwYR6K7dmcOkZeTZglL+/4 LLPpWLsI5wyqvsz1XcR+tC9SMmCULJN9+JaQysO7XjLVqPKOEPY0N7KEaHUr9EaeAAvp ollVivmMw0Dvhal/nFz9ZpP/jKGhdtfLFMOkcFYyxGc2oQCHmji7FRljI8E07qNvHRj7 e5Bo4CfHFvsQU0Hh+YroqKkt04qNY7SyiAtKPUUzRahZOclmE7gOT6F9iM9vuaGhZRuC 3Ub5vcuBS/KlyqdGkbhygZriwu5LJMzfaGtBJnzxhCkc+ITxs9m3yraAw8fw/u/lE7/d Gkfg== X-Gm-Message-State: ALoCoQl6CdsBDkrPOa0XTEZ2iRfx/Qja38K+C/NOcymB3HeUXD+B803rbOFLIsOruMYA8ibtnabr X-Received: by 10.194.190.10 with SMTP id gm10mr21439071wjc.91.1425582491335; Thu, 05 Mar 2015 11:08:11 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id v16sm30961921wib.5.2015.03.05.11.08.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Mar 2015 11:08:10 -0800 (PST) From: Thomas Monjalon To: Tetsuya Mukawa Date: Thu, 05 Mar 2015 20:07:34 +0100 Message-ID: <1745635.kjoybLtASj@xps13> Organization: 6WIND User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: <54F800F2.2090104@igel.co.jp> References: <54F3DD5E.1070307@igel.co.jp> <20150304101510.GB1468@bricha3-MOBL3> <54F800F2.2090104@igel.co.jp> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Build failure on FreeBSD-10.1-RELEASE X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 19:08:11 -0000 2015-03-05 16:08, Tetsuya Mukawa: > On 2015/03/04 19:15, Bruce Richardson wrote: > > On Wed, Mar 04, 2015 at 10:33:14AM +0100, Olivier MATZ wrote: > >> Hi Tetsuya, Hi Bruce, > >> > >> On 03/04/2015 04:34 AM, Tetsuya Mukawa wrote: > >>> On 2015/03/02 19:22, Bruce Richardson wrote: > >>>> On Mon, Mar 02, 2015 at 12:47:42PM +0900, Tetsuya Mukawa wrote: > >>>>> Hi, > >>>>> > >>>>> I got a error while building master branch on FreeBSD. > >>>>> Here is a log. > >>>>> > >>>>> $ gmake T=3Dx86_64-native-bsdapp-clang config > >>>>> cc: error: unknown argument: '-fdirectives-only' > >>>>> cp: /usr/home/mukawa/work/dpdk/build/.config_tmp: No such file = or directory > >>>>> cp: /usr/home/mukawa/work/dpdk/build/.config_tmp: No such file = or directory > >>>>> gmake[3]: Nothing to be done for 'depdirs'. > >>>>> Configuration done > >>>>> > >>>>> > >>>>> Here is log came from 'uname' > >>>>> > >>>>> $ uname -a > >>>>> FreeBSD eris.hq.igel.co.jp 10.1-RELEASE FreeBSD 10.1-RELEASE #0= r274401: > >>>>> Tue Nov 11 21:02:49 UTC 2014 > >>>>> > >>>>> > >>>>> I've tried to remove '-fdirectives-only' from mk/rte.sdkconfig.= mk like > >>>>> below. > >>>>> With the fixing, It seems I can compile and run testpmd. > >>>>> (Obviously, we should not merge below patch, but I've done just= for testing) > >>>>> > >>>>> diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk > >>>>> index d43c430..f8d95b1 100644 > >>>>> --- a/mk/rte.sdkconfig.mk > >>>>> +++ b/mk/rte.sdkconfig.mk > >>>>> @@ -75,7 +75,7 @@ else > >>>>> $(RTE_OUTPUT)/.config: $(RTE_CONFIG_TEMPLATE) FORCE | $(RTE_OU= TPUT) > >>>>> $(Q)if [ "$(RTE_CONFIG_TEMPLATE)" !=3D "" -a -f > >>>>> "$(RTE_CONFIG_TEMPLATE)" ]; then \ > >>>>> $(CPP) -undef -P -x assembler-with-cpp \ > >>>>> - -fdirectives-only -ffreestanding \ > >>>>> + -ffreestanding \ > >>>>> -o $(RTE_OUTPUT)/.config_tmp $(RTE_CONFIG_TEMPL= ATE) ; \ > >>>>> if ! cmp -s $(RTE_OUTPUT)/.config_tmp > >>>>> $(RTE_OUTPUT)/.config; then \ > >>>>> cp $(RTE_OUTPUT)/.config_tmp > >>>>> $(RTE_OUTPUT)/.config ; \ > >>>>> > >>>>> > >>>>> Also, I've checked /usr/ports/net/dpdk, and found below line. > >>>>> (It seems above ports dpdk package is based on DPDK-1.8.) > >>>>> > >>>>> > >>>>> $(CPP) -undef -P -x assembler-with-cpp \ > >>>>> -ffreestanding \ > >>>>> -o $(RTE_OUTPUT)/.config_tmp $(RTE_CONFIG_TEMPLA= TE) ; \ > >>>>> > >>>>> So, I guess we should not add '-fdirectives-only' for flags of = $(CPP) > >>>>> for BSD system like dpdk package of ports. > >>>>> > >>>>> Thanks, > >>>>> Tetsuya > >>>>> > >>>> Yes, that is correct. In most cases I have tested, the extra fla= g only gives a > >>>> warning but it appears its now an error. We should conditionally= include or > >>>> omit the flag for BSD vs Linux, I think. > >>>> > >>>> /Bruce > >>> Hi Bruce, > >>> > >>> It seems we cannot use CONFIG_RTE_EXEC_ENV_LINUXAPP/BSDAPP defini= tion here. > >>> Now I am looking for other way to check target OS. > >>> Is it not so good to use $(T) definition value here? > >> Indeed, it seems that the -fdirectives-only option does not exist = in > >> freebsd. This is probably because the default cpp is not GNU cpp: > >> > >> On my version, I have: > >> FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610= > >> Target: x86_64-unknown-freebsd10.0 > >> Thread model: posix > >> > >> To decide whether using the option, we could check the return valu= e of > >> cpp -fdirectives-only /dev/null > /dev/null 2>/dev/null >=20 > It=E2=80=99s a great idea. >=20 > >> But I don't really think it's an issue to remove the option for al= l > >> OSes. In my opinion, expanding macros when parsing the config file= s > >> won't add any issue, and it's probably better to have no differenc= es > >> between FreeBSD and Linux. > >> > >> Regards, > >> Olivier > >> > > +1=20 > > I was just going to suggest that this morning! :-) >=20 > Thanks for suggestions. > I will send a patch that just removes '-fdirectives-only'. Fixed in http://dpdk.org/browse/dpdk/commit/?id=3D64702e5f6ff68bff Thanks