* [dpdk-dev] JSON compilation in examples/vm_power_manager @ 2018-11-01 10:47 Thomas Monjalon 2018-11-01 14:26 ` Hunt, David 0 siblings, 1 reply; 5+ messages in thread From: Thomas Monjalon @ 2018-11-01 10:47 UTC (permalink / raw) To: david.hunt; +Cc: dev 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? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] JSON compilation in examples/vm_power_manager 2018-11-01 10:47 [dpdk-dev] JSON compilation in examples/vm_power_manager Thomas Monjalon @ 2018-11-01 14:26 ` Hunt, David 2018-11-01 14:39 ` Thomas Monjalon 0 siblings, 1 reply; 5+ messages in thread From: Hunt, David @ 2018-11-01 14:26 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] JSON compilation in examples/vm_power_manager 2018-11-01 14:26 ` Hunt, David @ 2018-11-01 14:39 ` Thomas Monjalon 2018-11-01 14:59 ` Richardson, Bruce 0 siblings, 1 reply; 5+ messages in thread From: Thomas Monjalon @ 2018-11-01 14:39 UTC (permalink / raw) To: Hunt, David; +Cc: 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] JSON compilation in examples/vm_power_manager 2018-11-01 14:39 ` Thomas Monjalon @ 2018-11-01 14:59 ` Richardson, Bruce 2018-11-01 15:12 ` Thomas Monjalon 0 siblings, 1 reply; 5+ messages in thread From: Richardson, Bruce @ 2018-11-01 14:59 UTC (permalink / raw) To: Thomas Monjalon, Hunt, David; +Cc: dev > -----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 <david.hunt@intel.com> > 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] /Bruce ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] JSON compilation in examples/vm_power_manager 2018-11-01 14:59 ` Richardson, Bruce @ 2018-11-01 15:12 ` Thomas Monjalon 0 siblings, 0 replies; 5+ messages in thread From: Thomas Monjalon @ 2018-11-01 15:12 UTC (permalink / raw) To: Richardson, Bruce, Hunt, David; +Cc: dev 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 <david.hunt@intel.com> > > 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-11-01 15:12 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-11-01 10:47 [dpdk-dev] JSON compilation in examples/vm_power_manager Thomas Monjalon 2018-11-01 14:26 ` Hunt, David 2018-11-01 14:39 ` Thomas Monjalon 2018-11-01 14:59 ` Richardson, Bruce 2018-11-01 15:12 ` Thomas Monjalon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).