Message ID | 54F3DD5E.1070307@igel.co.jp (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 5F5CD5A24; Mon, 2 Mar 2015 04:47:48 +0100 (CET) Received: from mail-pd0-f179.google.com (mail-pd0-f179.google.com [209.85.192.179]) by dpdk.org (Postfix) with ESMTP id 3C596106B for <dev@dpdk.org>; Mon, 2 Mar 2015 04:47:47 +0100 (CET) Received: by pdjy10 with SMTP id y10so36135467pdj.13 for <dev@dpdk.org>; Sun, 01 Mar 2015 19:47:46 -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:content-type:content-transfer-encoding; bh=i1nBqsbECEZ+IVaMfEdLtFEYKHlTsl7iVakHukYLGe0=; b=Ywkpuufy+1Cq42QpJVop0F+1tB/zlojIwQLIQYY9wIZDlOnHIbcaLusTLlWmnI2ual IttoBGpexIJENxvFD1T5I4kjOkfAIzghKd6WbcQA5B/nalOFFBLVXsu9/5OUfd2cckvI mKBVMBCLgmEpW22Y0Z4h0ebBrN+8RxGonfg5o8CXmaQ0ANRyGyPu/jPX5z87noAfHZ4c BD5ebCI9DtPC0vRqKgyEjgHgXLvZTuhHGJimjnLN3Lrt8NUk+z+uhLkhlufatjHZ9too RDLbacfeSgjjklqPZ/blpRJhHVnsd1n6IKEcPPxUZD6uG/4Kn4olV8pV4cY6YPSfhZYz yTaw== X-Gm-Message-State: ALoCoQmw2btoeduS5vVNhyRPdVSjRWktBZD4IPfLKLeQTFJFIYNfuH9qq4k/cqfb4kVTDusUZh5W X-Received: by 10.66.66.238 with SMTP id i14mr43602245pat.27.1425268066293; Sun, 01 Mar 2015 19:47:46 -0800 (PST) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id b5sm10300580pdj.88.2015.03.01.19.47.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Mar 2015 19:47:45 -0800 (PST) Message-ID: <54F3DD5E.1070307@igel.co.jp> Date: Mon, 02 Mar 2015 12:47:42 +0900 From: Tetsuya Mukawa <mukawa@igel.co.jp> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "dev@dpdk.org" <dev@dpdk.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [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 <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Tetsuya Mukawa
March 2, 2015, 3:47 a.m. UTC
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) $(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
Comments
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
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? Thanks, Tetsuya
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
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=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 > +1 I was just going to suggest that this morning! :-)
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=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 It’s a great idea. >> 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 >> > +1 > I was just going to suggest that this morning! :-) Thanks for suggestions. I will send a patch that just removes '-fdirectives-only'. Thanks, Tetsuya
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=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 > > It’s a great idea. > > >> 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 > >> > > +1 > > I was just going to suggest that this morning! :-) > > Thanks for suggestions. > I will send a patch that just removes '-fdirectives-only'. Fixed in http://dpdk.org/browse/dpdk/commit/?id=64702e5f6ff68bff Thanks
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