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

CONFIG_SHELL_HELP=n fails to compile #29042

Closed
holgerschurig opened this issue Oct 8, 2020 · 0 comments · Fixed by #29051
Closed

CONFIG_SHELL_HELP=n fails to compile #29042

holgerschurig opened this issue Oct 8, 2020 · 0 comments · Fixed by #29051
Assignees
Labels
area: Shell Shell subsystem bug The issue is a bug, or the PR is fixing a bug

Comments

@holgerschurig
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.
What have you tried to diagnose or workaround this issue?

To Reproduce

  1. cat prj.conf
CONFIG_LOG=y
CONFIG_LOG_BACKEND_UART=n
CONFIG_LOG_BACKEND_NATIVE_POSIX=y
CONFIG_SHELL=y
CONFIG_SHELL_WILDCARD=n
CONFIG_SHELL_VT100_COLORS=n
CONFIG_SHELL_METAKEYS=n
CONFIG_SHELL_HELP=n
CONFIG_SHELL_STATS=n
CONFIG_SHELL_CMDS_RESIZE=n
CONFIG_SHELL_HISTORY=n
  1. create an "empty" main.c (just with a main() definition)
  2. west build --pristine -b native_posix
  3. See error:
[98/98] Linking C executable zephyr/zephyr.elf
FAILED: zephyr/zephyr.elf zephyr/zephyr.lst zephyr/zephyr.stat zephyr/zephyr.exe 
: && ccache /usr/bin/gcc    zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj  -o zephyr/zephyr.elf  -Wl,-T zephyr/linker.cmd -Wl,-Map=/home/schurig/d/v73/build/zephyr/zephyr_prebuilt.map -Wl,--whole-archive app/libapp.a zephyr/libzephyr.a zephyr/arch/arch/posix/core/libarch__posix__core.a zephyr/soc/posix/inf_clock/libsoc__posix__inf_clock.a zephyr/boards/posix/native_posix/libboards__posix__native_posix.a zephyr/drivers/serial/libdrivers__serial.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a zephyr/CMakeFiles/offsets.dir/arch/posix/core/offsets/offsets.c.obj -L/home/schurig/d/v73/build/zephyr -Wl,--gc-sections -Wl,--build-id=none -Wl,--sort-common=descending -Wl,--sort-section=alignment -Wl,-u,_OffsetAbsSyms -Wl,-u,_ConfigAbsSyms -m32 -lasan -fsanitize=address -ldl -pthread -lm && cd /home/schurig/d/v73/build/zephyr && /usr/bin/cmake -E rename zephyr_prebuilt.map zephyr.map && /usr/bin/objdump -d -S zephyr.elf >zephyr.lst && /usr/bin/readelf -e zephyr.elf > zephyr.stat && /usr/bin/cmake -E copy zephyr.elf zephyr.exe
/usr/bin/ld: zephyr/libzephyr.a(shell_cmds.c.obj): in function `cmd_help':
/home/schurig/d/v73/build/../zephyr/subsys/shell/shell_cmds.c:301: undefined reference to `shell_help_subcmd_print'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/schurig/d/v73/build

Changing CONFIG_SHELL_HELP=n "fixes" the issue.

Logs and console output
If applicable, add console logs or other types of debug information
e.g Wireshark capture or Logic analyzer capture (upload in zip archive).
copy-and-paste text and put a code fence (```) before and after, to help
explain the issue. (if unable to obtain text log, add a screenshot)

Environment (please complete the following information):

  • OS: Linux
  • Toolchain: native
  • happend on git HEAD of today (git describe --tags: zephyr-v2.4.0-388-g5bda586c64)
@holgerschurig holgerschurig added the bug The issue is a bug, or the PR is fixing a bug label Oct 8, 2020
@carlescufi carlescufi added the area: Shell Shell subsystem label Oct 8, 2020
jakub-uC pushed a commit to jakub-uC/zephyr that referenced this issue Oct 8, 2020
Fix a compilation error when shell help feature was not selected and
but shell help command was compiled.

Fixes: zephyrproject-rtos#29042

Signed-off-by: Jakub Rzeszutko <[email protected]>
carlescufi pushed a commit that referenced this issue Oct 9, 2020
Fix a compilation error when shell help feature was not selected and
but shell help command was compiled.

Fixes: #29042

Signed-off-by: Jakub Rzeszutko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Shell Shell subsystem 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.

3 participants