Skip to content

Commit

Permalink
build: fix meson build in CI environments
Browse files Browse the repository at this point in the history
This is to fix a build error with meson in GNU/Linux that is caused
by using the 'more' command to read the VERSION file. The error:

    config/meson.build:10:10: ERROR:  String
    '::::::::::::::\n<RTE_SDK_PATH>VERSION\n::::::::::::::\n19' cannot be
    converted to int

The command 'more' prints the file name before the actual
contents of the file when it's being run without a controlling terminal.
This could happen in CI environments.

Please refer to:
https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/tree/text-utils/more.c

Fixes: c04172b ("build: add single source of DPDK version number")
Fixes: d320fe5 ("build: use version number from config file")

Signed-off-by: Ali Alnubani <[email protected]>
Signed-off-by: Bruce Richardson <[email protected]>
  • Loading branch information
alialnu authored and tmonjalo committed Apr 1, 2019
1 parent a2fe4c1 commit b77c1d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

project('DPDK', 'C',
# Get version number from file.
# Use "more" rather than "cat" for windows compatibility.
version: run_command('more', files('VERSION')).stdout().strip(),
# Fallback to "more" for Windows compatibility.
version: run_command(find_program('cat', 'more'),
files('VERSION')).stdout().strip(),
license: 'BSD',
default_options: ['buildtype=release', 'default_library=static'],
meson_version: '>= 0.47.1'
Expand Down

0 comments on commit b77c1d1

Please sign in to comment.