* [Bug 926] meson: Use of Future-deprecated features
@ 2022-01-24 14:16 bugzilla
2022-01-24 17:49 ` [PATCH] build: remove deprecated meson functions Bruce Richardson
2022-03-15 16:44 ` [Bug 926] meson: Use of Future-deprecated features bugzilla
0 siblings, 2 replies; 5+ messages in thread
From: bugzilla @ 2022-01-24 14:16 UTC (permalink / raw)
To: dev
https://bugs.dpdk.org/show_bug.cgi?id=926
Bug ID: 926
Summary: meson: Use of Future-deprecated features
Product: DPDK
Version: 21.11
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: meson
Assignee: dev@dpdk.org
Reporter: jerinjacobk@gmail.com
Target Milestone: ---
log:
NOTICE: Future-deprecated features used:
* 0.56.0: {'meson.build_root', 'meson.source_root'}
* 0.58.0: {'meson.get_cross_property'}
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] build: remove deprecated meson functions
2022-01-24 14:16 [Bug 926] meson: Use of Future-deprecated features bugzilla
@ 2022-01-24 17:49 ` Bruce Richardson
2022-01-24 18:12 ` Jerin Jacob
2022-03-15 16:44 ` [Bug 926] meson: Use of Future-deprecated features bugzilla
1 sibling, 1 reply; 5+ messages in thread
From: Bruce Richardson @ 2022-01-24 17:49 UTC (permalink / raw)
To: dev; +Cc: jerinjacobk, Bruce Richardson
Starting in meson 0.56, the functions meson.source_root() and
meson.build_root() are deprecated and to be replaced by the [more
descriptive] functions: project_source_root()/global_source_root() and
project_build_root()/global_build_root(). Unfortunately, these new
replacement functions were only added in 0.56 release too, so to use
them we would need version checks for old/new functions to remove the
deprecation warnings.
However, the functions "current_build_dir()" and "current_source_dir()"
remain unaffected by all this, so we can bypass the versioning problem,
by saving off these values to "dpdk_source_root" and "dpdk_build_root"
in the top-level meson.build file
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
doc/api/meson.build | 10 +++++-----
kernel/freebsd/meson.build | 4 ++--
kernel/linux/kni/meson.build | 8 ++++----
meson.build | 2 ++
4 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/doc/api/meson.build b/doc/api/meson.build
index 7e2b429ac8..5c25b92092 100644
--- a/doc/api/meson.build
+++ b/doc/api/meson.build
@@ -24,7 +24,7 @@ htmldir = join_paths(get_option('datadir'), 'doc', 'dpdk')
# So use a configure option for now.
example = custom_target('examples.dox',
output: 'examples.dox',
- command: [generate_examples, join_paths(meson.source_root(), 'examples'), '@OUTPUT@'],
+ command: [generate_examples, join_paths(dpdk_source_root, 'examples'), '@OUTPUT@'],
depfile: 'examples.dox.d',
install: get_option('enable_docs'),
install_dir: htmldir,
@@ -32,11 +32,11 @@ example = custom_target('examples.dox',
cdata = configuration_data()
cdata.set('VERSION', meson.project_version())
-cdata.set('API_EXAMPLES', join_paths(meson.build_root(), 'doc', 'api', 'examples.dox'))
-cdata.set('OUTPUT', join_paths(meson.build_root(), 'doc', 'api'))
+cdata.set('API_EXAMPLES', join_paths(dpdk_build_root, 'doc', 'api', 'examples.dox'))
+cdata.set('OUTPUT', join_paths(dpdk_build_root, 'doc', 'api'))
cdata.set('HTML_OUTPUT', 'html')
-cdata.set('TOPDIR', meson.source_root())
-cdata.set('STRIP_FROM_PATH', ' '.join([meson.source_root(), join_paths(meson.build_root(), 'doc', 'api')]))
+cdata.set('TOPDIR', dpdk_source_root)
+cdata.set('STRIP_FROM_PATH', ' '.join([dpdk_source_root, join_paths(dpdk_build_root, 'doc', 'api')]))
cdata.set('WARN_AS_ERROR', 'NO')
if get_option('werror')
cdata.set('WARN_AS_ERROR', 'YES')
diff --git a/kernel/freebsd/meson.build b/kernel/freebsd/meson.build
index bf5aa20a55..1f612711be 100644
--- a/kernel/freebsd/meson.build
+++ b/kernel/freebsd/meson.build
@@ -9,8 +9,8 @@ kmods = ['contigmem', 'nic_uio']
# right now, which allows us to simplify things. We pull in the sourcer
# files from the individual meson.build files, and then use a custom
# target to call make, passing in the values as env parameters.
-kmod_cflags = ['-I' + meson.build_root(),
- '-I' + join_paths(meson.source_root(), 'config'),
+kmod_cflags = ['-I' + dpdk_build_root,
+ '-I' + join_paths(dpdk_source_root, 'config'),
'-include rte_config.h']
# to avoid warnings due to race conditions with creating the dev_if.h, etc.
diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build
index c683fc7b36..d3743eeef4 100644
--- a/kernel/linux/kni/meson.build
+++ b/kernel/linux/kni/meson.build
@@ -29,10 +29,10 @@ custom_target('rte_kni',
'M=' + meson.current_build_dir(),
'src=' + meson.current_source_dir(),
' '.join(['MODULE_CFLAGS=', kmod_cflags,'-include '])
- + meson.source_root() + '/config/rte_config.h' +
- ' -I' + meson.source_root() + '/lib/eal/include' +
- ' -I' + meson.source_root() + '/lib/kni' +
- ' -I' + meson.build_root() +
+ + dpdk_source_root + '/config/rte_config.h' +
+ ' -I' + dpdk_source_root + '/lib/eal/include' +
+ ' -I' + dpdk_source_root + '/lib/kni' +
+ ' -I' + dpdk_build_root +
' -I' + meson.current_source_dir(),
'modules'] + cross_args,
depends: kni_mkfile,
diff --git a/meson.build b/meson.build
index 0a844bce9e..6641d0ed80 100644
--- a/meson.build
+++ b/meson.build
@@ -27,6 +27,8 @@ endif
# set up some global vars for compiler, platform, configuration, etc.
cc = meson.get_compiler('c')
+dpdk_source_root = meson.current_source_dir()
+dpdk_build_root = meson.current_build_dir()
dpdk_conf = configuration_data()
dpdk_libraries = []
dpdk_static_libraries = []
--
2.32.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] build: remove deprecated meson functions
2022-01-24 17:49 ` [PATCH] build: remove deprecated meson functions Bruce Richardson
@ 2022-01-24 18:12 ` Jerin Jacob
2022-02-02 17:47 ` Thomas Monjalon
0 siblings, 1 reply; 5+ messages in thread
From: Jerin Jacob @ 2022-01-24 18:12 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dpdk-dev
On Mon, Jan 24, 2022 at 11:20 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> Starting in meson 0.56, the functions meson.source_root() and
> meson.build_root() are deprecated and to be replaced by the [more
> descriptive] functions: project_source_root()/global_source_root() and
> project_build_root()/global_build_root(). Unfortunately, these new
> replacement functions were only added in 0.56 release too, so to use
> them we would need version checks for old/new functions to remove the
> deprecation warnings.
>
> However, the functions "current_build_dir()" and "current_source_dir()"
> remain unaffected by all this, so we can bypass the versioning problem,
> by saving off these values to "dpdk_source_root" and "dpdk_build_root"
> in the top-level meson.build file
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
> ---
> doc/api/meson.build | 10 +++++-----
> kernel/freebsd/meson.build | 4 ++--
> kernel/linux/kni/meson.build | 8 ++++----
> meson.build | 2 ++
> 4 files changed, 13 insertions(+), 11 deletions(-)
>
> diff --git a/doc/api/meson.build b/doc/api/meson.build
> index 7e2b429ac8..5c25b92092 100644
> --- a/doc/api/meson.build
> +++ b/doc/api/meson.build
> @@ -24,7 +24,7 @@ htmldir = join_paths(get_option('datadir'), 'doc', 'dpdk')
> # So use a configure option for now.
> example = custom_target('examples.dox',
> output: 'examples.dox',
> - command: [generate_examples, join_paths(meson.source_root(), 'examples'), '@OUTPUT@'],
> + command: [generate_examples, join_paths(dpdk_source_root, 'examples'), '@OUTPUT@'],
> depfile: 'examples.dox.d',
> install: get_option('enable_docs'),
> install_dir: htmldir,
> @@ -32,11 +32,11 @@ example = custom_target('examples.dox',
>
> cdata = configuration_data()
> cdata.set('VERSION', meson.project_version())
> -cdata.set('API_EXAMPLES', join_paths(meson.build_root(), 'doc', 'api', 'examples.dox'))
> -cdata.set('OUTPUT', join_paths(meson.build_root(), 'doc', 'api'))
> +cdata.set('API_EXAMPLES', join_paths(dpdk_build_root, 'doc', 'api', 'examples.dox'))
> +cdata.set('OUTPUT', join_paths(dpdk_build_root, 'doc', 'api'))
> cdata.set('HTML_OUTPUT', 'html')
> -cdata.set('TOPDIR', meson.source_root())
> -cdata.set('STRIP_FROM_PATH', ' '.join([meson.source_root(), join_paths(meson.build_root(), 'doc', 'api')]))
> +cdata.set('TOPDIR', dpdk_source_root)
> +cdata.set('STRIP_FROM_PATH', ' '.join([dpdk_source_root, join_paths(dpdk_build_root, 'doc', 'api')]))
> cdata.set('WARN_AS_ERROR', 'NO')
> if get_option('werror')
> cdata.set('WARN_AS_ERROR', 'YES')
> diff --git a/kernel/freebsd/meson.build b/kernel/freebsd/meson.build
> index bf5aa20a55..1f612711be 100644
> --- a/kernel/freebsd/meson.build
> +++ b/kernel/freebsd/meson.build
> @@ -9,8 +9,8 @@ kmods = ['contigmem', 'nic_uio']
> # right now, which allows us to simplify things. We pull in the sourcer
> # files from the individual meson.build files, and then use a custom
> # target to call make, passing in the values as env parameters.
> -kmod_cflags = ['-I' + meson.build_root(),
> - '-I' + join_paths(meson.source_root(), 'config'),
> +kmod_cflags = ['-I' + dpdk_build_root,
> + '-I' + join_paths(dpdk_source_root, 'config'),
> '-include rte_config.h']
>
> # to avoid warnings due to race conditions with creating the dev_if.h, etc.
> diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build
> index c683fc7b36..d3743eeef4 100644
> --- a/kernel/linux/kni/meson.build
> +++ b/kernel/linux/kni/meson.build
> @@ -29,10 +29,10 @@ custom_target('rte_kni',
> 'M=' + meson.current_build_dir(),
> 'src=' + meson.current_source_dir(),
> ' '.join(['MODULE_CFLAGS=', kmod_cflags,'-include '])
> - + meson.source_root() + '/config/rte_config.h' +
> - ' -I' + meson.source_root() + '/lib/eal/include' +
> - ' -I' + meson.source_root() + '/lib/kni' +
> - ' -I' + meson.build_root() +
> + + dpdk_source_root + '/config/rte_config.h' +
> + ' -I' + dpdk_source_root + '/lib/eal/include' +
> + ' -I' + dpdk_source_root + '/lib/kni' +
> + ' -I' + dpdk_build_root +
> ' -I' + meson.current_source_dir(),
> 'modules'] + cross_args,
> depends: kni_mkfile,
> diff --git a/meson.build b/meson.build
> index 0a844bce9e..6641d0ed80 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -27,6 +27,8 @@ endif
>
> # set up some global vars for compiler, platform, configuration, etc.
> cc = meson.get_compiler('c')
> +dpdk_source_root = meson.current_source_dir()
> +dpdk_build_root = meson.current_build_dir()
> dpdk_conf = configuration_data()
> dpdk_libraries = []
> dpdk_static_libraries = []
> --
> 2.32.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] build: remove deprecated meson functions
2022-01-24 18:12 ` Jerin Jacob
@ 2022-02-02 17:47 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2022-02-02 17:47 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, Jerin Jacob
24/01/2022 19:12, Jerin Jacob:
> On Mon, Jan 24, 2022 at 11:20 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > Starting in meson 0.56, the functions meson.source_root() and
> > meson.build_root() are deprecated and to be replaced by the [more
> > descriptive] functions: project_source_root()/global_source_root() and
> > project_build_root()/global_build_root(). Unfortunately, these new
> > replacement functions were only added in 0.56 release too, so to use
> > them we would need version checks for old/new functions to remove the
> > deprecation warnings.
> >
> > However, the functions "current_build_dir()" and "current_source_dir()"
> > remain unaffected by all this, so we can bypass the versioning problem,
> > by saving off these values to "dpdk_source_root" and "dpdk_build_root"
> > in the top-level meson.build file
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>
> Tested-by: Jerin Jacob <jerinj@marvell.com>
Bugzilla ID: 926
Cc: stable@dpdk.org
Applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug 926] meson: Use of Future-deprecated features
2022-01-24 14:16 [Bug 926] meson: Use of Future-deprecated features bugzilla
2022-01-24 17:49 ` [PATCH] build: remove deprecated meson functions Bruce Richardson
@ 2022-03-15 16:44 ` bugzilla
1 sibling, 0 replies; 5+ messages in thread
From: bugzilla @ 2022-03-15 16:44 UTC (permalink / raw)
To: dev
https://bugs.dpdk.org/show_bug.cgi?id=926
Thomas Monjalon (thomas@monjalon.net) changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #1 from Thomas Monjalon (thomas@monjalon.net) ---
Resolved in http://git.dpdk.org/dpdk/commit/?id=e16b972b1a
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-03-15 16:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24 14:16 [Bug 926] meson: Use of Future-deprecated features bugzilla
2022-01-24 17:49 ` [PATCH] build: remove deprecated meson functions Bruce Richardson
2022-01-24 18:12 ` Jerin Jacob
2022-02-02 17:47 ` Thomas Monjalon
2022-03-15 16:44 ` [Bug 926] meson: Use of Future-deprecated features bugzilla
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).