From: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: "Qiu, Michael" <michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [PATCH 3/3 v2] librte_eal/common: Fix redeclaration of enumerator ‘REG_EAX’
Date: Thu, 05 Mar 2015 19:24:35 +0100 [thread overview]
Message-ID: <2172702.LNYdJ2P2iC@xps13> (raw)
In-Reply-To: <533710CFB86FA344BFBF2D6802E60286CEF29E-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-05 16:31, Qiu, Michael:
> On 2015/3/5 22:39, Thomas Monjalon wrote:
> > 2015-03-05 14:03, Qiu, Michael:
> >> On 3/5/2015 9:54 PM, David Marchand wrote:
> >>> On Thu, Mar 5, 2015 at 2:50 PM, Michael Qiu <michael.qiu-ral2JQCrhuE@public.gmane.orgm
> >>> <mailto:michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>> wrote:
> >>>
> >>> include/rte_cpuflags.h:154:2: error: redeclaration of enumerator
> >>> ‘REG_EAX’
> >>> In file included from /usr/include/signal.h:358:0,
> >>> from /usr/include/sys/wait.h:30,
> >>> from /root/dpdk/app/test/test_mp_secondary.c:50:
> >>> /usr/include/sys/ucontext.h:180:3: note: previous definition of
> >>> ‘REG_EAX’ was here
> >>>
> >>> In i686, from REG_EAX to REG_EDX are all defined in
> >>> /usr/include/sys/ucontext.h
> >>>
> >>> Rename to CPU_REG_EAX to avoid this issue.
> >>>
> >>> Signed-off-by: Michael Qou <michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
> >>> <mailto:michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>>
> >>>
> >>>
> >>> NAK.
> >>>
> >> I have answered in you last thread, please check the mail.
> >>
> >> Yes, but for some reason, it was not include, see /usr/include/signal.h:358
> >>
> >> # include <bits/sigstack.h>
> >> # if defined __USE_XOPEN || defined __USE_XOPEN2K8
> >> /* This will define `ucontext_t' and `mcontext_t'. */
> >> # include <sys/ucontext.h>
> >> # endif
> >>
> >> So only if __USE_XOPEN or __USE_XOPEN2K8 been defined will include
> >> <sys/ucontext.h>
> > So try to define USE_XOPEN.
> >
> >> Why NAK?
> > Because it seems you didn't really try to include system headers.
>
> See below(ucontext.h:25):
> #ifdef __x86_64__
> ...
> #ifdef __USE_GNU
> enmu{
> ...
> REG_RBX,
> # define REG_RBX REG_RBX
> REG_RDX,
> # define REG_RDX REG_RDX
> REG_RAX,
> # define REG_RAX REG_RAX
> REG_RCX,
> # define REG_RCX REG_RCX
> ...
> };
> #endif
> ...
> #else /* !__x86_64__ */
> ...
> #ifdef __USE_GNU
> enmu{
> ...
> REG_EBX,
> # define REG_EBX REG_EBX
> REG_EDX,
> # define REG_EDX REG_EDX
> REG_ECX,
> # define REG_ECX REG_ECX
> REG_EAX,
> # define REG_EAX REG_EAX
> ...
> };
> #endif
> ...
> #endif /* !__x86_64__ */
>
>
> For none x86_64 platform will be defined as REG_E*X, but x86_64 will be
> REG_R*X.
>
> This is why only happens in i686 platform.
>
> Does this clear?
OK thanks.
So it is not possible to use this system header.
It seems your patch is a good approach.
next prev parent reply other threads:[~2015-03-05 18:24 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-05 13:15 [PATCH 0/3] dpdk2.0-rc1 build error fix Michael Qiu
[not found] ` <1425561339-13300-1-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-05 13:15 ` [PATCH 1/3] librte_hash: Fix unsupported instruction `crc32' in i686 platform Michael Qiu
[not found] ` <1425561339-13300-2-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-05 16:10 ` Yerden Zhumabekov
2015-03-05 16:34 ` Qiu, Michael
2015-03-05 16:55 ` [PATCH 1/3 v2] " Michael Qiu
[not found] ` <1425574530-16019-1-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-05 17:02 ` Yerden Zhumabekov
2015-03-05 17:10 ` Thomas Monjalon
2015-03-06 1:39 ` Qiu, Michael
[not found] ` <533710CFB86FA344BFBF2D6802E60286CEF549-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-07 18:39 ` Thomas Monjalon
2015-03-09 5:21 ` Qiu, Michael
2015-03-10 3:55 ` Yerden Zhumabekov
2015-03-19 2:00 ` Qiu, Michael
[not found] ` <533710CFB86FA344BFBF2D6802E60286D1603B-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-19 8:10 ` Thomas Monjalon
2015-03-09 5:58 ` [PATCH 1/3 v3] " Michael Qiu
[not found] ` <1425880685-27424-1-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-18 13:20 ` Liu, Yong
[not found] ` <86228AFD5BCD8E4EBFD2B90117B5E81E10DA603B-0J0gbvR4kTggGBtAFL8yw7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-18 14:59 ` Qiu, Michael
2015-03-05 13:15 ` [PATCH 2/3] app/test: Fix size_t printf formart issue Michael Qiu
[not found] ` <1425561339-13300-3-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-05 13:22 ` Bruce Richardson
2015-03-05 14:00 ` [PATCH 2/3 v2] app/test: Fix size_t printf format issue Michael Qiu
[not found] ` <1425564054-13883-1-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-05 17:27 ` Thomas Monjalon
2015-03-06 1:42 ` Qiu, Michael
2015-03-06 3:53 ` [PATCH 2/3 v3] " Michael Qiu
2015-03-05 13:15 ` [PATCH 3/3] librte_eal/common: Fix redeclaration of enumerator ‘REG_EAX’ Michael Qiu
2015-03-05 13:23 ` Qiu, Michael
[not found] ` <1425561339-13300-4-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-05 13:23 ` Bruce Richardson
2015-03-05 13:36 ` David Marchand
2015-03-05 13:54 ` Qiu, Michael
2015-03-05 13:41 ` Qiu, Michael
2015-03-05 13:50 ` [PATCH 3/3 v2] =?UTF-8?q?librte=5Feal/common:=20Fix=20redeclaration=20of?= =?UTF-8?q?=20enumerator=20=E2=80=98REG=5FEAX=E2=80=99?= Michael Qiu
[not found] ` <1425563425-13647-1-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-05 13:54 ` [PATCH 3/3 v2] librte_eal/common: Fix redeclaration of enumerator ‘REG_EAX’ David Marchand
2015-03-05 14:03 ` Qiu, Michael
[not found] ` <533710CFB86FA344BFBF2D6802E60286CEEF6B-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-05 14:38 ` Thomas Monjalon
2015-03-05 16:31 ` Qiu, Michael
[not found] ` <533710CFB86FA344BFBF2D6802E60286CEF29E-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-05 18:24 ` Thomas Monjalon [this message]
2015-03-05 13:57 ` [PATCH 3/3 v3] =?UTF-8?q?librte=5Feal/common:=20Fix=20redeclaration=20of?= =?UTF-8?q?=20enumerator=20=E2=80=98REG=5FEAX=E2=80=99?= Michael Qiu
[not found] ` <1425563863-13712-1-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-06 6:28 ` [PATCH 3/3 v3] librte_eal/common: Fix redeclaration of enumerator ‘REG_EAX’ David Marchand
2015-03-09 17:04 ` [PATCH 0/3] dpdk2.0-rc1 build error fix Thomas Monjalon
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=2172702.LNYdJ2P2iC@xps13 \
--to=thomas.monjalon-pdr9zngts4eavxtiumwx3w@public.gmane.org \
--cc=dev-VfR2kkLFssw@public.gmane.org \
--cc=michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.