Skip to content
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_sim: fails to build samples/subsys/shell/shell_module/sample.shell.shell_module.usb #64227

Closed
ycsin opened this issue Oct 23, 2023 · 1 comment · Fixed by #64233
Closed
Assignees
Labels
area: native port Host native arch port (native_sim) bug The issue is a bug, or the PR is fixing a bug

Comments

@ycsin
Copy link
Member

ycsin commented Oct 23, 2023

Describe the bug
The samples/subsys/shell/shell_module/sample.shell.shell_module.usb fails to build on native_sim_64.

Please also mention any information which could help others to understand
the problem you're facing:

  • native_sim_64

To Reproduce
Steps to reproduce the behavior:

  1. Checkout latest main
  2. west build -b native_sim_64 -p always -t run -T samples/subsys/shell/shell_module/sample.shell.shell_module.usb
  3. See error

Expected behavior
Build should pass.

Impact
Causing CI error in #63973

Logs and console output

...
osix_adapt.c.obj -MF zephyr/drivers/usb/device/CMakeFiles/drivers__usb__device.dir/usb_dc_native_posix_adapt.c.obj.d -o zephyr/drivers/usb/device/CMakeFiles/drivers__usb__device.dir/usb_dc_native_posix_adapt.c.obj -c /home/ubuntu/zephyrproject/zephyr/drivers/usb/device/usb_dc_native_posix_adapt.c
/home/ubuntu/zephyrproject/zephyr/drivers/usb/device/usb_dc_native_posix_adapt.c:21:10: fatal error: sys/socket.h: No such file or directory
   21 | #include <sys/socket.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
[1031/1064] Building C object zephyr/kernel/CMakeFiles/kernel.dir/main_weak.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/ubuntu/zephyrproject/build --target run

Full log: build-error.txt

Environment (please complete the following information):

  • OS: Linux intance-1 5.15.0-1039-oracle #45-Ubuntu SMP Thu Jul 13 19:41:22 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
  • Toolchain: Zephyr SDK 0.16.3 aarch64
  • Commit SHA or Version used: b1c2075

Additional ccontext

(.venv) ubuntu@intance-1:~/zephyrproject$ zephyr/scripts/twister -p native_sim_64 -b
Renaming output directory to /home/ubuntu/zephyrproject/twister-out.1
INFO    - Using Ninja..
INFO    - Zephyr version: zephyr-v3.5.0-238-gb1c207524b09
INFO    - Using 'zephyr' toolchain.
INFO    - Building initial testsuite list...
INFO    - Writing JSON report /home/ubuntu/zephyrproject/twister-out/testplan.json
INFO    - JOBS: 8
INFO    - Adding tasks to the queue...
INFO    - Added initial list of jobs to queue
ERROR   - native_sim_64             samples/net/zperf/sample.net.zperf.netusb_ecm       ERROR : Build failure
ERROR   - see: /home/ubuntu/zephyrproject/twister-out/native_sim_64/samples/net/zperf/sample.net.zperf.netusb_ecm/build.log
ERROR   - native_sim_64             samples/net/zperf/sample.net.zperf.netusb_eem       ERROR : Build failure
ERROR   - see: /home/ubuntu/zephyrproject/twister-out/native_sim_64/samples/net/zperf/sample.net.zperf.netusb_eem/build.log
ERROR   - native_sim_64             samples/net/zperf/sample.net.zperf.netusb_rndis     ERROR : Build failure
ERROR   - see: /home/ubuntu/zephyrproject/twister-out/native_sim_64/samples/net/zperf/sample.net.zperf.netusb_rndis/build.log
ERROR   - native_sim_64             samples/net/sockets/echo_server/sample.net.sockets.echo_server.usbnet  ERROR : Build failure
ERROR   - see: /home/ubuntu/zephyrproject/twister-out/native_sim_64/samples/net/sockets/echo_server/sample.net.sockets.echo_server.usbnet/build.log
ERROR   - native_sim_64             samples/subsys/shell/shell_module/sample.shell.shell_module.usb  ERROR : Build failure
ERROR   - see: /home/ubuntu/zephyrproject/twister-out/native_sim_64/samples/subsys/shell/shell_module/sample.shell.shell_module.usb/build.log
ERROR   - native_sim_64             tests/drivers/eeprom/shell/drivers.eeprom.shell     ERROR : Build failure
ERROR   - see: /home/ubuntu/zephyrproject/twister-out/native_sim_64/tests/drivers/eeprom/shell/drivers.eeprom.shell/build.log
INFO    - Total complete: 2310/2310  100%  skipped: 1713, failed:    0, error:    6
INFO    - 2522 test scenarios (2310 test instances) selected, 1713 configurations skipped (1533 by static filter, 180 at runtime).
INFO    - 591 of 2310 test configurations passed (98.99%), 0 failed, 6 errored, 1713 skipped with 0 warnings in 4271.56 seconds
INFO    - 0 test configurations executed on platforms, 597 test configurations were only built.
INFO    - Saving reports...
INFO    - Writing JSON report /home/ubuntu/zephyrproject/twister-out/twister.json
INFO    - Writing xunit report /home/ubuntu/zephyrproject/twister-out/twister.xml...
INFO    - Writing xunit report /home/ubuntu/zephyrproject/twister-out/twister_report.xml...
INFO    - -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
INFO    - The following issues were found (showing the top 10 items):
INFO    - 1) tests/drivers/eeprom/shell/drivers.eeprom.shell on native_sim_64 error (Build failure)
INFO    - 2) samples/subsys/shell/shell_module/sample.shell.shell_module.usb on native_sim_64 error (Build failure)
INFO    - 3) samples/net/sockets/echo_server/sample.net.sockets.echo_server.usbnet on native_sim_64 error (Build failure)
INFO    - 4) samples/net/zperf/sample.net.zperf.netusb_ecm on native_sim_64 error (Build failure)
INFO    - 5) samples/net/zperf/sample.net.zperf.netusb_eem on native_sim_64 error (Build failure)
INFO    - 6) samples/net/zperf/sample.net.zperf.netusb_rndis on native_sim_64 error (Build failure)
INFO    - 
INFO    - To rerun the tests, call twister using the following commandline:
INFO    - west twister -p <PLATFORM> -s <TEST ID>, for example:
INFO    - 
INFO    - west twister -p native_sim_64 -s samples/net/zperf/sample.net.zperf.netusb_rndis
INFO    - or with west:
INFO    - west build -p -b native_sim_64 samples/net/zperf -T sample.net.zperf.netusb_rndis
INFO    - -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
INFO    - Run completed
@ycsin ycsin added the bug The issue is a bug, or the PR is fixing a bug label Oct 23, 2023
@ycsin ycsin added the area: native port Host native arch port (native_sim) label Oct 23, 2023
@aescolar
Copy link
Member

Thanks @ycsin ,
The fix is queued in #64233, there the cause of the bug can also be found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: native port Host native arch port (native_sim) bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants