mldev: disable build on Windows

Message ID 20230310090717.1470032-1-david.marchand@redhat.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series mldev: disable build on Windows |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-testing warning apply patch failure

Commit Message

David Marchand March 10, 2023, 9:07 a.m. UTC
  Caught by UNH lab, Windows compilation is broken because of symbol
exports:
rte_mldev_exports.def : error LNK2001: unresolved external symbol
	rte_ml_io_bfloat16_to_float32
rte_mldev_exports.def : error LNK2001: unresolved external symbol
	rte_ml_io_float16_to_float32
rte_mldev_exports.def : error LNK2001: unresolved external symbol
	rte_ml_io_float32_to_bfloat16
rte_mldev_exports.def : error LNK2001: unresolved external symbol
	rte_ml_io_float32_to_float16
rte_mldev_exports.def : error LNK2001: unresolved external symbol
	rte_ml_io_float32_to_int16
rte_mldev_exports.def : error LNK2001: unresolved external symbol
	rte_ml_io_float32_to_int8
rte_mldev_exports.def : error LNK2001: unresolved external symbol
	rte_ml_io_float32_to_uint16
rte_mldev_exports.def : error LNK2001: unresolved external symbol
	rte_ml_io_float32_to_uint8
rte_mldev_exports.def : error LNK2001: unresolved external symbol
	rte_ml_io_int16_to_float32
rte_mldev_exports.def : error LNK2001: unresolved external symbol
	rte_ml_io_int8_to_float32
rte_mldev_exports.def : error LNK2001: unresolved external symbol
	rte_ml_io_uint16_to_float32
rte_mldev_exports.def : error LNK2001: unresolved external symbol
	rte_ml_io_uint8_to_float32

Disable Windows build until this is fixed.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/mldev/meson.build | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Thomas Monjalon March 10, 2023, 9:18 a.m. UTC | #1
The build breaks because of the weak symbols, so we can define this cause:

Fixes: 9637de38a2e3 ("mldev: add scalar type conversion")


10/03/2023 10:07, David Marchand:
> --- a/lib/mldev/meson.build
> +++ b/lib/mldev/meson.build
> +if is_windows
> +    subdir_done()
> +endif

More complete handling:

if is_windows
    build = false
    reason = 'not supported on Windows'
    subdir_done()
endif
  
David Marchand March 10, 2023, 9:19 a.m. UTC | #2
On Fri, Mar 10, 2023 at 10:18 AM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> The build breaks because of the weak symbols, so we can define this cause:
>
> Fixes: 9637de38a2e3 ("mldev: add scalar type conversion")

I was not 100% sure but it seems the best one yes.

>
> 10/03/2023 10:07, David Marchand:
> > --- a/lib/mldev/meson.build
> > +++ b/lib/mldev/meson.build
> > +if is_windows
> > +    subdir_done()
> > +endif
>
> More complete handling:
>
> if is_windows
>     build = false
>     reason = 'not supported on Windows'
>     subdir_done()
> endif

Indeed... v2 in progress.
  
Tyler Retzlaff March 10, 2023, 8:06 p.m. UTC | #3
On Fri, Mar 10, 2023 at 10:07:17AM +0100, David Marchand wrote:
> Caught by UNH lab, Windows compilation is broken because of symbol
> exports:
> rte_mldev_exports.def : error LNK2001: unresolved external symbol
> 	rte_ml_io_bfloat16_to_float32
> rte_mldev_exports.def : error LNK2001: unresolved external symbol
> 	rte_ml_io_float16_to_float32
> rte_mldev_exports.def : error LNK2001: unresolved external symbol
> 	rte_ml_io_float32_to_bfloat16
> rte_mldev_exports.def : error LNK2001: unresolved external symbol
> 	rte_ml_io_float32_to_float16
> rte_mldev_exports.def : error LNK2001: unresolved external symbol
> 	rte_ml_io_float32_to_int16
> rte_mldev_exports.def : error LNK2001: unresolved external symbol
> 	rte_ml_io_float32_to_int8
> rte_mldev_exports.def : error LNK2001: unresolved external symbol
> 	rte_ml_io_float32_to_uint16
> rte_mldev_exports.def : error LNK2001: unresolved external symbol
> 	rte_ml_io_float32_to_uint8
> rte_mldev_exports.def : error LNK2001: unresolved external symbol
> 	rte_ml_io_int16_to_float32
> rte_mldev_exports.def : error LNK2001: unresolved external symbol
> 	rte_ml_io_int8_to_float32
> rte_mldev_exports.def : error LNK2001: unresolved external symbol
> 	rte_ml_io_uint16_to_float32
> rte_mldev_exports.def : error LNK2001: unresolved external symbol
> 	rte_ml_io_uint8_to_float32
> 
> Disable Windows build until this is fixed.

is someone committed to do this?
  
Stephen Hemminger March 10, 2023, 10:54 p.m. UTC | #4
On Fri, 10 Mar 2023 12:06:35 -0800
Tyler Retzlaff <roretzla@linux.microsoft.com> wrote:

> On Fri, Mar 10, 2023 at 10:07:17AM +0100, David Marchand wrote:
> > Caught by UNH lab, Windows compilation is broken because of symbol
> > exports:
> > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > 	rte_ml_io_bfloat16_to_float32
> > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > 	rte_ml_io_float16_to_float32
> > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > 	rte_ml_io_float32_to_bfloat16
> > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > 	rte_ml_io_float32_to_float16
> > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > 	rte_ml_io_float32_to_int16
> > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > 	rte_ml_io_float32_to_int8
> > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > 	rte_ml_io_float32_to_uint16
> > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > 	rte_ml_io_float32_to_uint8
> > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > 	rte_ml_io_int16_to_float32
> > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > 	rte_ml_io_int8_to_float32
> > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > 	rte_ml_io_uint16_to_float32
> > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > 	rte_ml_io_uint8_to_float32
> > 
> > Disable Windows build until this is fixed.  
> 
> is someone committed to do this?
> 

This is not hard to fix, please fix the Windows build rather than disabling.
  
Thomas Monjalon March 11, 2023, 8:11 a.m. UTC | #5
10/03/2023 23:54, Stephen Hemminger:
> On Fri, 10 Mar 2023 12:06:35 -0800
> Tyler Retzlaff <roretzla@linux.microsoft.com> wrote:
> 
> > On Fri, Mar 10, 2023 at 10:07:17AM +0100, David Marchand wrote:
> > > Caught by UNH lab, Windows compilation is broken because of symbol
> > > exports:
> > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > 	rte_ml_io_bfloat16_to_float32
> > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > 	rte_ml_io_float16_to_float32
> > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > 	rte_ml_io_float32_to_bfloat16
> > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > 	rte_ml_io_float32_to_float16
> > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > 	rte_ml_io_float32_to_int16
> > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > 	rte_ml_io_float32_to_int8
> > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > 	rte_ml_io_float32_to_uint16
> > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > 	rte_ml_io_float32_to_uint8
> > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > 	rte_ml_io_int16_to_float32
> > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > 	rte_ml_io_int8_to_float32
> > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > 	rte_ml_io_uint16_to_float32
> > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > 	rte_ml_io_uint8_to_float32
> > > 
> > > Disable Windows build until this is fixed.  
> > 
> > is someone committed to do this?
> 
> This is not hard to fix, please fix the Windows build rather than disabling.

I think we may need to change how the NEON implementation is selected,
without using weak references.

Feel free to submit a patch.
  
Srikanth Yalavarthi March 11, 2023, 2:53 p.m. UTC | #6
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: 11 March 2023 13:42
> To: Tyler Retzlaff <roretzla@linux.microsoft.com>; Stephen Hemminger
> <stephen@networkplumber.org>
> Cc: dev@dpdk.org; David Marchand <david.marchand@redhat.com>;
> dev@dpdk.org; Srikanth Yalavarthi <syalavarthi@marvell.com>
> Subject: [EXT] Re: [PATCH] mldev: disable build on Windows
> 
> External Email
> 
> ----------------------------------------------------------------------
> 10/03/2023 23:54, Stephen Hemminger:
> > On Fri, 10 Mar 2023 12:06:35 -0800
> > Tyler Retzlaff <roretzla@linux.microsoft.com> wrote:
> >
> > > On Fri, Mar 10, 2023 at 10:07:17AM +0100, David Marchand wrote:
> > > > Caught by UNH lab, Windows compilation is broken because of symbol
> > > > exports:
> > > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > > 	rte_ml_io_bfloat16_to_float32
> > > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > > 	rte_ml_io_float16_to_float32
> > > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > > 	rte_ml_io_float32_to_bfloat16
> > > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > > 	rte_ml_io_float32_to_float16
> > > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > > 	rte_ml_io_float32_to_int16
> > > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > > 	rte_ml_io_float32_to_int8
> > > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > > 	rte_ml_io_float32_to_uint16
> > > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > > 	rte_ml_io_float32_to_uint8
> > > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > > 	rte_ml_io_int16_to_float32
> > > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > > 	rte_ml_io_int8_to_float32
> > > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > > 	rte_ml_io_uint16_to_float32
> > > > rte_mldev_exports.def : error LNK2001: unresolved external symbol
> > > > 	rte_ml_io_uint8_to_float32
> > > >
> > > > Disable Windows build until this is fixed.
> > >
> > > is someone committed to do this?
> >
> > This is not hard to fix, please fix the Windows build rather than disabling.
> 
> I think we may need to change how the NEON implementation is selected,
> without using weak references.
> 
> Feel free to submit a patch.
> 

I have submitted a patch to remove weak symbols and enable windows build. I could run windows build with MinGW-w64, but not a native build.
http://patches.dpdk.org/project/dpdk/patch/20230311145056.16386-1-syalavarthi@marvell.com/
  

Patch

diff --git a/lib/mldev/meson.build b/lib/mldev/meson.build
index 23d108617d..42ee309870 100644
--- a/lib/mldev/meson.build
+++ b/lib/mldev/meson.build
@@ -1,6 +1,10 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright (c) 2022 Marvell.
 
+if is_windows
+    subdir_done()
+endif
+
 sources = files(
         'rte_mldev_pmd.c',
         'rte_mldev.c',