From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 614E4683E for ; Thu, 1 Nov 2018 16:12:46 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id EF238221F3; Thu, 1 Nov 2018 11:12:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 01 Nov 2018 11:12:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=qsmTcuoivK4SRX4s/vmtESyHNuj7+0gDxeI1fiFCVEM=; b=AKbtyU/xE7cK ahNPLWiSEpfcmPfgd5j0FcbxaHKcXjz9ZJflCS/y4kJqYh69oAzmPt6R27wiMHmc cB4CSsroOvHTQl/VKNAld2pmbzuEoJRkwfg1D1H6O3QSL11WPtA/pAmC0sagzWeD Pscp/FnatmjH74COIDdbD3aDCnpp8Lg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=qsmTcuoivK4SRX4s/vmtESyHNuj7+0gDxeI1fiFCV EM=; b=u3K6TsmonPaCg2/lrXrz7bXvJD5zfWrb0jPLDqmKZSUMuS5IMIpeCYlDz 6EUL/hlWGdGvor2LvG3RVDdakicBdnzud7fL4LRW6A+7e/aDHkLDO+E+aEL9RXpy jN/l0v2TjhEz//9ym/A0xaxuk3sgPUVAJFD8Y7x5Lo6ealKMEgKocd+u6Klf5xyI afkaEuL+0EGEH9OAWiRhVwPbicqFQ0NssDfxb6/vrO79EQNkwR3lFLfttrcW/TYN ZKlffmHiSG8rP8ZKVRWBci8+hJA2/vJQ7LNZWCpFiw18b5+V6D0TLf4+nBvz8KgA w8YtIFfy48dri/5xQi4thYkXo9Q/g== X-ME-Sender: X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id E345EE4119; Thu, 1 Nov 2018 11:12:44 -0400 (EDT) From: Thomas Monjalon To: "Richardson, Bruce" , "Hunt, David" Cc: "dev@dpdk.org" Date: Thu, 01 Nov 2018 16:12:40 +0100 Message-ID: <4234620.AJbZpTrg7I@xps> In-Reply-To: <59AF69C657FD0841A61C55336867B5B0726D5171@IRSMSX103.ger.corp.intel.com> References: <8756945.B50ulyzTOh@xps> <6068126.IEL2K3QhUc@xps> <59AF69C657FD0841A61C55336867B5B0726D5171@IRSMSX103.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] JSON compilation in examples/vm_power_manager X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Nov 2018 15:12:46 -0000 01/11/2018 15:59, Richardson, Bruce: > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > > Sent: Thursday, November 1, 2018 2:40 PM > > To: Hunt, David > > Cc: dev@dpdk.org > > Subject: Re: [dpdk-dev] JSON compilation in examples/vm_power_manager > > > > 01/11/2018 15:26, Hunt, David: > > > Hi Thomas, > > > > > > > > > On 1/11/2018 10:47 AM, Thomas Monjalon wrote: > > > > Hi Dave, > > > > > > > > In examples/vm_power_manager/Makefile, jansson lib availability is > > > > detected with pkg-config --exists. > > > > As we have seen for telemetry lib, we can detect jansson for the > > > > wrong arch and enable it no matter the arch being compiled. > > > > > > > > The solution was to disable it in Makefile and use meson for > > > > reliable dependency detection. > > > > > > > > Would you like to do the same for this app? > > > > > > > > > > > > > > I would prefer that if the user is cross compiling or selecting a > > > different target, that they set up their environment variables > > > correctly for compilation. In this case, the user should set > > > PKG_CONFIG_LIBDIR to point to the relevant library folder, e.g. for an > > > i386 build: > > > > > > export PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig > > > > > > That way the Makefile will pick up the correct library if it's > > > present, and build without the library if it is not present. > > > > > > Also, if DPDK is being built natively on a machine, the makefile > > > should be fine as it is. > > > > > > So, how about I create a patch to add a few lines to the docs around > > > compilation describing how to set up PKG_CONFIG_LIBDIR correctly for > > > the vm_power_manager sample app? > > > > I think it was the solution I thought about for telemetry. > > But in the case of multilib installation (x86_64/i686), we do not have > > such separate directory. > > Actually, we do. First two outputs from "find /usr -name pkgconfig -type d" > > /usr/lib/pkgconfig > /usr/lib64/pkgconfig > > 32-bit pkgconfig files go in the former, 64-bit in the latter. Unfortunately there > doesn't appear to be a flag to tell pkgconfig which set of libs you are looking > for, you have to set the libdir appropriately. > > > I think the only reliable solution is to test compilation as autotools or > > meson do. > > > Even then, with meson, when doing a multi-lib compile, you need to set the > appropriate PKG_CONFIG_LIBDIR value when you pass in -m32 with your CFLAGS. > [When doing a multi-lib compile using a cross-file, things are different, > and it's not necessary] OK, let's document it then. Thanks