patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 20.11] eal/common: exclude code unsupported on Windows
@ 2021-12-07 14:16 Dmitry Kozlyuk
  2021-12-09  6:07 ` Xueming(Steven) Li
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Kozlyuk @ 2021-12-07 14:16 UTC (permalink / raw)
  To: stable
  Cc: Xueming Li, Dmitry Kozlyuk, Liang Longfeng, Ranjit Menon, William Tu

rte_random.c and hotplug_mp.c are only intended for Unix targets,
but were compiled on Windows due to backporting mistake,
causing an error:

    In file included from ../lib/librte_eal/common/rte_random.c:13:
    [...]
    C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winnt.h:3275:1:
            error: conflicting types for '_m_prefetchw'
    _m_prefetchw (
    ^
    C:\Program Files\LLVM\lib\clang\8.0.0\include\prfchwintrin.h:64:1:
            note: previous definition is here
    _m_prefetchw(void *__P)
    ^
    1 error generated.

hotplug_mp.c was compiled twice, which also caused a link-time error:

    [43/146] Linking target lib/rte_eal-21.dll
    FAILED: lib/rte_eal-21.dll lib/rte_eal-21.pdb
    "clang" @lib/rte_eal-21.dll.rsp
    librte_eal_windows_eal_mp.c.obj : error LNK2005:
            eal_dev_hotplug_request_to_primary already defined
            in librte_eal_common_hotplug_mp.c.obj
    librte_eal_windows_eal_mp.c.obj : error LNK2005:
            eal_dev_hotplug_request_to_secondary already defined
            in librte_eal_common_hotplug_mp.c.obj
       Creating library lib\rte_eal.lib and object lib\rte_eal.exp
    lib\rte_eal-21.dll : fatal error LNK1169:
            one or more multiply defined symbols found
    clang: error: linker command failed with exit code 1169
            (use -v to see invocation)

Compile the files above only for Unix targets.

Bugzilla ID: 894
Fixes: 51a9cd2327f3 ("eal: remove Windows-specific list of common files")

Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/librte_eal/common/meson.build | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build
index e7ea0fd388..7105e8bc4b 100644
--- a/lib/librte_eal/common/meson.build
+++ b/lib/librte_eal/common/meson.build
@@ -29,11 +29,9 @@ sources += files(
 	'eal_common_timer.c',
 	'eal_common_trace_points.c',
 	'eal_common_uuid.c',
-	'hotplug_mp.c',
 	'malloc_elem.c',
 	'malloc_heap.c',
 	'rte_malloc.c',
-	'rte_random.c',
 	'rte_reciprocal.c',
 	'rte_service.c',
 )
@@ -50,6 +48,7 @@ if not is_windows
 		'eal_common_trace_utils.c',
 		'hotplug_mp.c',
 		'malloc_mp.c',
+		'rte_random.c',
 		'rte_keepalive.c',
 	)
 endif
-- 
2.29.3


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

* Re: [PATCH 20.11] eal/common: exclude code unsupported on Windows
  2021-12-07 14:16 [PATCH 20.11] eal/common: exclude code unsupported on Windows Dmitry Kozlyuk
@ 2021-12-09  6:07 ` Xueming(Steven) Li
  0 siblings, 0 replies; 2+ messages in thread
From: Xueming(Steven) Li @ 2021-12-09  6:07 UTC (permalink / raw)
  To: dmitry.kozliuk, stable; +Cc: longfengx.liang, u9012063, ranjit.menon


Thank you, applied.

On Tue, 2021-12-07 at 17:16 +0300, Dmitry Kozlyuk wrote:
> rte_random.c and hotplug_mp.c are only intended for Unix targets,
> but were compiled on Windows due to backporting mistake,
> causing an error:
> 
>     In file included from ../lib/librte_eal/common/rte_random.c:13:
>     [...]
>     C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winnt.h:3275:1:
>             error: conflicting types for '_m_prefetchw'
>     _m_prefetchw (
>     ^
>     C:\Program Files\LLVM\lib\clang\8.0.0\include\prfchwintrin.h:64:1:
>             note: previous definition is here
>     _m_prefetchw(void *__P)
>     ^
>     1 error generated.
> 
> hotplug_mp.c was compiled twice, which also caused a link-time error:
> 
>     [43/146] Linking target lib/rte_eal-21.dll
>     FAILED: lib/rte_eal-21.dll lib/rte_eal-21.pdb
>     "clang" @lib/rte_eal-21.dll.rsp
>     librte_eal_windows_eal_mp.c.obj : error LNK2005:
>             eal_dev_hotplug_request_to_primary already defined
>             in librte_eal_common_hotplug_mp.c.obj
>     librte_eal_windows_eal_mp.c.obj : error LNK2005:
>             eal_dev_hotplug_request_to_secondary already defined
>             in librte_eal_common_hotplug_mp.c.obj
>        Creating library lib\rte_eal.lib and object lib\rte_eal.exp
>     lib\rte_eal-21.dll : fatal error LNK1169:
>             one or more multiply defined symbols found
>     clang: error: linker command failed with exit code 1169
>             (use -v to see invocation)
> 
> Compile the files above only for Unix targets.
> 
> Bugzilla ID: 894
> Fixes: 51a9cd2327f3 ("eal: remove Windows-specific list of common files")
> 
> Reported-by: Liang Longfeng <longfengx.liang@intel.com>
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> ---
>  lib/librte_eal/common/meson.build | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build
> index e7ea0fd388..7105e8bc4b 100644
> --- a/lib/librte_eal/common/meson.build
> +++ b/lib/librte_eal/common/meson.build
> @@ -29,11 +29,9 @@ sources += files(
>  	'eal_common_timer.c',
>  	'eal_common_trace_points.c',
>  	'eal_common_uuid.c',
> -	'hotplug_mp.c',
>  	'malloc_elem.c',
>  	'malloc_heap.c',
>  	'rte_malloc.c',
> -	'rte_random.c',
>  	'rte_reciprocal.c',
>  	'rte_service.c',
>  )
> @@ -50,6 +48,7 @@ if not is_windows
>  		'eal_common_trace_utils.c',
>  		'hotplug_mp.c',
>  		'malloc_mp.c',
> +		'rte_random.c',
>  		'rte_keepalive.c',
>  	)
>  endif


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

end of thread, other threads:[~2021-12-09  6:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-07 14:16 [PATCH 20.11] eal/common: exclude code unsupported on Windows Dmitry Kozlyuk
2021-12-09  6:07 ` Xueming(Steven) Li

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