zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.83k stars 6.6k forks source link

max32672 cpp build errors in weekly full twister run #79283

Open MaureenHelm opened 1 month ago

MaureenHelm commented 1 month ago

Describe the bug

max32672fthr and max32672evkit boards are failing multiple cpp and cxx tests in the weekly full twister run due to build warnings that get promoted to errors. https://github.com/zephyrproject-rtos/zephyr/runs/30826322038 https://github.com/zephyrproject-rtos/zephyr/actions/runs/11089211666/job/30810087093#step:13:7071

To Reproduce

$ west build -p -b max32672fthr samples/cpp/cpp_synchronization/ -T sample.cpp.synchronization

Expected behavior

Build without warnings

Impact

Noise in the weekly full twister run burying other failures.

Logs and console output

INFO    - 5051/6958 max32672fthr              samples/cpp/cpp_synchronization/sample.cpp.synchronization  ERROR Build failure (build)
INFO    - /__w/zephyr/zephyr/twister-out/max32672fthr/samples/cpp/cpp_synchronization/sample.cpp.synchronization/build.log
ERROR   - Loading Zephyr default modules (Zephyr base).
-- Application: /__w/zephyr/zephyr/samples/cpp/cpp_synchronization
-- CMake version: 3.22.1
-- Found Python3: /usr/bin/python (found suitable version "3.10.12", minimum required is "3.10") found components: Interpreter 
-- Cache files will be written to: /root/.cache/zephyr
-- Zephyr version: 3.7.99 (/__w/zephyr/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: max32672fthr, qualifiers: max32672
-- Found host-tools: zephyr 0.16.8 (/opt/toolchains/zephyr-sdk-0.16.8)
-- Found toolchain: zephyr 0.16.8 (/opt/toolchains/zephyr-sdk-0.16.8)
-- Found Dtc: /opt/toolchains/zephyr-sdk-0.16.8/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6") 
-- Found BOARD.dts: /__w/zephyr/zephyr/boards/adi/max32672fthr/max32672fthr.dts
-- Generated zephyr.dts: /__w/zephyr/zephyr/twister-out/max32672fthr/samples/cpp/cpp_synchronization/sample.cpp.synchronization/zephyr/zephyr.dts
-- Generated pickled edt: /__w/zephyr/zephyr/twister-out/max32672fthr/samples/cpp/cpp_synchronization/sample.cpp.synchronization/zephyr/edt.pickle
-- Generated zephyr.dts: /__w/zephyr/zephyr/twister-out/max32672fthr/samples/cpp/cpp_synchronization/sample.cpp.synchronization/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /__w/zephyr/zephyr/twister-out/max32672fthr/samples/cpp/cpp_synchronization/sample.cpp.synchronization/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: /__w/zephyr/zephyr/twister-out/max32672fthr/samples/cpp/cpp_synchronization/sample.cpp.synchronization/zephyr/dts.cmake
Parsing /__w/zephyr/zephyr/Kconfig
Loaded configuration '/__w/zephyr/zephyr/boards/adi/max32672fthr/max32672fthr_defconfig'
Merged configuration '/__w/zephyr/zephyr/samples/cpp/cpp_synchronization/prj.conf'
Merged configuration '/__w/zephyr/zephyr/twister-out/max32672fthr/samples/cpp/cpp_synchronization/sample.cpp.synchronization/zephyr/misc/generated/extra_kconfig_options.conf'
Configuration saved to '/__w/zephyr/zephyr/twister-out/max32672fthr/samples/cpp/cpp_synchronization/sample.cpp.synchronization/zephyr/.config'
Kconfig header saved to '/__w/zephyr/zephyr/twister-out/max32672fthr/samples/cpp/cpp_synchronization/sample.cpp.synchronization/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: /opt/toolchains/zephyr-sdk-0.16.8/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (found version "2.38") 
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /opt/toolchains/zephyr-sdk-0.16.8/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Setting build type to 'MinSizeRel' as none was specified.
-- Using ccache: /usr/local/bin/ccache
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    TC_NAME
    TC_RUNID

-- Build files have been written to: /__w/zephyr/zephyr/twister-out/max32672fthr/samples/cpp/cpp_synchronization/sample.cpp.synchronization
[1/139] Generating include/generated/zephyr/version.h
-- Zephyr version: 3.7.99 (/__w/zephyr/zephyr), build: v3.7.0-3607-g0d118ec1abe0
[2/139] Preparing syscall dependency handling

[3/139] Generating misc/generated/syscalls_subdirs.trigger
[4/139] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
[5/139] Generating include/generated/zephyr/syscall_dispatch.c, include/generated/zephyr/syscall_list.h
[6/139] Generating include/generated/zephyr/driver-validation.h
[7/139] Generating include/generated/zephyr/kobj-types-enum.h, include/generated/zephyr/otype-to-str.h, include/generated/zephyr/otype-to-size.h
[8/139] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
[9/139] Generating include/generated/zephyr/offsets.h
[10/139] Building CXX object CMakeFiles/app.dir/src/main.cpp.obj
FAILED: CMakeFiles/app.dir/src/main.cpp.obj 
ccache /opt/toolchains/zephyr-sdk-0.16.8/arm-zephyr-eabi/bin/arm-zephyr-eabi-g++ -DKERNEL -DK_HEAP_MEM_POOL_SIZE=0 -DMSDK_NO_GPIO_CLK_INIT=1 -DMSDK_NO_LOCKING=1 -DPICOLIBC_LONG_LONG_PRINTF_SCANF -DTARGET=MAX32672 -DTARGET_REV=0x4131 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I/__w/zephyr/zephyr/twister-out/max32672fthr/samples/cpp/cpp_synchronization/sample.cpp.synchronization/zephyr/include/generated/zephyr -I/__w/zephyr/zephyr/include -I/__w/zephyr/zephyr/twister-out/max32672fthr/samples/cpp/cpp_synchronization/sample.cpp.synchronization/zephyr/include/generated -I/__w/zephyr/zephyr/soc/adi/max32 -I/__w/zephyr/zephyr/drivers -I/__w/zephyr/zephyr/soc/adi/max32/common -I/__w/zephyr/modules/hal/cmsis/CMSIS/Core/Include -I/__w/zephyr/zephyr/modules/cmsis/. -I/__w/zephyr/modules/hal/adi/MAX/./Include -I/__w/zephyr/modules/hal/adi/MAX/Libraries/CMSIS/Device/Maxim/MAX32672/Include -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Include/MAX32672 -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Source/ADC -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Source/AES -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Source/CTB -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Source/DMA -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Source/FLC -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Source/GPIO -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Source/I2C -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Source/I2S -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Source/ICC -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Source/LP -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Source/QDEC -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Source/RTC -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Source/SPI -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Source/SYS -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Source/TMR -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Source/TRNG -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Source/UART -I/__w/zephyr/modules/hal/adi/MAX/Libraries/PeriphDrivers/Source/WDT -isystem /__w/zephyr/zephyr/lib/libc/common/include -isystem /__w/zephyr/zephyr/lib/cpp/minimal/include -Os -DNDEBUG -fno-strict-aliasing -Werror -Os -fcheck-new -std=c++11 -fno-exceptions -fno-rtti -imacros /__w/zephyr/zephyr/twister-out/max32672fthr/samples/cpp/cpp_synchronization/sample.cpp.synchronization/zephyr/include/generated/zephyr/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=/opt/toolchains/zephyr-sdk-0.16.8/arm-zephyr-eabi/arm-zephyr-eabi -imacros /__w/zephyr/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/__w/zephyr/zephyr/samples/cpp/cpp_synchronization=CMAKE_SOURCE_DIR -fmacro-prefix-map=/__w/zephyr/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/__w/zephyr=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -nostdinc++ -MD -MT CMakeFiles/app.dir/src/main.cpp.obj -MF CMakeFiles/app.dir/src/main.cpp.obj.d -o CMakeFiles/app.dir/src/main.cpp.obj -c /__w/zephyr/zephyr/samples/cpp/cpp_synchronization/src/main.cpp
In file included from /__w/zephyr/modules/hal/adi/MAX/Libraries/CMSIS/Device/Maxim/MAX32672/Include/max32672.h:201,
                 from /__w/zephyr/modules/hal/adi/MAX/./Include/wrap_max32xxx.h:49,
                 from /__w/zephyr/zephyr/soc/adi/max32/soc.h:15,
                 from /__w/zephyr/zephyr/modules/cmsis/./cmsis_core_m.h:24,
                 from /__w/zephyr/zephyr/modules/cmsis/./cmsis_core.h:10,
                 from /__w/zephyr/zephyr/include/zephyr/arch/arm/asm_inline_gcc.h:24,
                 from /__w/zephyr/zephyr/include/zephyr/arch/arm/asm_inline.h:18,
                 from /__w/zephyr/zephyr/include/zephyr/arch/arm/arch.h:30,
                 from /__w/zephyr/zephyr/include/zephyr/arch/cpu.h:19,
                 from /__w/zephyr/zephyr/include/zephyr/kernel_includes.h:36,
                 from /__w/zephyr/zephyr/include/zephyr/kernel.h:17,
                 from /__w/zephyr/zephyr/samples/cpp/cpp_synchronization/src/main.cpp:22:
/__w/zephyr/modules/hal/cmsis/CMSIS/Core/Include/core_cm4.h:222: error: "__I" redefined [-Werror]
  222 |   #define   __I     volatile             /*!< Defines 'read only' permissions */
      | 
In file included from /__w/zephyr/modules/hal/adi/MAX/Libraries/CMSIS/Device/Maxim/MAX32672/Include/max32672.h:35:
/__w/zephyr/modules/hal/adi/MAX/Libraries/CMSIS/Device/Maxim/MAX32672/Include/trimsir_regs.h:53: note: this is the location of the previous definition
   53 | #define __I  volatile const
      | 
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.

Environment (please complete the following information):

Additional context

@hfakkiz can you take a look?

mmahadevan108 commented 1 day ago

@MaureenHelm , can this issue be closed?