Skip to content

Logging subsystem causes build to fail with LLVM #34439

@nashif

Description

@nashif

Describe the bug

Build fails with

ccache /usr/lib/llvm-12/bin/clang -DBUILD_VERSION=zephyr-v2.5.0-2439-g08985d93c950 -DDEBUG_PRINTF=1 -DKERNEL -D_POSIX_C_SOURCE=200809 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D__ZEPHYR_SUPERVISOR__ -D__ZEPHYR__=1 -I../../../../../../../../kernel/include -I../../../../../../../../arch/posix/include -I../../../../../../../../include -Izephyr/include/generated -I../../../../../../../../soc/posix/inf_clock -I../../../../../../../../boards/posix/native_posix -Os -imacros /__w/zephyr/zephyr/twister-out/native_posix/samples/subsys/portability/cmsis_rtos_v1/philosophers/sample.portability.cmsis_rtos_v1.philosopher/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -imacros /__w/zephyr/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-typedef-redefinition -Wno-pointer-sign -Wpointer-arith -Wno-sometimes-uninitialized -Wno-shift-overflow -Wno-missing-braces -Wno-self-assign -Wno-address-of-packed-member -Wno-unused-function -Wno-initializer-overrides -Wno-section -Wno-unknown-warning-option -Wno-unused-variable -Wno-format-invalid-specifier -Wno-gnu -Wno-tautological-compare -Werror=implicit-int -Werror -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fmacro-prefix-map=/__w/zephyr/zephyr/samples/subsys/portability/cmsis_rtos_v1/philosophers=CMAKE_SOURCE_DIR -fmacro-prefix-map=/__w/zephyr/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/__w/zephyr=WEST_TOPDIR -ffunction-sections -fdata-sections -m32 -include /__w/zephyr/zephyr/arch/posix/include/posix_cheats.h -std=c11 -MD -MT zephyr/kernel/CMakeFiles/kernel.dir/init.c.obj -MF zephyr/kernel/CMakeFiles/kernel.dir/init.c.obj.d -o zephyr/kernel/CMakeFiles/kernel.dir/init.c.obj -c /__w/zephyr/zephyr/kernel/init.c
In file included from /__w/zephyr/zephyr/kernel/init.c:18:
../../../../../../../../include/debug/stack.h:34:3: error: sizeof on pointer operation will return size of 'char *' instead of 'char [48]' [-Werror,-Wsizeof-array-decay]
                LOG_INF("%p (%s):\tunused %zu\tusage %zu / %zu (%u %%)",
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log.h:61:24: note: expanded from macro 'LOG_INF'
#define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:330:2: note: expanded from macro 'Z_LOG'
        Z_LOG2(_level, \
        ^~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:315:3: note: expanded from macro 'Z_LOG2'
                Z_LOG_MSG2_CREATE(!IS_ENABLED(CONFIG_USERSPACE), _mode, \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 18 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
../../../../../../../../include/sys/cbprintf_internal.h:243:2: note: expanded from macro 'Z_CBPRINTF_PACK_ARG'
        Z_CBPRINTF_PACK_ARG2(_pbuf, _pkg_len, _pkg_offset, _pmax, arg)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:228:23: note: expanded from macro 'Z_CBPRINTF_PACK_ARG2'
        uint32_t _arg_size = Z_CBPRINTF_ARG_SIZE(_arg); \
                             ^~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:130:14: note: expanded from macro 'Z_CBPRINTF_ARG_SIZE'
                        sizeof((v)+0) \
                               ~~~^
In file included from /__w/zephyr/zephyr/kernel/init.c:18:
../../../../../../../../include/debug/stack.h:34:3: error: sizeof on pointer operation will return size of 'char *' instead of 'char [48]' [-Werror,-Wsizeof-array-decay]
                LOG_INF("%p (%s):\tunused %zu\tusage %zu / %zu (%u %%)",
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log.h:61:24: note: expanded from macro 'LOG_INF'
#define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:330:2: note: expanded from macro 'Z_LOG'
        Z_LOG2(_level, \
        ^~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:315:3: note: expanded from macro 'Z_LOG2'
                Z_LOG_MSG2_CREATE(!IS_ENABLED(CONFIG_USERSPACE), _mode, \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 19 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
../../../../../../../../include/sys/cbprintf_internal.h:230:3: note: expanded from macro 'Z_CBPRINTF_PACK_ARG2'
                Z_CBPRINTF_STORE_ARG(&_buf[_idx], _arg); \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:154:21: note: expanded from macro 'Z_CBPRINTF_STORE_ARG'
                size_t arg_size = Z_CBPRINTF_ARG_SIZE(arg); \
                                  ^~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:130:14: note: expanded from macro 'Z_CBPRINTF_ARG_SIZE'
                        sizeof((v)+0) \
                               ~~~^
In file included from /__w/zephyr/zephyr/kernel/init.c:18:
../../../../../../../../include/debug/stack.h:34:3: error: sizeof on pointer operation will return size of 'char *' instead of 'char [48]' [-Werror,-Wsizeof-array-decay]
                LOG_INF("%p (%s):\tunused %zu\tusage %zu / %zu (%u %%)",
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log.h:61:24: note: expanded from macro 'LOG_INF'
#define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:330:2: note: expanded from macro 'Z_LOG'
        Z_LOG2(_level, \
        ^~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:315:3: note: expanded from macro 'Z_LOG2'
                Z_LOG_MSG2_CREATE(!IS_ENABLED(CONFIG_USERSPACE), _mode, \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 18 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
../../../../../../../../include/sys/cbprintf_internal.h:243:2: note: expanded from macro 'Z_CBPRINTF_PACK_ARG'
        Z_CBPRINTF_PACK_ARG2(_pbuf, _pkg_len, _pkg_offset, _pmax, arg)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:228:23: note: expanded from macro 'Z_CBPRINTF_PACK_ARG2'
        uint32_t _arg_size = Z_CBPRINTF_ARG_SIZE(_arg); \
                             ^~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:130:14: note: expanded from macro 'Z_CBPRINTF_ARG_SIZE'
                        sizeof((v)+0) \
                               ~~~^
In file included from /__w/zephyr/zephyr/kernel/init.c:18:
../../../../../../../../include/debug/stack.h:34:3: error: sizeof on pointer operation will return size of 'char *' instead of 'char [48]' [-Werror,-Wsizeof-array-decay]
                LOG_INF("%p (%s):\tunused %zu\tusage %zu / %zu (%u %%)",
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log.h:61:24: note: expanded from macro 'LOG_INF'
#define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:330:2: note: expanded from macro 'Z_LOG'
        Z_LOG2(_level, \
        ^~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:315:3: note: expanded from macro 'Z_LOG2'
                Z_LOG_MSG2_CREATE(!IS_ENABLED(CONFIG_USERSPACE), _mode, \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 19 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
../../../../../../../../include/sys/cbprintf_internal.h:230:3: note: expanded from macro 'Z_CBPRINTF_PACK_ARG2'
                Z_CBPRINTF_STORE_ARG(&_buf[_idx], _arg); \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:154:21: note: expanded from macro 'Z_CBPRINTF_STORE_ARG'
                size_t arg_size = Z_CBPRINTF_ARG_SIZE(arg); \
                                  ^~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:130:14: note: expanded from macro 'Z_CBPRINTF_ARG_SIZE'
                        sizeof((v)+0) \
                               ~~~^
In file included from /__w/zephyr/zephyr/kernel/init.c:18:
../../../../../../../../include/debug/stack.h:34:3: error: sizeof on pointer operation will return size of 'char *' instead of 'char [48]' [-Werror,-Wsizeof-array-decay]
                LOG_INF("%p (%s):\tunused %zu\tusage %zu / %zu (%u %%)",
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log.h:61:24: note: expanded from macro 'LOG_INF'
#define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:330:2: note: expanded from macro 'Z_LOG'
        Z_LOG2(_level, \
        ^~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:315:3: note: expanded from macro 'Z_LOG2'
                Z_LOG_MSG2_CREATE(!IS_ENABLED(CONFIG_USERSPACE), _mode, \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 18 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
../../../../../../../../include/sys/cbprintf_internal.h:243:2: note: expanded from macro 'Z_CBPRINTF_PACK_ARG'
        Z_CBPRINTF_PACK_ARG2(_pbuf, _pkg_len, _pkg_offset, _pmax, arg)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:228:23: note: expanded from macro 'Z_CBPRINTF_PACK_ARG2'
        uint32_t _arg_size = Z_CBPRINTF_ARG_SIZE(_arg); \
                             ^~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:130:14: note: expanded from macro 'Z_CBPRINTF_ARG_SIZE'
                        sizeof((v)+0) \
                               ~~~^
In file included from /__w/zephyr/zephyr/kernel/init.c:18:
../../../../../../../../include/debug/stack.h:34:3: error: sizeof on pointer operation will return size of 'char *' instead of 'char [48]' [-Werror,-Wsizeof-array-decay]
                LOG_INF("%p (%s):\tunused %zu\tusage %zu / %zu (%u %%)",
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log.h:61:24: note: expanded from macro 'LOG_INF'
#define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:330:2: note: expanded from macro 'Z_LOG'
        Z_LOG2(_level, \
        ^~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:315:3: note: expanded from macro 'Z_LOG2'
                Z_LOG_MSG2_CREATE(!IS_ENABLED(CONFIG_USERSPACE), _mode, \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 19 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
../../../../../../../../include/sys/cbprintf_internal.h:230:3: note: expanded from macro 'Z_CBPRINTF_PACK_ARG2'
                Z_CBPRINTF_STORE_ARG(&_buf[_idx], _arg); \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:154:21: note: expanded from macro 'Z_CBPRINTF_STORE_ARG'
                size_t arg_size = Z_CBPRINTF_ARG_SIZE(arg); \
                                  ^~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:130:14: note: expanded from macro 'Z_CBPRINTF_ARG_SIZE'
                        sizeof((v)+0) \
                               ~~~^
In file included from /__w/zephyr/zephyr/kernel/init.c:18:
../../../../../../../../include/debug/stack.h:34:3: error: sizeof on pointer operation will return size of 'char *' instead of 'char [48]' [-Werror,-Wsizeof-array-decay]
                LOG_INF("%p (%s):\tunused %zu\tusage %zu / %zu (%u %%)",
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log.h:61:24: note: expanded from macro 'LOG_INF'
#define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:330:2: note: expanded from macro 'Z_LOG'
        Z_LOG2(_level, \
        ^~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:315:3: note: expanded from macro 'Z_LOG2'
                Z_LOG_MSG2_CREATE(!IS_ENABLED(CONFIG_USERSPACE), _mode, \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 18 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
../../../../../../../../include/sys/cbprintf_internal.h:243:2: note: expanded from macro 'Z_CBPRINTF_PACK_ARG'
        Z_CBPRINTF_PACK_ARG2(_pbuf, _pkg_len, _pkg_offset, _pmax, arg)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:228:23: note: expanded from macro 'Z_CBPRINTF_PACK_ARG2'
        uint32_t _arg_size = Z_CBPRINTF_ARG_SIZE(_arg); \
                             ^~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:130:14: note: expanded from macro 'Z_CBPRINTF_ARG_SIZE'
                        sizeof((v)+0) \
                               ~~~^
In file included from /__w/zephyr/zephyr/kernel/init.c:18:
../../../../../../../../include/debug/stack.h:34:3: error: sizeof on pointer operation will return size of 'char *' instead of 'char [48]' [-Werror,-Wsizeof-array-decay]
                LOG_INF("%p (%s):\tunused %zu\tusage %zu / %zu (%u %%)",
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log.h:61:24: note: expanded from macro 'LOG_INF'
#define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:330:2: note: expanded from macro 'Z_LOG'
        Z_LOG2(_level, \
        ^~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:315:3: note: expanded from macro 'Z_LOG2'
                Z_LOG_MSG2_CREATE(!IS_ENABLED(CONFIG_USERSPACE), _mode, \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 19 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
../../../../../../../../include/sys/cbprintf_internal.h:230:3: note: expanded from macro 'Z_CBPRINTF_PACK_ARG2'
                Z_CBPRINTF_STORE_ARG(&_buf[_idx], _arg); \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:154:21: note: expanded from macro 'Z_CBPRINTF_STORE_ARG'
                size_t arg_size = Z_CBPRINTF_ARG_SIZE(arg); \
                                  ^~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:130:14: note: expanded from macro 'Z_CBPRINTF_ARG_SIZE'
                        sizeof((v)+0) \
                               ~~~^
In file included from /__w/zephyr/zephyr/kernel/init.c:18:
../../../../../../../../include/debug/stack.h:34:3: error: sizeof on pointer operation will return size of 'char *' instead of 'char [48]' [-Werror,-Wsizeof-array-decay]
                LOG_INF("%p (%s):\tunused %zu\tusage %zu / %zu (%u %%)",
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log.h:61:24: note: expanded from macro 'LOG_INF'
#define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:330:2: note: expanded from macro 'Z_LOG'
        Z_LOG2(_level, \
        ^~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:315:3: note: expanded from macro 'Z_LOG2'
                Z_LOG_MSG2_CREATE(!IS_ENABLED(CONFIG_USERSPACE), _mode, \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 18 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
../../../../../../../../include/sys/cbprintf_internal.h:243:2: note: expanded from macro 'Z_CBPRINTF_PACK_ARG'
        Z_CBPRINTF_PACK_ARG2(_pbuf, _pkg_len, _pkg_offset, _pmax, arg)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:228:23: note: expanded from macro 'Z_CBPRINTF_PACK_ARG2'
        uint32_t _arg_size = Z_CBPRINTF_ARG_SIZE(_arg); \
                             ^~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:130:14: note: expanded from macro 'Z_CBPRINTF_ARG_SIZE'
                        sizeof((v)+0) \
                               ~~~^
In file included from /__w/zephyr/zephyr/kernel/init.c:18:
../../../../../../../../include/debug/stack.h:34:3: error: sizeof on pointer operation will return size of 'char *' instead of 'char [48]' [-Werror,-Wsizeof-array-decay]
                LOG_INF("%p (%s):\tunused %zu\tusage %zu / %zu (%u %%)",
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log.h:61:24: note: expanded from macro 'LOG_INF'
#define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:330:2: note: expanded from macro 'Z_LOG'
        Z_LOG2(_level, \
        ^~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log_core.h:315:3: note: expanded from macro 'Z_LOG2'
                Z_LOG_MSG2_CREATE(!IS_ENABLED(CONFIG_USERSPACE), _mode, \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 19 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
../../../../../../../../include/sys/cbprintf_internal.h:230:3: note: expanded from macro 'Z_CBPRINTF_PACK_ARG2'
                Z_CBPRINTF_STORE_ARG(&_buf[_idx], _arg); \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:154:21: note: expanded from macro 'Z_CBPRINTF_STORE_ARG'
                size_t arg_size = Z_CBPRINTF_ARG_SIZE(arg); \
                                  ^~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/sys/cbprintf_internal.h:130:14: note: expanded from macro 'Z_CBPRINTF_ARG_SIZE'
                        sizeof((v)+0) \
                               ~~~^
In file included from /__w/zephyr/zephyr/kernel/init.c:18:
../../../../../../../../include/debug/stack.h:34:3: error: sizeof on pointer operation will return size of 'char *' instead of 'char [48]' [-Werror,-Wsizeof-array-decay]
                LOG_INF("%p (%s):\tunused %zu\tusage %zu / %zu (%u %%)",
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/logging/log.h:61:24: note: expanded from macro 'LOG_INF'
#define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To Reproduce
Steps to reproduce the behavior:

  1. build with llvm
  2. export ZEPHYR_TOOLCHAIN_VARIANT=llvm
  3. west build -b qemu_x86 samples/hello_world/

Expected behavior
build is completed

Impact
Almost all tests/samples are failing now.

Logs and console output
see above

Environment (please complete the following information):

  • OS: Linux
  • Toolchain: LLVM
  • Commit 552028d

Metadata

Metadata

Assignees

Labels

area: LoggingbugThe issue is a bug, or the PR is fixing a bugpriority: highHigh impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions