From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id ADFF11B1EC for ; Thu, 1 Nov 2018 15:59:55 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Nov 2018 07:59:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,452,1534834800"; d="scan'208";a="88713629" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by orsmga008.jf.intel.com with ESMTP; 01 Nov 2018 07:59:52 -0700 Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by IRSMSX101.ger.corp.intel.com (163.33.3.153) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 1 Nov 2018 14:59:51 +0000 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.253]) by irsmsx155.ger.corp.intel.com ([169.254.14.44]) with mapi id 14.03.0415.000; Thu, 1 Nov 2018 14:59:51 +0000 From: "Richardson, Bruce" To: Thomas Monjalon , "Hunt, David" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] JSON compilation in examples/vm_power_manager Thread-Index: AQHUcdBRGbTNOxrq+0ymAWQPOtKNwKU6+h8AgAADsoCAAAQ8cA== Date: Thu, 1 Nov 2018 14:59:50 +0000 Message-ID: <59AF69C657FD0841A61C55336867B5B0726D5171@IRSMSX103.ger.corp.intel.com> References: <8756945.B50ulyzTOh@xps> <6068126.IEL2K3QhUc@xps> In-Reply-To: <6068126.IEL2K3QhUc@xps> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzYxNWJjNzYtY2M4My00NzhiLTgwNTEtMzNjNzBlNWJiNjk2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicm1FZjBrNmdaNzcyTHBVR09pODd5eXYzb0lSQ0xvM2dzNTk0RFZna0hRT1dlRHBTc0pPbTNhbzBlXC90YUFxdjIifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 14:59:56 -0000 > -----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 >=20 > 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=3D/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? >=20 > 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. Unfortunatel= y there doesn't appear to be a flag to tell pkgconfig which set of libs you are loo= king for, you have to set the libdir appropriately. > I think the only reliable solution is to test compilation as autotools or > meson do. >=20 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] /Bruce