On Sat, Aug 26, 2023 at 02:38:26PM +0000, Ali Alnubani wrote:
> > -----Original Message-----
> > From: Tyler Retzlaff <roret...@linux.microsoft.com>
> > Sent: Friday, August 11, 2023 10:21 PM
> > To: dev@dpdk.org
> > Cc: Bruce Richardson <bruce.richard...@intel.com>; Konstantin Ananyev
> > <konstantin.v.anan...@yandex.ru>; Ciara Power <ciara.po...@intel.com>;
> > NBU-Contact-Thomas Monjalon (EXTERNAL) <tho...@monjalon.net>;
> > david.march...@redhat.com; m...@smartsharesystems.com; Tyler Retzlaff
> > <roret...@linux.microsoft.com>
> > Subject: [PATCH v11 01/16] eal: use rdtsc intrinsic
> > 
> > Inline assembly is not supported for MSVC x64. Convert code to use
> > __rdtsc intrinsic.
> > 
> > Signed-off-by: Tyler Retzlaff <roret...@linux.microsoft.com>
> > Acked-by: Konstantin Ananyev <konstantin.v.anan...@yandex.ru>
> > Acked-by: Morten Brørup <m...@smartsharesystems.com>
> > ---
> 
> Hello,
> 
> This patch is causing a build failure in Windows with Clang 11:

Hi Ali,

while we don't currently document a minimum clang version required to
build the windows port i'm starting to consider establishing policy that
in effect says we may bump the required compiler version on any dpdk
release (not just long term servicing releases). but before doing that
it would be nice to understand if that would cause undue pain on the
port users.

So is there a reason you can't use LLVM 16?

Not that this information helps you but this is the background to what
is breaking here.

The failure here is due to a mistmatch in cv-qualification of the prototype
for __m_prefetchw that comes from clang VS the prototype that comes from the
Windows SDK.

The Windows SDK will not be changed to remove the volatile qualification
and even if it were removed it would be a breaking API change. The LLVM
version of the prototype could be volatile qualified without a breaking
change causing no harm.

Thanks

> 
> """
> [72/803] Compiling C object 
> drivers/common/idpf/6e54547@@idpf_common_avx512_lib@sta/idpf_common_rxtx_avx512.c.obj
> FAILED: 
> drivers/common/idpf/6e54547@@idpf_common_avx512_lib@sta/idpf_common_rxtx_avx512.c.obj
> clang 
> @drivers/common/idpf/6e54547@@idpf_common_avx512_lib@sta/idpf_common_rxtx_avx512.c.obj.rsp
> In file included from ../drivers/common/idpf/idpf_common_rxtx_avx512.c:6:
> In file included from ..\drivers\common\idpf/idpf_common_device.h:9:
> In file included from ..\drivers\common\idpf/base/idpf_prototype.h:9:
> In file included from ..\drivers\common\idpf/base/idpf_osdep.h:18:
> In file included from ..\lib\eal\include\rte_malloc.h:16:
> In file included from ..\lib\eal\include\rte_memory.h:25:
> In file included from ..\lib\eal\include\rte_fbarray.h:39:
> In file included from ..\lib\eal\x86\include\rte_rwlock.h:13:
> In file included from ..\lib\eal\x86\include/rte_spinlock.h:18:
> In file included from ..\lib\eal\x86\include/rte_cycles.h:12:
> In file included from C:\Tools\LLVM\lib\clang\11.0.0\include\x86intrin.h:24:
> C:\Tools\LLVM\lib\clang\11.0.0\include\prfchwintrin.h:50:1: error: 
> conflicting types for '__m_prefetchw'
> _m_prefetchw(void *__P)
> ^
> ..\lib\eal\windows\include\rte_windows.h:28:22: note: expanded from macro 
> '_m_prefetchw'
> #define _m_prefetchw __m_prefetchw
>                      ^
> C:\Program Files (x86)\Windows 
> Kits\10\include\10.0.18362.0\um\winnt.h:3324:1: note: previous declaration is 
> here
> _m_prefetchw (
> ^
> ..\lib\eal\windows\include\rte_windows.h:28:22: note: expanded from macro 
> '_m_prefetchw'
> #define _m_prefetchw __m_prefetchw
>                      ^
> 1 error generated.
> [73/803] Generating rte_bus_auxiliary_def with a custom command
> [74/803] Compiling C object 
> drivers/a715181@@tmp_rte_common_idpf@sta/common_idpf_base_idpf_controlq.c.obj
> [75/803] Compiling C object 
> drivers/a715181@@tmp_rte_common_idpf@sta/common_idpf_idpf_common_rxtx.c.obj
> [76/803] Compiling C object 
> drivers/a715181@@tmp_rte_common_idpf@sta/common_idpf_base_idpf_controlq_setup.c.obj
> [77/803] Generating rte_bus_vdev.pmd.c with a custom command
> [78/803] Compiling C object 
> drivers/a715181@@tmp_rte_bus_pci@sta/bus_pci_pci_params.c.obj
> [79/803] Compiling C object 
> drivers/a715181@@tmp_rte_bus_pci@sta/bus_pci_pci_common.c.obj
> [80/803] Compiling C object 
> drivers/a715181@@tmp_rte_common_idpf@sta/common_idpf_base_idpf_common.c.obj
> [81/803] Compiling C object 
> drivers/a715181@@tmp_rte_common_idpf@sta/common_idpf_idpf_common_virtchnl.c.obj
> ninja: build stopped: subcommand failed.
> """
> 
> Cross build with x86_64-w64-mingw32-gcc 12.2.1 on Fedora Linux doesn't 
> reproduce.
> 
> Regards,
> Ali

Reply via email to