From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: stable@dpdk.org
Cc: Xueming Li <xuemingl@nvidia.com>,
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
Liang Longfeng <longfengx.liang@intel.com>,
Ranjit Menon <ranjit.menon@intel.com>,
William Tu <u9012063@gmail.com>
Subject: [PATCH 20.11] eal/common: exclude code unsupported on Windows
Date: Tue, 7 Dec 2021 17:16:44 +0300 [thread overview]
Message-ID: <20211207141644.369624-1-dmitry.kozliuk@gmail.com> (raw)
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
next reply other threads:[~2021-12-07 14:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 14:16 Dmitry Kozlyuk [this message]
2021-12-09 6:07 ` Xueming(Steven) Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211207141644.369624-1-dmitry.kozliuk@gmail.com \
--to=dmitry.kozliuk@gmail.com \
--cc=longfengx.liang@intel.com \
--cc=ranjit.menon@intel.com \
--cc=stable@dpdk.org \
--cc=u9012063@gmail.com \
--cc=xuemingl@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).