Linux CXL
 help / color / mirror / Atom feed
* [PATCH ndctl] Build: Fix deprecated str.format() usage
@ 2024-05-01 20:25 Vishal Verma
  2024-05-01 20:28 ` Dan Williams
  2024-05-01 21:20 ` Dave Jiang
  0 siblings, 2 replies; 3+ messages in thread
From: Vishal Verma @ 2024-05-01 20:25 UTC (permalink / raw)
  To: nvdimm, linux-cxl; +Cc: Dan Williams, alison.schofield, Vishal Verma

From: Dan Williams <dan.j.williams@intel.com>

New versions of Meson throw a warning around ndctl's use of
'str.format':

  WARNING: Broken features used:
   * 1.3.0: {'str.format: Value other than strings, integers, bools, options, dictionaries and lists thereof.'}

Fix this by explicit string concatenation for building paths for the
version script, whence the warnings originated.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
 cxl/lib/meson.build    |  9 +++++----
 daxctl/lib/meson.build | 10 ++++++----
 ndctl/lib/meson.build  |  9 +++++----
 3 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/cxl/lib/meson.build b/cxl/lib/meson.build
index 422a3513..3f47e495 100644
--- a/cxl/lib/meson.build
+++ b/cxl/lib/meson.build
@@ -3,8 +3,9 @@ libcxl_version = '@0@.@1@.@2@'.format(
   LIBCXL_REVISION,
   LIBCXL_AGE)
 
-mapfile = files('libcxl.sym')
-vflag = '-Wl,--version-script,@0@/@1@'.format(project_source_root, mapfile[0])
+libcxl_dir_path = meson.current_source_dir()
+libcxl_sym = files('libcxl.sym')
+libcxl_sym_path = libcxl_dir_path / 'libcxl.sym'
 
 cxl = library('cxl',
   '../../util/sysfs.c',
@@ -21,8 +22,8 @@ cxl = library('cxl',
   version : libcxl_version,
   install : true,
   install_dir : rootlibdir,
-  link_args : vflag,
-  link_depends : mapfile,
+  link_args : '-Wl,--version-script=' + libcxl_sym_path,
+  link_depends : libcxl_sym,
 )
 cxl_dep = declare_dependency(link_with : cxl)
 
diff --git a/daxctl/lib/meson.build b/daxctl/lib/meson.build
index b79c6e59..b2c7a957 100644
--- a/daxctl/lib/meson.build
+++ b/daxctl/lib/meson.build
@@ -4,8 +4,10 @@ libdaxctl_version = '@0@.@1@.@2@'.format(
   LIBDAXCTL_AGE,
 )
 
-mapfile = files('libdaxctl.sym')
-vflag = '-Wl,--version-script,@0@/@1@'.format(project_source_root, mapfile[0])
+libdaxctl_dir_path = meson.current_source_dir()
+libdaxctl_sym = files('libdaxctl.sym')
+libdaxctl_sym_path = libdaxctl_dir_path / 'libdaxctl.sym'
+
 
 libdaxctl_src = [
   '../../util/iomem.c',
@@ -25,8 +27,8 @@ daxctl = library(
   ],
   install : true,
   install_dir : rootlibdir,
-  link_args : vflag,
-  link_depends : mapfile,
+  link_args : '-Wl,--version-script=' + libdaxctl_sym_path,
+  link_depends : libdaxctl_sym,
 )
 
 daxctl_dep = declare_dependency(link_with : daxctl)
diff --git a/ndctl/lib/meson.build b/ndctl/lib/meson.build
index abce8794..2907af7f 100644
--- a/ndctl/lib/meson.build
+++ b/ndctl/lib/meson.build
@@ -3,8 +3,9 @@ libndctl_version = '@0@.@1@.@2@'.format(
   LIBNDCTL_REVISION,
   LIBNDCTL_AGE)
 
-mapfile = files('libndctl.sym')
-vflag = '-Wl,--version-script,@0@/@1@'.format(project_source_root, mapfile[0])
+libndctl_dir_path = meson.current_source_dir()
+libndctl_sym = files('libndctl.sym')
+libndctl_sym_path = libndctl_dir_path / 'libndctl.sym'
 
 ndctl = library(
  'ndctl',
@@ -32,8 +33,8 @@ ndctl = library(
   version : libndctl_version,
   install : true,
   install_dir : rootlibdir,
-  link_args : vflag,
-  link_depends : mapfile,
+  link_args : '-Wl,--version-script=' + libndctl_sym_path,
+  link_depends : libndctl_sym,
 )
 ndctl_dep = declare_dependency(link_with : ndctl)
 

---
base-commit: 7c8c993b87ee8471b4c138de549c39d1267f0067
change-id: 20240501-vv-build-fix-5d72f9979fad

Best regards,
-- 
Vishal Verma <vishal.l.verma@intel.com>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH ndctl] Build: Fix deprecated str.format() usage
  2024-05-01 20:25 [PATCH ndctl] Build: Fix deprecated str.format() usage Vishal Verma
@ 2024-05-01 20:28 ` Dan Williams
  2024-05-01 21:20 ` Dave Jiang
  1 sibling, 0 replies; 3+ messages in thread
From: Dan Williams @ 2024-05-01 20:28 UTC (permalink / raw)
  To: Vishal Verma, nvdimm, linux-cxl
  Cc: Dan Williams, alison.schofield, Vishal Verma

Vishal Verma wrote:
> From: Dan Williams <dan.j.williams@intel.com>
> 
> New versions of Meson throw a warning around ndctl's use of
> 'str.format':
> 
>   WARNING: Broken features used:
>    * 1.3.0: {'str.format: Value other than strings, integers, bools, options, dictionaries and lists thereof.'}
> 
> Fix this by explicit string concatenation for building paths for the
> version script, whence the warnings originated.
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>

Thanks for adding a changelog and sending this out!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH ndctl] Build: Fix deprecated str.format() usage
  2024-05-01 20:25 [PATCH ndctl] Build: Fix deprecated str.format() usage Vishal Verma
  2024-05-01 20:28 ` Dan Williams
@ 2024-05-01 21:20 ` Dave Jiang
  1 sibling, 0 replies; 3+ messages in thread
From: Dave Jiang @ 2024-05-01 21:20 UTC (permalink / raw)
  To: Vishal Verma, nvdimm, linux-cxl; +Cc: Dan Williams, alison.schofield



On 5/1/24 1:25 PM, Vishal Verma wrote:
> From: Dan Williams <dan.j.williams@intel.com>
> 
> New versions of Meson throw a warning around ndctl's use of
> 'str.format':
> 
>   WARNING: Broken features used:
>    * 1.3.0: {'str.format: Value other than strings, integers, bools, options, dictionaries and lists thereof.'}
> 
> Fix this by explicit string concatenation for building paths for the
> version script, whence the warnings originated.
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>

Thanks for fixing this!
Reviewed-by: Dave Jiang <dave.jiang@intel.com>

> ---
>  cxl/lib/meson.build    |  9 +++++----
>  daxctl/lib/meson.build | 10 ++++++----
>  ndctl/lib/meson.build  |  9 +++++----
>  3 files changed, 16 insertions(+), 12 deletions(-)
> 
> diff --git a/cxl/lib/meson.build b/cxl/lib/meson.build
> index 422a3513..3f47e495 100644
> --- a/cxl/lib/meson.build
> +++ b/cxl/lib/meson.build
> @@ -3,8 +3,9 @@ libcxl_version = '@0@.@1@.@2@'.format(
>    LIBCXL_REVISION,
>    LIBCXL_AGE)
>  
> -mapfile = files('libcxl.sym')
> -vflag = '-Wl,--version-script,@0@/@1@'.format(project_source_root, mapfile[0])
> +libcxl_dir_path = meson.current_source_dir()
> +libcxl_sym = files('libcxl.sym')
> +libcxl_sym_path = libcxl_dir_path / 'libcxl.sym'
>  
>  cxl = library('cxl',
>    '../../util/sysfs.c',
> @@ -21,8 +22,8 @@ cxl = library('cxl',
>    version : libcxl_version,
>    install : true,
>    install_dir : rootlibdir,
> -  link_args : vflag,
> -  link_depends : mapfile,
> +  link_args : '-Wl,--version-script=' + libcxl_sym_path,
> +  link_depends : libcxl_sym,
>  )
>  cxl_dep = declare_dependency(link_with : cxl)
>  
> diff --git a/daxctl/lib/meson.build b/daxctl/lib/meson.build
> index b79c6e59..b2c7a957 100644
> --- a/daxctl/lib/meson.build
> +++ b/daxctl/lib/meson.build
> @@ -4,8 +4,10 @@ libdaxctl_version = '@0@.@1@.@2@'.format(
>    LIBDAXCTL_AGE,
>  )
>  
> -mapfile = files('libdaxctl.sym')
> -vflag = '-Wl,--version-script,@0@/@1@'.format(project_source_root, mapfile[0])
> +libdaxctl_dir_path = meson.current_source_dir()
> +libdaxctl_sym = files('libdaxctl.sym')
> +libdaxctl_sym_path = libdaxctl_dir_path / 'libdaxctl.sym'
> +
>  
>  libdaxctl_src = [
>    '../../util/iomem.c',
> @@ -25,8 +27,8 @@ daxctl = library(
>    ],
>    install : true,
>    install_dir : rootlibdir,
> -  link_args : vflag,
> -  link_depends : mapfile,
> +  link_args : '-Wl,--version-script=' + libdaxctl_sym_path,
> +  link_depends : libdaxctl_sym,
>  )
>  
>  daxctl_dep = declare_dependency(link_with : daxctl)
> diff --git a/ndctl/lib/meson.build b/ndctl/lib/meson.build
> index abce8794..2907af7f 100644
> --- a/ndctl/lib/meson.build
> +++ b/ndctl/lib/meson.build
> @@ -3,8 +3,9 @@ libndctl_version = '@0@.@1@.@2@'.format(
>    LIBNDCTL_REVISION,
>    LIBNDCTL_AGE)
>  
> -mapfile = files('libndctl.sym')
> -vflag = '-Wl,--version-script,@0@/@1@'.format(project_source_root, mapfile[0])
> +libndctl_dir_path = meson.current_source_dir()
> +libndctl_sym = files('libndctl.sym')
> +libndctl_sym_path = libndctl_dir_path / 'libndctl.sym'
>  
>  ndctl = library(
>   'ndctl',
> @@ -32,8 +33,8 @@ ndctl = library(
>    version : libndctl_version,
>    install : true,
>    install_dir : rootlibdir,
> -  link_args : vflag,
> -  link_depends : mapfile,
> +  link_args : '-Wl,--version-script=' + libndctl_sym_path,
> +  link_depends : libndctl_sym,
>  )
>  ndctl_dep = declare_dependency(link_with : ndctl)
>  
> 
> ---
> base-commit: 7c8c993b87ee8471b4c138de549c39d1267f0067
> change-id: 20240501-vv-build-fix-5d72f9979fad
> 
> Best regards,

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-01 21:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-01 20:25 [PATCH ndctl] Build: Fix deprecated str.format() usage Vishal Verma
2024-05-01 20:28 ` Dan Williams
2024-05-01 21:20 ` Dave Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox