-
Couldn't load subscription status.
- Fork 8.1k
native_simulator: include folder for missing <asm/errno.h> #96582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
native_simulator: include folder for missing <asm/errno.h> #96582
Conversation
On an x86_64 Ubuntu host, the following command would result in an error. ```shell west build -p -b native_sim/native tests/net/wifi/configs \ -T wifi.build.hostapd_ap ... In file included from /usr/include/bits/errno.h:26, from /usr/include/errno.h:28, from ~/zephyrproject/zephyr/scripts/native_simulator/\ /common/src/nce.c:24: /usr/include/linux/errno.h:1:10: fatal error: asm/errno.h: \ No such file or directory 1 | #include <asm/errno.h> | ^~~~~~~~~~~~~ compilation terminated. ``` Include `/usr/include/x86_64-linux-gnu` in the search path so that the build succeeds. Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
f6069fe to 8bedb29 Compare |
| This fixed the build on my local Ubuntu machine. Not sure if it's absolutely necessary in CI. Also, aarch64 might need a separate path. There may be a more elegant way of determining the path, so I would be happy to make corrections. If the path does not exist most compilers that I've worked with will not complain. |
| NSI_WARNINGS?=-Wall -Wpedantic | ||
| # Preprocessor flags | ||
| NSI_CPPFLAGS?=-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED | ||
| NSI_CPPFLAGS+=-I/usr/include/x86_64-linux-gnu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't usually hardcode system paths like this? Also, I am not building on x86_64, but aarch64.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also mentioned here
Please feel free to suggest something if there is a similar need on aarch64.
I'm also happy to use a more elaborate approach if there is one for getting the path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is wrong e.g. for openSUSE. And anyway looks like this needs another fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong. I will look into the issue, but whatever it is, this is not the way to go
Thanks - it worked for me, but if there is a better way (or a way that you prefer), I'm happy to use that. |
| I think this was a user error - |



On an x86_64 Ubuntu host, the following command would result in an error.
Include
/usr/include/x86_64-linux-gnuin the search path so that the build succeeds.Fixes #96566