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

libC Kconfig: Do not default to picolibc for native_sim due to GETOPT #64233

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

aescolar
Copy link
Member

@aescolar aescolar commented Oct 23, 2023

Defaulting to picolibc when selecting GETOPT is a bit nicer for users in some cases, but not required.
But too many things require GETOPT (for ex. some SHELL configurations) in combinations with native posix drivers which do not support yet embedded libcs (for ex. the native USB driver) (see #60096 )

Which leads to configurations in those cases which cannot be built. Keep defaulting to the external libC in this case.

This reverts the getop part of this commit:
5f8057e

Fixes #64227

Defaulting to picolibc when selecting GETOPT is a bit nicer for users
in some cases, but not required.
But too many things require GETOPT (for ex. some SHELL configurations)
in combinations with native posix drivers which do not support
yet embedded libcs (for ex. the native USB driver)
(see zephyrproject-rtos#60096 )

Which leads to configurations in those cases which cannot be built.
Keep defaulting to the external libC in this case.

This reverts the getop part of this commit:
5f8057e

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
@aescolar aescolar marked this pull request as ready for review October 23, 2023 07:50
@aescolar aescolar requested a review from nashif as a code owner October 23, 2023 07:50
@aescolar aescolar requested a review from ycsin October 23, 2023 07:50
@aescolar aescolar added area: C Library C Standard Library area: native port Host native arch port (native_sim) labels Oct 23, 2023
@zephyrbot zephyrbot added the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label Oct 23, 2023
@aescolar aescolar added Hotfix Fix for issues blocking development, i.e. CI issues, tests failing in CI, etc. bug The issue is a bug, or the PR is fixing a bug labels Oct 23, 2023
Copy link
Member

@ycsin ycsin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

west build -b native_sim_64 -p always -t run -T samples/subsys/shell/shell_module/sample.shell.shell_module.usb

build pass after this, thanks for the promptly fix

@aescolar aescolar merged commit f97ac47 into zephyrproject-rtos:main Oct 23, 2023
30 checks passed
@aescolar aescolar deleted the nogetopt_libc branch October 23, 2023 08:25
@ycsin
Copy link
Member

ycsin commented Oct 23, 2023

After this patch:

(.venv) ubuntu@intance-1:~/zephyrproject$ zephyr/scripts/twister -p native_sim_64 -b
Renaming output directory to /home/ubuntu/zephyrproject/twister-out.2
INFO    - Using Ninja..
INFO    - Zephyr version: zephyr-v3.5.0-295-g64058f875361
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
INFO    - Total complete: 2310/2310  100%  skipped: 1716, failed:    0, error:    0
INFO    - 2522 test scenarios (2310 test instances) selected, 1716 configurations skipped (1533 by static filter, 183 at runtime).
INFO    - 594 of 2310 test configurations passed (100.00%), 0 failed, 0 errored, 1716 skipped with 0 warnings in 3051.53 seconds
INFO    - 0 test configurations executed on platforms, 594 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    - Run completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: C Library C Standard Library area: native port Host native arch port (native_sim) bug The issue is a bug, or the PR is fixing a bug Hotfix Fix for issues blocking development, i.e. CI issues, tests failing in CI, etc. Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

native_sim: fails to build samples/subsys/shell/shell_module/sample.shell.shell_module.usb
5 participants