From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by dpdk.org (Postfix) with ESMTP id 90D6E5683 for ; Wed, 4 Mar 2015 10:33:14 +0100 (CET) Received: by widem10 with SMTP id em10so29154759wid.1 for ; Wed, 04 Mar 2015 01:33:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=1Il52JkftWE/GD8liIBwb2oPLd3/MsK9joUip0kSGJE=; b=S3P+hLRXN3bJB8VvyxNAfEOD8Kq5YmdzBVPIla9SizTNgnEkzEVoJm4DfdWAGNDIXz 0kRX/IgoRlfuXl0yAbPbjN0WajMeZxFskILEFJfLV2t2/F/DtFHD51hKiXLf3MvKO4lC mZ8jZyrYgXxKbElUFsbmXN88iPjevGWPQXZKWuTaycG5j8uidLDm15hKKima5YFD0TIm C/Ar3hYuQoxUgi5daCuTBQkeGdZ4aeKxRxcrNvxqh7Yn5WWRNojK5sZKzXywjRjHNIpT JpYVybOKFMWpOuN4CJIXLRkJzl1Iz9g6Ea2ycIt3tvV6FH4uZ85S1EiExJ8DEDb+RBGV lznw== X-Gm-Message-State: ALoCoQk0ff3jNPVwPaKy3YdYZgSwD1RUP8N/0bHVFEbT5GeLj2kvASH4VYxQfA+XzR2wDuL3MkoE X-Received: by 10.194.179.194 with SMTP id di2mr6224595wjc.4.1425461594085; Wed, 04 Mar 2015 01:33:14 -0800 (PST) Received: from [10.16.0.195] (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id kj8sm5089365wjc.29.2015.03.04.01.33.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Mar 2015 01:33:13 -0800 (PST) Message-ID: <54F6D15A.1010900@6wind.com> Date: Wed, 04 Mar 2015 10:33:14 +0100 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 MIME-Version: 1.0 To: Tetsuya Mukawa , Bruce Richardson References: <54F3DD5E.1070307@igel.co.jp> <20150302102225.GB8520@bricha3-MOBL3> <54F67D33.6010104@igel.co.jp> In-Reply-To: <54F67D33.6010104@igel.co.jp> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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: Wed, 04 Mar 2015 09:33:14 -0000 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=x86_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_OUTPUT) >>> $(Q)if [ "$(RTE_CONFIG_TEMPLATE)" != "" -a -f >>> "$(RTE_CONFIG_TEMPLATE)" ]; then \ >>> $(CPP) -undef -P -x assembler-with-cpp \ >>> - -fdirectives-only -ffreestanding \ >>> + -ffreestanding \ >>> -o $(RTE_OUTPUT)/.config_tmp $(RTE_CONFIG_TEMPLATE) ; \ >>> 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_TEMPLATE) ; \ >>> >>> 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 flag 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 definition 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 value of cpp -fdirectives-only /dev/null > /dev/null 2>/dev/null But I don't really think it's an issue to remove the option for all OSes. In my opinion, expanding macros when parsing the config files won't add any issue, and it's probably better to have no differences between FreeBSD and Linux. Regards, Olivier