[EXTERNAL] [RFC v3 3/3] examples: add lcore topology API calls
Varghese, Vipin
Vipin.Varghese at amd.com
Wed Oct 30 13:06:54 CET 2024
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.
More information about the dev
mailing list