From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH] kni: fix use of undefined comma variable in makefile Date: Mon, 30 May 2016 17:46:41 +0100 Message-ID: <574C6E71.3090601@intel.com> References: <1464609406-23152-1-git-send-email-olivier.matz@6wind.com> <574C6123.5090005@intel.com> <574C68A1.2090408@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: thomas.monjalon@6wind.com, helin.zhang@intel.com To: Olivier Matz , dev@dpdk.org Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 97B9A2C33 for ; Mon, 30 May 2016 18:46:44 +0200 (CEST) In-Reply-To: <574C68A1.2090408@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 5/30/2016 5:21 PM, Olivier Matz wrote: > Hi Ferruh, >=20 > On 05/30/2016 05:49 PM, Ferruh Yigit wrote: >> On 5/30/2016 12:56 PM, Olivier Matz wrote: >>> The $(comma) variable is not defined in this Makefile, nor in >>> any included Makefile. Seen while doing a "make clean" on ubuntu: >>> >>> $ make clean >>> =3D=3D Clean lib >>> =3D=3D Clean lib/librte_compat >>> =3D=3D Clean lib/librte_eal >>> =3D=3D Clean lib/librte_eal/common >>> =3D=3D Clean lib/librte_eal/linuxapp >>> =3D=3D Clean lib/librte_eal/linuxapp/eal >>> =3D=3D Clean lib/librte_eal/linuxapp/igb_uio >>> =3D=3D Clean lib/librte_eal/linuxapp/kni >>> tr: missing operand after =E2=80=98.-=E2=80=99 >>> Two strings must be given when translating. >>> Try 'tr --help' for more information. >> >> I don't observe this error on Ubuntu. >> >> Also did a quick check and $(comma) seems defined, but not sure exactl= y >> where. What I test: >> >> $ lsb_release -si >> Ubuntu >> >> >> $ git diff >> diff --git a/lib/librte_eal/linuxapp/kni/Makefile >> b/lib/librte_eal/linuxapp/kni/Makefile >> index ac99d3f..dcad241 100644 >> --- a/lib/librte_eal/linuxapp/kni/Makefile >> +++ b/lib/librte_eal/linuxapp/kni/Makefile >> @@ -90,4 +90,7 @@ SRCS-y +=3D kni_net.c >> SRCS-y +=3D kni_ethtool.c >> SRCS-$(CONFIG_RTE_KNI_VHOST) +=3D kni_vhost.c >> >> +test_comma: >> + @echo "=3D comma: $(comma) =3D" >> + >> >> >> >> $ make -C lib/librte_eal/linuxapp/kni test_comma >> make: Entering directory '.../dpdk/lib/librte_eal/linuxapp/kni' >> =3D comma: , =3D >> make: Leaving directory '.../dpdk/lib/librte_eal/linuxapp/kni' >=20 > Thanks for testing and review. > I added the following lines to the makefile (just after the include > rte.vars.mk): >=20 > $(info ------------------) > $(info comma=3D$(comma)) > $(info $(origin comma)) >=20 > And it gives me: >=20 > $ make clean > =3D=3D Clean lib/librte_eal/linuxapp/kni > -------------------- > comma=3D, > file > make -C /lib/modules/3.13.0-79-generic/build > M=3D/home/user/dpdk.org/build/build/lib/librte_eal/linuxapp/kni > O=3D/lib/modules/3.13.0-79-generic/build clean > make -C /usr/src/linux-headers-3.13.0-79-generic \ > KBUILD_SRC=3D/usr/src/linux-headers-3.13.0-79-generic \ >=20 > KBUILD_EXTMOD=3D"/home/user/dpdk.org/build/build/lib/librte_eal/linuxap= p/kni" > -f /usr/src/linux-headers-3.13.0-79-generic/Makefile \ > clean > make -f /usr/src/linux-headers-3.13.0-79-generic/scripts/Makefile.clea= n > obj=3D/home/user/dpdk.org/build/build/lib/librte_eal/linuxapp/kni > -------------------- > comma=3D > undefined > tr: missing operand after =E2=80=98.-=E2=80=99 > Two strings must be given when translating. > Try 'tr --help' for more information. > [...] >=20 > Actually this Makefile is used twice, and second time the $(comma) > variable is not defined. >=20 > It seems the $(comma) variable is defined in rte.cpuflags.mk when > including rte.vars.mk: >=20 > mk/rte.vars.mk > mk/target/generic/rte.vars.mk > mk/rte.cpuflags.mk (only if KERNELRELEASE is unset, which is > not the case for the second call) >=20 >=20 > Do you see the issue when you do a "make clean"? >=20 No issue on "make clean". I did same modification as you did, for me comma defined for both times, a system variable can be triggering the behavior perhaps. What I got with "make clean" is: ... =3D=3D Clean lib/librte_eal/linuxapp/kni ------------ comma=3D, file make -C /lib/modules/4.4.0-22-generic/build M=3D/home/ferruhy/development/dpdk/build/build/lib/librte_eal/linuxapp/kn= i O=3D/lib/modules/4.4.0-22-generic/build clean make -C /usr/src/linux-headers-4.4.0-22-generic KBUILD_SRC=3D/usr/src/linux-headers-4.4.0-22-generic \ -f /usr/src/linux-headers-4.4.0-22-generic/Makefile clean make -f /usr/src/linux-headers-4.4.0-22-generic/scripts/Makefile.clean obj=3D/home/ferruhy/development/dpdk/build/build/lib/librte_eal/linuxapp/= kni ------------ comma=3D, file rm -rf /home/ferruhy/development/dpdk/build/build/lib/librte_eal/linuxapp/kni/.t= mp_versions rm -f /home/ferruhy/development/dpdk/build/build/lib/librte_eal/linuxapp/kni/Mo= dule.symvers =3D=3D Clean lib/librte_eal/linuxapp/xen_dom0 ...