DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] config: add 32-bit cross-compilation x86 target
@ 2024-09-04 13:57 Bruce Richardson
  2024-09-06 15:34 ` Medvedkin, Vladimir
  2024-09-06 16:12 ` [PATCH v2 0/4] simplify doing 32-bit DPDK builds Bruce Richardson
  0 siblings, 2 replies; 15+ messages in thread
From: Bruce Richardson @ 2024-09-04 13:57 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

To simplify building 32-bit binaries on 64-bit system, we can supply a
cross-compilation file which provides the relevant compiler flags and
settings needed - '-m32' compile/link flag, and appropriate
PKG_CONFIG_LIBDIR value. This latter setting will depend upon the layout
format of the particular OS/distro in use, so initially add a cross file
with paths set for Debian or Ubuntu systems.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---

The generation of 32-bit cross-files for other distros is left as an
exercise for the reader! I suspect that for Fedora/RHEL and Arch
variants that only the "pkg_config_libdir" and "libdir" setting should
be adjusted. However, I don't currently have a machine set up to test
that assumption, so getting the ball rolling for now with just this
patch to get feedback.

---

 config/x86/cross-debian-32bit | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 config/x86/cross-debian-32bit

diff --git a/config/x86/cross-debian-32bit b/config/x86/cross-debian-32bit
new file mode 100644
index 0000000000..2f6e4714cb
--- /dev/null
+++ b/config/x86/cross-debian-32bit
@@ -0,0 +1,22 @@
+[binaries]
+c = 'cc'
+cpp = 'c++'
+ar = 'ar'
+strip = 'strip'
+pkg-config = 'pkg-config'
+
+[host_machine]
+system = 'linux'
+cpu_family = 'x86'
+cpu = 'native'
+endian = 'little'
+
+[properties]
+pkg_config_libdir = '/usr/lib/i386-linux-gnu/pkgconfig'
+
+[built-in options]
+c_args = '-m32'
+c_link_args = '-m32'
+cpp_args = '-m32'
+cpp_link_args = '-m32'
+libdir = 'lib/i386-linux-gnu'
-- 
2.43.0


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

* Re: [PATCH] config: add 32-bit cross-compilation x86 target
  2024-09-04 13:57 [PATCH] config: add 32-bit cross-compilation x86 target Bruce Richardson
@ 2024-09-06 15:34 ` Medvedkin, Vladimir
  2024-09-06 16:12 ` [PATCH v2 0/4] simplify doing 32-bit DPDK builds Bruce Richardson
  1 sibling, 0 replies; 15+ messages in thread
From: Medvedkin, Vladimir @ 2024-09-06 15:34 UTC (permalink / raw)
  To: Bruce Richardson, dev

Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

On 04/09/2024 14:57, Bruce Richardson wrote:
> To simplify building 32-bit binaries on 64-bit system, we can supply a
> cross-compilation file which provides the relevant compiler flags and
> settings needed - '-m32' compile/link flag, and appropriate
> PKG_CONFIG_LIBDIR value. This latter setting will depend upon the layout
> format of the particular OS/distro in use, so initially add a cross file
> with paths set for Debian or Ubuntu systems.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>
> The generation of 32-bit cross-files for other distros is left as an
> exercise for the reader! I suspect that for Fedora/RHEL and Arch
> variants that only the "pkg_config_libdir" and "libdir" setting should
> be adjusted. However, I don't currently have a machine set up to test
> that assumption, so getting the ball rolling for now with just this
> patch to get feedback.
>
> ---
>
>   config/x86/cross-debian-32bit | 22 ++++++++++++++++++++++
>   1 file changed, 22 insertions(+)
>   create mode 100644 config/x86/cross-debian-32bit
>
> diff --git a/config/x86/cross-debian-32bit b/config/x86/cross-debian-32bit
> new file mode 100644
> index 0000000000..2f6e4714cb
> --- /dev/null
> +++ b/config/x86/cross-debian-32bit
> @@ -0,0 +1,22 @@
> +[binaries]
> +c = 'cc'
> +cpp = 'c++'
> +ar = 'ar'
> +strip = 'strip'
> +pkg-config = 'pkg-config'
> +
> +[host_machine]
> +system = 'linux'
> +cpu_family = 'x86'
> +cpu = 'native'
> +endian = 'little'
> +
> +[properties]
> +pkg_config_libdir = '/usr/lib/i386-linux-gnu/pkgconfig'
> +
> +[built-in options]
> +c_args = '-m32'
> +c_link_args = '-m32'
> +cpp_args = '-m32'
> +cpp_link_args = '-m32'
> +libdir = 'lib/i386-linux-gnu'

-- 
Regards,
Vladimir


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

* [PATCH v2 0/4] simplify doing 32-bit DPDK builds
  2024-09-04 13:57 [PATCH] config: add 32-bit cross-compilation x86 target Bruce Richardson
  2024-09-06 15:34 ` Medvedkin, Vladimir
@ 2024-09-06 16:12 ` Bruce Richardson
  2024-09-06 16:12   ` [PATCH v2 1/4] config: add 32-bit x86 debian cross-compilation file Bruce Richardson
                     ` (4 more replies)
  1 sibling, 5 replies; 15+ messages in thread
From: Bruce Richardson @ 2024-09-06 16:12 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

To make it easier to build and test DPDK on 32-bit x86 add a set of
cross-compile ini files for a number of common linux distributions.
This avoids the user having to remember strange meson incantations
with '-m32' in various args values and with the PKG_CONFIG_LIBDIR
overridden in the environment.

Bruce Richardson (4):
  config: add 32-bit x86 debian cross-compilation file
  config: add fedora 32-bit x86 cross-compile file
  config: add arch 32-bit cross-compilation file
  devtools/test-meson-builds: use cross files for 32bit build

 config/x86/cross-32bit-arch.ini   | 22 ++++++++++++++++++++++
 config/x86/cross-32bit-debian.ini | 22 ++++++++++++++++++++++
 config/x86/cross-32bit-fedora.ini | 22 ++++++++++++++++++++++
 devtools/test-meson-builds.sh     | 13 +++++--------
 4 files changed, 71 insertions(+), 8 deletions(-)
 create mode 100644 config/x86/cross-32bit-arch.ini
 create mode 100644 config/x86/cross-32bit-debian.ini
 create mode 100644 config/x86/cross-32bit-fedora.ini

--
2.43.0


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

* [PATCH v2 1/4] config: add 32-bit x86 debian cross-compilation file
  2024-09-06 16:12 ` [PATCH v2 0/4] simplify doing 32-bit DPDK builds Bruce Richardson
@ 2024-09-06 16:12   ` Bruce Richardson
  2024-09-06 16:12   ` [PATCH v2 2/4] config: add fedora 32-bit x86 cross-compile file Bruce Richardson
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 15+ messages in thread
From: Bruce Richardson @ 2024-09-06 16:12 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Vladimir Medvedkin

To simplify building 32-bit binaries on 64-bit system, we can supply a
cross-compilation file which provides the relevant compiler flags and
settings needed - '-m32' compile/link flag, and appropriate
PKG_CONFIG_LIBDIR value. This latter setting will depend upon the layout
format of the particular OS/distro in use, so initially add a cross file
with paths set for Debian or Ubuntu systems.

Note, unlike previous cross files, this file has a .ini extension which
means that editors use correct syntax highlighting on it.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 config/x86/cross-32bit-debian.ini | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 config/x86/cross-32bit-debian.ini

diff --git a/config/x86/cross-32bit-debian.ini b/config/x86/cross-32bit-debian.ini
new file mode 100644
index 0000000000..2f6e4714cb
--- /dev/null
+++ b/config/x86/cross-32bit-debian.ini
@@ -0,0 +1,22 @@
+[binaries]
+c = 'cc'
+cpp = 'c++'
+ar = 'ar'
+strip = 'strip'
+pkg-config = 'pkg-config'
+
+[host_machine]
+system = 'linux'
+cpu_family = 'x86'
+cpu = 'native'
+endian = 'little'
+
+[properties]
+pkg_config_libdir = '/usr/lib/i386-linux-gnu/pkgconfig'
+
+[built-in options]
+c_args = '-m32'
+c_link_args = '-m32'
+cpp_args = '-m32'
+cpp_link_args = '-m32'
+libdir = 'lib/i386-linux-gnu'
--
2.43.0


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

* [PATCH v2 2/4] config: add fedora 32-bit x86 cross-compile file
  2024-09-06 16:12 ` [PATCH v2 0/4] simplify doing 32-bit DPDK builds Bruce Richardson
  2024-09-06 16:12   ` [PATCH v2 1/4] config: add 32-bit x86 debian cross-compilation file Bruce Richardson
@ 2024-09-06 16:12   ` Bruce Richardson
  2024-09-06 16:12   ` [PATCH v2 3/4] config: add arch 32-bit cross-compilation file Bruce Richardson
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 15+ messages in thread
From: Bruce Richardson @ 2024-09-06 16:12 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

Add cross-compilation target for building 32-bit x86 DPDK on Fedora or
RHEL.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/x86/cross-32bit-fedora.ini | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 config/x86/cross-32bit-fedora.ini

diff --git a/config/x86/cross-32bit-fedora.ini b/config/x86/cross-32bit-fedora.ini
new file mode 100644
index 0000000000..fd407cc7fb
--- /dev/null
+++ b/config/x86/cross-32bit-fedora.ini
@@ -0,0 +1,22 @@
+[binaries]
+c = 'cc'
+cpp = 'c++'
+ar = 'ar'
+strip = 'strip'
+pkg-config = 'pkg-config'
+
+[host_machine]
+system = 'linux'
+cpu_family = 'x86'
+cpu = 'native'
+endian = 'little'
+
+[properties]
+pkg_config_libdir = '/usr/lib/pkgconfig'
+
+[built-in options]
+c_args = '-m32'
+c_link_args = '-m32'
+cpp_args = '-m32'
+cpp_link_args = '-m32'
+libdir = 'lib'
-- 
2.43.0


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

* [PATCH v2 3/4] config: add arch 32-bit cross-compilation file
  2024-09-06 16:12 ` [PATCH v2 0/4] simplify doing 32-bit DPDK builds Bruce Richardson
  2024-09-06 16:12   ` [PATCH v2 1/4] config: add 32-bit x86 debian cross-compilation file Bruce Richardson
  2024-09-06 16:12   ` [PATCH v2 2/4] config: add fedora 32-bit x86 cross-compile file Bruce Richardson
@ 2024-09-06 16:12   ` Bruce Richardson
  2024-09-06 16:12   ` [PATCH v2 4/4] devtools/test-meson-builds: use cross files for 32bit build Bruce Richardson
  2024-09-19  7:44   ` [PATCH v2 0/4] simplify doing 32-bit DPDK builds David Marchand
  4 siblings, 0 replies; 15+ messages in thread
From: Bruce Richardson @ 2024-09-06 16:12 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

Add a 32-bit cross file for x86 for Arch linux

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/x86/cross-32bit-arch.ini | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 config/x86/cross-32bit-arch.ini

diff --git a/config/x86/cross-32bit-arch.ini b/config/x86/cross-32bit-arch.ini
new file mode 100644
index 0000000000..b88244d1ef
--- /dev/null
+++ b/config/x86/cross-32bit-arch.ini
@@ -0,0 +1,22 @@
+[binaries]
+c = 'cc'
+cpp = 'c++'
+ar = 'ar'
+strip = 'strip'
+pkg-config = 'pkg-config'
+
+[host_machine]
+system = 'linux'
+cpu_family = 'x86'
+cpu = 'native'
+endian = 'little'
+
+[properties]
+pkg_config_libdir = '/usr/lib32/pkgconfig'
+
+[built-in options]
+c_args = '-m32'
+c_link_args = '-m32'
+cpp_args = '-m32'
+cpp_link_args = '-m32'
+libdir = 'lib32'
-- 
2.43.0


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

* [PATCH v2 4/4] devtools/test-meson-builds: use cross files for 32bit build
  2024-09-06 16:12 ` [PATCH v2 0/4] simplify doing 32-bit DPDK builds Bruce Richardson
                     ` (2 preceding siblings ...)
  2024-09-06 16:12   ` [PATCH v2 3/4] config: add arch 32-bit cross-compilation file Bruce Richardson
@ 2024-09-06 16:12   ` Bruce Richardson
  2024-09-19  7:44   ` [PATCH v2 0/4] simplify doing 32-bit DPDK builds David Marchand
  4 siblings, 0 replies; 15+ messages in thread
From: Bruce Richardson @ 2024-09-06 16:12 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

When testing the 32-bit x86 build, use a cross-file rather than using
args and pkgconfig environment variable. The advantage of using the
cross-file is that the paths are saved across runs. Without this patch,
while the '-m32' args settings are preserved between meson runs, the
PKG_CONFIG_LIBDIR value from environment is not, which can cause
rebuilds of the build-32b directory to fail if meson needs to do
a reconfiguration first.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 devtools/test-meson-builds.sh | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index d71bb1ded0..4fff1f7177 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -253,21 +253,18 @@ build build-x86-generic cc skipABI -Dcheck_includes=true \
 
 # 32-bit with default compiler
 if check_cc_flags '-m32' ; then
+	target_override='i386-pc-linux-gnu'
 	if [ -d '/usr/lib/i386-linux-gnu' ] ; then
-		# 32-bit pkgconfig on Debian/Ubuntu
-		export PKG_CONFIG_LIBDIR='/usr/lib/i386-linux-gnu/pkgconfig'
+		# 32-bit pkgconfig on Debian/Ubuntu, use cross file
+		build build-32b $srcdir/config/x86/cross-32bit-debian.ini ABI
 	elif [ -d '/usr/lib32' ] ; then
 		# 32-bit pkgconfig on Arch
-		export PKG_CONFIG_LIBDIR='/usr/lib32/pkgconfig'
+		build build-32b $srcdir/config/x86/cross-32bit-arch.ini ABI
 	else
 		# 32-bit pkgconfig on RHEL/Fedora (lib vs lib64)
-		export PKG_CONFIG_LIBDIR='/usr/lib/pkgconfig'
+		build build-32b $srcdir/config/x86/cross-32bit-fedora.ini ABI
 	fi
-	target_override='i386-pc-linux-gnu'
-	build build-32b cc ABI -Dc_args='-m32' -Dc_link_args='-m32' \
-			-Dcpp_args='-m32' -Dcpp_link_args='-m32'
 	target_override=
-	unset PKG_CONFIG_LIBDIR
 fi
 
 # x86 MinGW
-- 
2.43.0


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

* Re: [PATCH v2 0/4] simplify doing 32-bit DPDK builds
  2024-09-06 16:12 ` [PATCH v2 0/4] simplify doing 32-bit DPDK builds Bruce Richardson
                     ` (3 preceding siblings ...)
  2024-09-06 16:12   ` [PATCH v2 4/4] devtools/test-meson-builds: use cross files for 32bit build Bruce Richardson
@ 2024-09-19  7:44   ` David Marchand
  2024-09-19  7:52     ` Bruce Richardson
  2024-09-19  8:02     ` Bruce Richardson
  4 siblings, 2 replies; 15+ messages in thread
From: David Marchand @ 2024-09-19  7:44 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

On Fri, Sep 6, 2024 at 6:13 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> To make it easier to build and test DPDK on 32-bit x86 add a set of
> cross-compile ini files for a number of common linux distributions.
> This avoids the user having to remember strange meson incantations
> with '-m32' in various args values and with the PKG_CONFIG_LIBDIR
> overridden in the environment.
>
> Bruce Richardson (4):
>   config: add 32-bit x86 debian cross-compilation file
>   config: add fedora 32-bit x86 cross-compile file
>   config: add arch 32-bit cross-compilation file
>   devtools/test-meson-builds: use cross files for 32bit build
>
>  config/x86/cross-32bit-arch.ini   | 22 ++++++++++++++++++++++
>  config/x86/cross-32bit-debian.ini | 22 ++++++++++++++++++++++
>  config/x86/cross-32bit-fedora.ini | 22 ++++++++++++++++++++++
>  devtools/test-meson-builds.sh     | 13 +++++--------
>  4 files changed, 71 insertions(+), 8 deletions(-)
>  create mode 100644 config/x86/cross-32bit-arch.ini
>  create mode 100644 config/x86/cross-32bit-debian.ini
>  create mode 100644 config/x86/cross-32bit-fedora.ini

I tried to convert the GHA script to use the debian cross file
introduced in the series:

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 15ed51e4c1..cec8742ed1 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -54,6 +54,10 @@ if [ "$AARCH64" = "true" ]; then
     fi
 fi

+if [ "$BUILD_32BIT" = "true" ]; then
+    cross_file=config/x86/cross-32bit-debian.ini
+fi
+
 if [ "$MINGW" = "true" ]; then
     cross_file=config/x86/cross-mingw
 fi
@@ -76,12 +80,6 @@ if [ "$BUILD_DOCS" = "true" ]; then
     OPTS="$OPTS -Denable_docs=true"
 fi

-if [ "$BUILD_32BIT" = "true" ]; then
-    OPTS="$OPTS -Dc_args=-m32 -Dc_link_args=-m32"
-    OPTS="$OPTS -Dcpp_args=-m32 -Dcpp_link_args=-m32"
-    export PKG_CONFIG_LIBDIR="/usr/lib32/pkgconfig"
-fi
-
 if [ "$MINGW" = "true" ]; then
     OPTS="$OPTS -Dexamples=helloworld"
 elif [ "$DEF_LIB" = "static" ]; then

I was then surprised to read the result:
...
2024-09-19T07:22:12.6485260Z Checking for size of "void *" : 8
2024-09-19T07:22:12.6485592Z Checking for size of "void *" : 8
...


*scratch* *scratch*
So I retested the series locally on my f39 (the series seemed ok so
far) but I downgraded meson to 0.53.2 (which is the version forced in
GHA) and now I observe the same issue.

I suspect something changed in the cross file handling in more recent
meson versions.
Likely, the c_args= or [build-in options] part is not read.

Am I doing something wrong?


-- 
David Marchand


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

* Re: [PATCH v2 0/4] simplify doing 32-bit DPDK builds
  2024-09-19  7:44   ` [PATCH v2 0/4] simplify doing 32-bit DPDK builds David Marchand
@ 2024-09-19  7:52     ` Bruce Richardson
  2024-09-19  8:02     ` Bruce Richardson
  1 sibling, 0 replies; 15+ messages in thread
From: Bruce Richardson @ 2024-09-19  7:52 UTC (permalink / raw)
  To: David Marchand; +Cc: dev

On Thu, Sep 19, 2024 at 09:44:18AM +0200, David Marchand wrote:
> On Fri, Sep 6, 2024 at 6:13 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > To make it easier to build and test DPDK on 32-bit x86 add a set of
> > cross-compile ini files for a number of common linux distributions.
> > This avoids the user having to remember strange meson incantations
> > with '-m32' in various args values and with the PKG_CONFIG_LIBDIR
> > overridden in the environment.
> >
> > Bruce Richardson (4):
> >   config: add 32-bit x86 debian cross-compilation file
> >   config: add fedora 32-bit x86 cross-compile file
> >   config: add arch 32-bit cross-compilation file
> >   devtools/test-meson-builds: use cross files for 32bit build
> >
> >  config/x86/cross-32bit-arch.ini   | 22 ++++++++++++++++++++++
> >  config/x86/cross-32bit-debian.ini | 22 ++++++++++++++++++++++
> >  config/x86/cross-32bit-fedora.ini | 22 ++++++++++++++++++++++
> >  devtools/test-meson-builds.sh     | 13 +++++--------
> >  4 files changed, 71 insertions(+), 8 deletions(-)
> >  create mode 100644 config/x86/cross-32bit-arch.ini
> >  create mode 100644 config/x86/cross-32bit-debian.ini
> >  create mode 100644 config/x86/cross-32bit-fedora.ini
> 
> I tried to convert the GHA script to use the debian cross file
> introduced in the series:
> 
> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
> index 15ed51e4c1..cec8742ed1 100755
> --- a/.ci/linux-build.sh
> +++ b/.ci/linux-build.sh
> @@ -54,6 +54,10 @@ if [ "$AARCH64" = "true" ]; then
>      fi
>  fi
> 
> +if [ "$BUILD_32BIT" = "true" ]; then
> +    cross_file=config/x86/cross-32bit-debian.ini
> +fi
> +
>  if [ "$MINGW" = "true" ]; then
>      cross_file=config/x86/cross-mingw
>  fi
> @@ -76,12 +80,6 @@ if [ "$BUILD_DOCS" = "true" ]; then
>      OPTS="$OPTS -Denable_docs=true"
>  fi
> 
> -if [ "$BUILD_32BIT" = "true" ]; then
> -    OPTS="$OPTS -Dc_args=-m32 -Dc_link_args=-m32"
> -    OPTS="$OPTS -Dcpp_args=-m32 -Dcpp_link_args=-m32"
> -    export PKG_CONFIG_LIBDIR="/usr/lib32/pkgconfig"
> -fi
> -
>  if [ "$MINGW" = "true" ]; then
>      OPTS="$OPTS -Dexamples=helloworld"
>  elif [ "$DEF_LIB" = "static" ]; then
> 
> I was then surprised to read the result:
> ...
> 2024-09-19T07:22:12.6485260Z Checking for size of "void *" : 8
> 2024-09-19T07:22:12.6485592Z Checking for size of "void *" : 8
> ...
> 
> 
> *scratch* *scratch*
> So I retested the series locally on my f39 (the series seemed ok so
> far) but I downgraded meson to 0.53.2 (which is the version forced in
> GHA) and now I observe the same issue.
> 
> I suspect something changed in the cross file handling in more recent
> meson versions.
> Likely, the c_args= or [build-in options] part is not read.
> 
> Am I doing something wrong?
> 

I don't think you are doing anything wrong. Let me check for cross-file
handling in the meson docs. On my side, I've been using this cross-file for
my test builds for the last couple of weeks without issues. I'm using
latest meson, but it's been much more reliable for me than the previous
method, which required me to occasionally delete the build-32b directory.

/Bruce

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

* Re: [PATCH v2 0/4] simplify doing 32-bit DPDK builds
  2024-09-19  7:44   ` [PATCH v2 0/4] simplify doing 32-bit DPDK builds David Marchand
  2024-09-19  7:52     ` Bruce Richardson
@ 2024-09-19  8:02     ` Bruce Richardson
  2024-09-19  8:08       ` David Marchand
  1 sibling, 1 reply; 15+ messages in thread
From: Bruce Richardson @ 2024-09-19  8:02 UTC (permalink / raw)
  To: David Marchand; +Cc: dev

On Thu, Sep 19, 2024 at 09:44:18AM +0200, David Marchand wrote:
> On Fri, Sep 6, 2024 at 6:13 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > To make it easier to build and test DPDK on 32-bit x86 add a set of
> > cross-compile ini files for a number of common linux distributions.
> > This avoids the user having to remember strange meson incantations
> > with '-m32' in various args values and with the PKG_CONFIG_LIBDIR
> > overridden in the environment.
> >
> > Bruce Richardson (4):
> >   config: add 32-bit x86 debian cross-compilation file
> >   config: add fedora 32-bit x86 cross-compile file
> >   config: add arch 32-bit cross-compilation file
> >   devtools/test-meson-builds: use cross files for 32bit build
> >
> >  config/x86/cross-32bit-arch.ini   | 22 ++++++++++++++++++++++
> >  config/x86/cross-32bit-debian.ini | 22 ++++++++++++++++++++++
> >  config/x86/cross-32bit-fedora.ini | 22 ++++++++++++++++++++++
> >  devtools/test-meson-builds.sh     | 13 +++++--------
> >  4 files changed, 71 insertions(+), 8 deletions(-)
> >  create mode 100644 config/x86/cross-32bit-arch.ini
> >  create mode 100644 config/x86/cross-32bit-debian.ini
> >  create mode 100644 config/x86/cross-32bit-fedora.ini
> 
> I tried to convert the GHA script to use the debian cross file
> introduced in the series:
> 
> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
> index 15ed51e4c1..cec8742ed1 100755
> --- a/.ci/linux-build.sh
> +++ b/.ci/linux-build.sh
> @@ -54,6 +54,10 @@ if [ "$AARCH64" = "true" ]; then
>      fi
>  fi
> 
> +if [ "$BUILD_32BIT" = "true" ]; then
> +    cross_file=config/x86/cross-32bit-debian.ini
> +fi
> +
>  if [ "$MINGW" = "true" ]; then
>      cross_file=config/x86/cross-mingw
>  fi
> @@ -76,12 +80,6 @@ if [ "$BUILD_DOCS" = "true" ]; then
>      OPTS="$OPTS -Denable_docs=true"
>  fi
> 
> -if [ "$BUILD_32BIT" = "true" ]; then
> -    OPTS="$OPTS -Dc_args=-m32 -Dc_link_args=-m32"
> -    OPTS="$OPTS -Dcpp_args=-m32 -Dcpp_link_args=-m32"
> -    export PKG_CONFIG_LIBDIR="/usr/lib32/pkgconfig"
> -fi
> -
>  if [ "$MINGW" = "true" ]; then
>      OPTS="$OPTS -Dexamples=helloworld"
>  elif [ "$DEF_LIB" = "static" ]; then
> 
> I was then surprised to read the result:
> ...
> 2024-09-19T07:22:12.6485260Z Checking for size of "void *" : 8
> 2024-09-19T07:22:12.6485592Z Checking for size of "void *" : 8
> ...
> 
> 
> *scratch* *scratch*
> So I retested the series locally on my f39 (the series seemed ok so
> far) but I downgraded meson to 0.53.2 (which is the version forced in
> GHA) and now I observe the same issue.
> 
> I suspect something changed in the cross file handling in more recent
> meson versions.
> Likely, the c_args= or [build-in options] part is not read.
> 
> Am I doing something wrong?
> 
From the docs on cross-files [1], it appears that significant changes to
the cross-file handling was done in 0.56 release. That may be the cause.
I'll have to try some testing myself.

Overall, I think we haven't increased our minimum meson version in some
time. Maybe it's time to consider doing so in this release or the next one?
Need to look through release notes to see how far forward to jump to see
what extra features might be useful for us to leverage.

/Bruce

[1] https://mesonbuild.com/Machine-files.html

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

* Re: [PATCH v2 0/4] simplify doing 32-bit DPDK builds
  2024-09-19  8:02     ` Bruce Richardson
@ 2024-09-19  8:08       ` David Marchand
  2024-09-19 11:15         ` Bruce Richardson
  0 siblings, 1 reply; 15+ messages in thread
From: David Marchand @ 2024-09-19  8:08 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

On Thu, Sep 19, 2024 at 10:02 AM Bruce Richardson
<bruce.richardson@intel.com> wrote:
> Overall, I think we haven't increased our minimum meson version in some
> time. Maybe it's time to consider doing so in this release or the next one?
> Need to look through release notes to see how far forward to jump to see
> what extra features might be useful for us to leverage.

That's an option, just be careful that there is some tie with python
versions iirc.


-- 
David Marchand


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

* Re: [PATCH v2 0/4] simplify doing 32-bit DPDK builds
  2024-09-19  8:08       ` David Marchand
@ 2024-09-19 11:15         ` Bruce Richardson
  2024-09-19 11:32           ` David Marchand
  0 siblings, 1 reply; 15+ messages in thread
From: Bruce Richardson @ 2024-09-19 11:15 UTC (permalink / raw)
  To: David Marchand; +Cc: dev

On Thu, Sep 19, 2024 at 10:08:21AM +0200, David Marchand wrote:
> On Thu, Sep 19, 2024 at 10:02 AM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> > Overall, I think we haven't increased our minimum meson version in some
> > time. Maybe it's time to consider doing so in this release or the next one?
> > Need to look through release notes to see how far forward to jump to see
> > what extra features might be useful for us to leverage.
> 
> That's an option, just be careful that there is some tie with python
> versions iirc.
> 
Right. Do we have a minimum python version from various distros that we
need to support?

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

* Re: [PATCH v2 0/4] simplify doing 32-bit DPDK builds
  2024-09-19 11:15         ` Bruce Richardson
@ 2024-09-19 11:32           ` David Marchand
  2024-09-19 12:09             ` Robin Jarry
  0 siblings, 1 reply; 15+ messages in thread
From: David Marchand @ 2024-09-19 11:32 UTC (permalink / raw)
  To: Bruce Richardson, Robin Jarry; +Cc: dev

On Thu, Sep 19, 2024 at 1:15 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Thu, Sep 19, 2024 at 10:08:21AM +0200, David Marchand wrote:
> > On Thu, Sep 19, 2024 at 10:02 AM Bruce Richardson
> > <bruce.richardson@intel.com> wrote:
> > > Overall, I think we haven't increased our minimum meson version in some
> > > time. Maybe it's time to consider doing so in this release or the next one?
> > > Need to look through release notes to see how far forward to jump to see
> > > what extra features might be useful for us to leverage.
> >
> > That's an option, just be careful that there is some tie with python
> > versions iirc.
> >
> Right. Do we have a minimum python version from various distros that we
> need to support?

We have a minimum version (3.6) in DPDK, harder to tell with all the
distros around.
Robin, any idea/guidance?


-- 
David Marchand


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

* Re: [PATCH v2 0/4] simplify doing 32-bit DPDK builds
  2024-09-19 11:32           ` David Marchand
@ 2024-09-19 12:09             ` Robin Jarry
  2024-09-19 12:57               ` Bruce Richardson
  0 siblings, 1 reply; 15+ messages in thread
From: Robin Jarry @ 2024-09-19 12:09 UTC (permalink / raw)
  To: David Marchand, Bruce Richardson; +Cc: dev

David Marchand, Sep 19, 2024 at 13:32:
> On Thu, Sep 19, 2024 at 1:15 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > On Thu, Sep 19, 2024 at 10:08:21AM +0200, David Marchand wrote:
> > > On Thu, Sep 19, 2024 at 10:02 AM Bruce Richardson
> > > <bruce.richardson@intel.com> wrote:
> > > > Overall, I think we haven't increased our minimum meson version in some
> > > > time. Maybe it's time to consider doing so in this release or the next one?
> > > > Need to look through release notes to see how far forward to jump to see
> > > > what extra features might be useful for us to leverage.
> > >
> > > That's an option, just be careful that there is some tie with python
> > > versions iirc.
> > >
> > Right. Do we have a minimum python version from various distros that we
> > need to support?
>
> We have a minimum version (3.6) in DPDK, harder to tell with all the
> distros around.
> Robin, any idea/guidance?

3.6 is really old. I think it is safe to bump it to at least 3.9.

https://repology.org/project/python/badges

It depends how backwards compatible DPDK wants to remain.


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

* Re: [PATCH v2 0/4] simplify doing 32-bit DPDK builds
  2024-09-19 12:09             ` Robin Jarry
@ 2024-09-19 12:57               ` Bruce Richardson
  0 siblings, 0 replies; 15+ messages in thread
From: Bruce Richardson @ 2024-09-19 12:57 UTC (permalink / raw)
  To: Robin Jarry; +Cc: David Marchand, dev

On Thu, Sep 19, 2024 at 02:09:20PM +0200, Robin Jarry wrote:
> David Marchand, Sep 19, 2024 at 13:32:
> > On Thu, Sep 19, 2024 at 1:15 PM Bruce Richardson
> > <bruce.richardson@intel.com> wrote:
> > >
> > > On Thu, Sep 19, 2024 at 10:08:21AM +0200, David Marchand wrote:
> > > > On Thu, Sep 19, 2024 at 10:02 AM Bruce Richardson
> > > > <bruce.richardson@intel.com> wrote:
> > > > > Overall, I think we haven't increased our minimum meson version in some
> > > > > time. Maybe it's time to consider doing so in this release or the next one?
> > > > > Need to look through release notes to see how far forward to jump to see
> > > > > what extra features might be useful for us to leverage.
> > > >
> > > > That's an option, just be careful that there is some tie with python
> > > > versions iirc.
> > > >
> > > Right. Do we have a minimum python version from various distros that we
> > > need to support?
> > 
> > We have a minimum version (3.6) in DPDK, harder to tell with all the
> > distros around.
> > Robin, any idea/guidance?
> 
> 3.6 is really old. I think it is safe to bump it to at least 3.9.
> 
> https://repology.org/project/python/badges
> 
> It depends how backwards compatible DPDK wants to remain.
> 
Looking down that list at the link, I would agree that 3.9 is a good
minimum. That covers us for all the distros we care about, I think.

/Bruce

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

end of thread, other threads:[~2024-09-19 12:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-04 13:57 [PATCH] config: add 32-bit cross-compilation x86 target Bruce Richardson
2024-09-06 15:34 ` Medvedkin, Vladimir
2024-09-06 16:12 ` [PATCH v2 0/4] simplify doing 32-bit DPDK builds Bruce Richardson
2024-09-06 16:12   ` [PATCH v2 1/4] config: add 32-bit x86 debian cross-compilation file Bruce Richardson
2024-09-06 16:12   ` [PATCH v2 2/4] config: add fedora 32-bit x86 cross-compile file Bruce Richardson
2024-09-06 16:12   ` [PATCH v2 3/4] config: add arch 32-bit cross-compilation file Bruce Richardson
2024-09-06 16:12   ` [PATCH v2 4/4] devtools/test-meson-builds: use cross files for 32bit build Bruce Richardson
2024-09-19  7:44   ` [PATCH v2 0/4] simplify doing 32-bit DPDK builds David Marchand
2024-09-19  7:52     ` Bruce Richardson
2024-09-19  8:02     ` Bruce Richardson
2024-09-19  8:08       ` David Marchand
2024-09-19 11:15         ` Bruce Richardson
2024-09-19 11:32           ` David Marchand
2024-09-19 12:09             ` Robin Jarry
2024-09-19 12:57               ` Bruce Richardson

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).