From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id AD289683E for ; Thu, 1 Nov 2018 15:26:31 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Nov 2018 07:26:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,452,1534834800"; d="scan'208";a="82644518" Received: from dhunt5-mobl2.ger.corp.intel.com (HELO [10.237.221.115]) ([10.237.221.115]) by fmsmga007.fm.intel.com with ESMTP; 01 Nov 2018 07:26:29 -0700 To: Thomas Monjalon Cc: dev@dpdk.org References: <8756945.B50ulyzTOh@xps> From: "Hunt, David" Message-ID: Date: Thu, 1 Nov 2018 14:26:28 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <8756945.B50ulyzTOh@xps> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US 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:26:32 -0000 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? Regards, Dave.