From: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
To: "Varghese, Vipin" <Vipin.Varghese@amd.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"roretzla@linux.microsoft.com" <roretzla@linux.microsoft.com>,
"bruce.richardson@intel.com" <bruce.richardson@intel.com>,
"john.mcnamara@intel.com" <john.mcnamara@intel.com>,
"dmitry.kozliuk@gmail.com" <dmitry.kozliuk@gmail.com>,
Jerin Jacob <jerinj@marvell.com>
Cc: "ruifeng.wang@arm.com" <ruifeng.wang@arm.com>,
"mattias.ronnblom@ericsson.com" <mattias.ronnblom@ericsson.com>,
"anatoly.burakov@intel.com" <anatoly.burakov@intel.com>,
"stephen@networkplumber.org" <stephen@networkplumber.org>,
"Yigit, Ferruh" <Ferruh.Yigit@amd.com>,
"honnappa.nagarahalli@arm.com" <honnappa.nagarahalli@arm.com>,
"wathsala.vithanage@arm.com" <wathsala.vithanage@arm.com>,
"konstantin.ananyev@huawei.com" <konstantin.ananyev@huawei.com>
Subject: RE: [EXTERNAL] [RFC v3 3/3] examples: add lcore topology API calls
Date: Wed, 30 Oct 2024 19:34:35 +0000 [thread overview]
Message-ID: <PH0PR18MB40864F7AF99F77C658795002DE542@PH0PR18MB4086.namprd18.prod.outlook.com> (raw)
In-Reply-To: <PH7PR12MB8596008877823F2C50B6347682542@PH7PR12MB8596.namprd12.prod.outlook.com>
> > Hi Pavan,
> >
> > Snipped
> >
> > >
> > > I see compilation failure on ARM platforms due to missing header include.
> > >
> > > ../examples/helloworld/main.c: In function 'parse_topology':
> > > ../examples/helloworld/main.c:83:13: error: implicit declaration of
> > > function 'strtoul'; did you mean 'strtok'? [-Wimplicit-function-declaration]
> > > 83 | n = strtoul(q_arg, &end, 10);
> > > | ^~~~~~~
> > > | strtok
> > > ../examples/helloworld/main.c:83:13: warning: nested extern
> > > declaration of 'strtoul' [- Wnested-externs]
> > > ../examples/helloworld/main.c: In function 'helloworld_parse_args':
> > > ../examples/helloworld/main.c:115:42: error: 'EXIT_FAILURE' undeclared
> > > (first use in this function)
> > > 115 | rte_exit(EXIT_FAILURE, "Invalid Topology
> > selection\n");
> > > | ^~~~~~~~~~~~
> > > ../examples/helloworld/main.c:13:1: note: 'EXIT_FAILURE' is defined in
> > > header '<stdlib.h>'; this is probably fixable by adding '#include <stdlib.h>'
> > > 12 | #include <rte_memory.h>
> > > +++ |+#include <stdlib.h>
> > > 13 | #include <rte_launch.h>
> > > ../examples/helloworld/main.c:115:42: note: each undeclared identifier
> > > is reported only once for each function it appears in
> > > 115 | rte_exit(EXIT_FAILURE, "Invalid Topology
> > selection\n");
> > > | ^~~~~~~~~~~~
> > > ../examples/helloworld/main.c: In function 'main':
> > > ../examples/helloworld/main.c:153:26: error: 'EXIT_FAILURE' undeclared
> > > (first use in this function)
> > > 153 | rte_exit(EXIT_FAILURE, "Invalid arguments\n");
> > > | ^~~~~~~~~~~~
> > > ../examples/helloworld/main.c:153:26: note: 'EXIT_FAILURE' is defined
> > > in header '<stdlib.h>'; thi
> > >
> > > Below header include should fix it.
> > >
> > > diff --git a/examples/helloworld/main.c b/examples/helloworld/main.c
> > > index
> > > 9845c3775c3a..f49bd0108f74 100644
> > > --- a/examples/helloworld/main.c
> > > +++ b/examples/helloworld/main.c
> > > @@ -3,6 +3,7 @@
> > > */
> > >
> > > #include <stdio.h>
> > > +#include <stdlib.h>
> > > #include <string.h>
> > > #include <stdint.h>
> > > #include <errno.h>
> >
> > Thank you for helping me here, I did run with `check_includes &
> developer_mode`,
> > it did not throw this error.
> > Before patch submission I tried `devtools/test-meson-builds.sh` too. I think
> internally
> > this is not using ` check_includes & developer_mode `.
> > Let me recheck and fix this in version 4.
>
> Thank you, I found the reason for my miss on this.
>
> When build using cross compiler manually, no issues with the steps
> ```
> meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
> ninja -C arm64-build
> cd example/helloworld
> make
> ```
>
> But building using cross compiler with examples manually, no issues with the
> steps
> ```
> meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc -
> Dexamples=helloworld
> ninja -C arm64-build
> ```
>
I generally run ./devtools/test-meson-builds.sh as a catch all 😊
prev parent reply other threads:[~2024-10-30 19:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 5:41 [RFC v3 0/3] Introduce Topology NUMA grouping for lcores Vipin Varghese
2024-10-30 5:41 ` [RFC v3 1/3] eal/lcore: add topology based functions Vipin Varghese
2024-10-30 15:43 ` Stephen Hemminger
2024-10-30 15:44 ` Stephen Hemminger
2024-10-30 15:45 ` Stephen Hemminger
2024-10-30 15:47 ` Stephen Hemminger
2024-10-30 5:41 ` [RFC v3 2/3] test/lcore: enable tests for topology Vipin Varghese
2024-10-30 11:50 ` [EXTERNAL] " Pavan Nikhilesh Bhagavatula
2024-10-30 5:41 ` [RFC v3 3/3] examples: add lcore topology API calls Vipin Varghese
2024-10-30 11:49 ` [EXTERNAL] " Pavan Nikhilesh Bhagavatula
2024-10-30 12:06 ` Varghese, Vipin
2024-10-30 12:37 ` Varghese, Vipin
2024-10-30 19:34 ` Pavan Nikhilesh Bhagavatula [this message]
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=PH0PR18MB40864F7AF99F77C658795002DE542@PH0PR18MB4086.namprd18.prod.outlook.com \
--to=pbhagavatula@marvell.com \
--cc=Ferruh.Yigit@amd.com \
--cc=Vipin.Varghese@amd.com \
--cc=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
--cc=honnappa.nagarahalli@arm.com \
--cc=jerinj@marvell.com \
--cc=john.mcnamara@intel.com \
--cc=konstantin.ananyev@huawei.com \
--cc=mattias.ronnblom@ericsson.com \
--cc=roretzla@linux.microsoft.com \
--cc=ruifeng.wang@arm.com \
--cc=stephen@networkplumber.org \
--cc=wathsala.vithanage@arm.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).