From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: JSON compilation in examples/vm_power_manager Date: Thu, 01 Nov 2018 15:39:41 +0100 Message-ID: <6068126.IEL2K3QhUc@xps> References: <8756945.B50ulyzTOh@xps> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: "Hunt, David" Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id E67F858FA for ; Thu, 1 Nov 2018 15:39:44 +0100 (CET) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. I think the only reliable solution is to test compilation as autotools or meson do.