[v1] examples/power: fix FreeBSD meson lib dependency

Message ID 20190712090651.11824-1-david.hunt@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series [v1] examples/power: fix FreeBSD meson lib dependency |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply issues
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS

Commit Message

Hunt, David July 12, 2019, 9:06 a.m. UTC
  Samples apps that depend on the power library should not build if
the power library is not present. So now the following apps will
check to see if it's built, else skip building.
* l3fwd-pwer
* vm_power_manager
* guest_cli

Fixes: e0130788576f ("examples/power: support meson/ninja build")
Fixes: 89f0711f9ddf ("examples: build some samples with meson")
Signed-off-by: David Hunt <david.hunt@intel.com>
---
 examples/l3fwd-power/meson.build                |  6 ++++--
 examples/vm_power_manager/guest_cli/meson.build |  5 +++++
 examples/vm_power_manager/meson.build           | 10 +++++++---
 3 files changed, 16 insertions(+), 5 deletions(-)
  

Comments

Bruce Richardson July 12, 2019, 9:22 a.m. UTC | #1
On Fri, Jul 12, 2019 at 10:06:51AM +0100, David Hunt wrote:
> Samples apps that depend on the power library should not build if
> the power library is not present. So now the following apps will
> check to see if it's built, else skip building.
> * l3fwd-pwer
> * vm_power_manager
> * guest_cli
> 
> Fixes: e0130788576f ("examples/power: support meson/ninja build")
> Fixes: 89f0711f9ddf ("examples: build some samples with meson")
> Signed-off-by: David Hunt <david.hunt@intel.com>
> ---
>  examples/l3fwd-power/meson.build                |  6 ++++--
>  examples/vm_power_manager/guest_cli/meson.build |  5 +++++
>  examples/vm_power_manager/meson.build           | 10 +++++++---
>  3 files changed, 16 insertions(+), 5 deletions(-)
> 

Looks ok to me.
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
Ferruh Yigit July 12, 2019, 9:28 a.m. UTC | #2
On 7/12/2019 10:22 AM, Bruce Richardson wrote:
> On Fri, Jul 12, 2019 at 10:06:51AM +0100, David Hunt wrote:
>> Samples apps that depend on the power library should not build if
>> the power library is not present. So now the following apps will
>> check to see if it's built, else skip building.
>> * l3fwd-pwer
>> * vm_power_manager
>> * guest_cli
>>
>> Fixes: e0130788576f ("examples/power: support meson/ninja build")
>> Fixes: 89f0711f9ddf ("examples: build some samples with meson")
>> Signed-off-by: David Hunt <david.hunt@intel.com>
>> ---
>>  examples/l3fwd-power/meson.build                |  6 ++++--
>>  examples/vm_power_manager/guest_cli/meson.build |  5 +++++
>>  examples/vm_power_manager/meson.build           | 10 +++++++---
>>  3 files changed, 16 insertions(+), 5 deletions(-)
>>
> 
> Looks ok to me.
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> 

Applied, thanks.

(Applied quickly because it was causing failure in our CI for each patch.)
  
Stephen Hemminger July 12, 2019, 11:23 p.m. UTC | #3
On Fri, 12 Jul 2019 10:06:51 +0100
David Hunt <david.hunt@intel.com> wrote:

> Samples apps that depend on the power library should not build if
> the power library is not present. So now the following apps will
> check to see if it's built, else skip building.
> * l3fwd-pwer
> * vm_power_manager
> * guest_cli
> 
> Fixes: e0130788576f ("examples/power: support meson/ninja build")
> Fixes: 89f0711f9ddf ("examples: build some samples with meson")
> Signed-off-by: David Hunt <david.hunt@intel.com>

Still seeing failures in build today.

My patches (not related) today failed intel-compilation...

*Meson Build Failed #1:
OS: FreeBSD12-64
Target:build-gcc-static
Has header "linux/virtio_scsi.h" : NO
Message: Skipping example "vhost_scsi"
Library virt found: YES
Dependency jansson found: YES (cached)

examples/meson.build:88:4: ERROR: Problem encountered: Missing dependency "power" for example "vm_power_manager"

A full log can be found at /tmp/FreeBSD12-64_K19.02_GCC7.3.0/x86_64-native-bsdapp-gcc/f76f15ed805042438074e510f781c48d/dpdk/build-gcc-static/meson-logs/meson-log.txt
ninja -C build-gcc-static
ninja: Entering directory `build-gcc-static'
ninja: error: loading 'build.ninja': No such file or directory
--
Has header "linux/virtio_scsi.h" : NO
Message: Skipping example "vhost_scsi"
Library virt found: YES
Dependency jansson found: YES (cached)

examples/meson.build:88:4: ERROR: Problem encountered: Missing dependency "power" for example "vm_power_manager"

A full log can be found at /tmp/FreeBSD12-64_K19.02_GCC7.3.0/x86_64-native-bsdapp-gcc/f76f15ed805042438074e510f781c48d/dpdk/build-gcc-shared/meson-logs/meson-log.txt
ninja -C build-gcc-shared
ninja: Entering directory `build-gcc-shared'
ninja: error: loading 'build.ninja': No such file or directory
  
Hunt, David July 15, 2019, 8:51 a.m. UTC | #4
On 13/07/2019 00:23, Stephen Hemminger wrote:
> On Fri, 12 Jul 2019 10:06:51 +0100
> David Hunt <david.hunt@intel.com> wrote:
>
>> Samples apps that depend on the power library should not build if
>> the power library is not present. So now the following apps will
>> check to see if it's built, else skip building.
>> * l3fwd-pwer
>> * vm_power_manager
>> * guest_cli
>>
>> Fixes: e0130788576f ("examples/power: support meson/ninja build")
>> Fixes: 89f0711f9ddf ("examples: build some samples with meson")
>> Signed-off-by: David Hunt <david.hunt@intel.com>
> Still seeing failures in build today.
>
> My patches (not related) today failed intel-compilation...


Hi Stephen,

Are you still seeing the errors today? The emails I'm receiving from the 
Intel build since the patch was applied are all showing success.

Rgds,

Dave.
  

Patch

diff --git a/examples/l3fwd-power/meson.build b/examples/l3fwd-power/meson.build
index b38a7a0d7..d5a3d4bb2 100644
--- a/examples/l3fwd-power/meson.build
+++ b/examples/l3fwd-power/meson.build
@@ -6,9 +6,11 @@ 
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
-if not is_linux
-	build = false
+if not dpdk_conf.has('RTE_LIBRTE_POWER')
+        build = false
+        subdir_done()
 endif
+
 allow_experimental_apis = true
 deps += ['power', 'timer', 'lpm', 'hash', 'metrics']
 sources = files(
diff --git a/examples/vm_power_manager/guest_cli/meson.build b/examples/vm_power_manager/guest_cli/meson.build
index 9e821ceb8..38bd8d837 100644
--- a/examples/vm_power_manager/guest_cli/meson.build
+++ b/examples/vm_power_manager/guest_cli/meson.build
@@ -10,6 +10,11 @@ 
 # vm_power_manager app because of the way the directories are parsed.
 name = 'guest_cli'
 
+if not dpdk_conf.has('RTE_LIBRTE_POWER')
+        build = false
+        subdir_done()
+endif
+
 deps += ['power']
 
 sources = files(
diff --git a/examples/vm_power_manager/meson.build b/examples/vm_power_manager/meson.build
index f98445bc6..20a4a05b3 100644
--- a/examples/vm_power_manager/meson.build
+++ b/examples/vm_power_manager/meson.build
@@ -6,6 +6,13 @@ 
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+if not dpdk_conf.has('RTE_LIBRTE_POWER')
+	build = false
+	subdir_done()
+endif
+
+deps += ['power']
+
 if dpdk_conf.has('RTE_LIBRTE_BNXT_PMD')
 	deps += ['pmd_bnxt']
 endif
@@ -18,9 +25,6 @@  if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
 	deps += ['pmd_ixgbe']
 endif
 
-deps += ['power']
-
-
 sources = files(
 	'channel_manager.c', 'channel_monitor.c', 'main.c', 'parse.c', 'power_manager.c', 'vm_power_cli.c'
 )