sample build failure on MacOSX

MacOSX 13.0.1, Intel.  nRF Connect SDK v2.2.0 as downloaded by Toolchain Manager v1.2.1 from nRF Connect for Desktop 3.12.1.

Same happened with SDK v2.1.2.

Similar steps on ubuntu work.

Using nRF Connect in VSCode 1.73.1, Created a new application selecting

   nrf/samples/bluetooth/central_peripheral

Created configuration for nrf5340dk_nrf5340_cpuapp and build but output with error logs below resulted.

Suspect a platform specific bug in tooling scripts somewhere but... lots of tools to look at for this newbie.

Might be related to multiimage builds but that could be misleading.

///// build/CMakeFiles/CMakeError.log

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /opt/nordic/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
Build flags:
Id flags:

The output was:
1
/opt/nordic/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld: /opt/nordic/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/lib/libc.a(lib_a-exit.o): in function `exit':
exit.c:(.text.exit+0x34): undefined reference to `_exit'
collect2: error: ld returned 1 exit status


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /opt/nordic/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-g++
Build flags:
Id flags:

The output was:
1
/opt/nordic/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld: /opt/nordic/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/lib/libc.a(lib_a-exit.o): in function `exit':
exit.c:(.text.exit+0x34): undefined reference to `_exit'
collect2: error: ld returned 1 exit status

///// build/CMakeFiles/CMakeOutput.txt

The target system is: Generic - 3.2.99 - arm
The host system is: Darwin - 22.1.0 - x86_64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /opt/nordic/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
Build flags:
Id flags: -c

The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.o"

The C compiler identification is GNU, found in "/Users/removed_id/dev/2022/v2.2.0/peripheral_uart/build/CMakeFiles/3.20.5/CompilerIdC/CMakeCCompilerId.o"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /opt/nordic/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-g++
Build flags:
Id flags: -c

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.o"

The CXX compiler identification is GNU, found in "/Users/removed_id/dev/2022/v2.2.0/peripheral_uart/build/CMakeFiles/3.20.5/CompilerIdCXX/CMakeCXXCompilerId.o"

Checking whether the ASM compiler is GNU using "--version" matched "(GNU assembler)|(GCC)|(Free Software Foundation)":
arm-zephyr-eabi-gcc (Zephyr SDK 0.15.1) 12.1.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Performing C SOURCE FILE Test check_fmacro_prefix_map__Users_removed_id_dev_2022_v2_2_0_peripheral_uart_CMAKE_SOURCE_DIR_C__nostartfiles__nostdlib__isystem___opt_nordic_ncs_toolchains_v2_2_0_opt_zephyr_sdk_arm_zephyr_eabi_bin____lib_gcc_arm_zephyr_eabi_12_1_0_include___isystem___opt_nordic_ncs_toolchains_v2_2_0_opt_zephyr_sdk_arm_zephyr_eabi_bin____lib_gcc_arm_zephyr_eabi_12_1_0_include_fixed___Wl___unresolved_symbols_ignore_in_object_files__Wl___entry_0 succeeded with the following output:
Change Dir: /Users/removed_id/dev/2022/v2.2.0/peripheral_uart/build/CMakeFiles/CMakeTmp

Run Build Command(s):/opt/nordic/ncs/toolchains/v2.2.0/bin/ninja cmTC_4a991 && [1/2] Building C object CMakeFiles/cmTC_4a991.dir/src.c.obj
[2/2] Linking C executable cmTC_4a991


Source file was:
int main(void) { return 0; }

///// Build output

* Executing task: nRF Connect: Generate config nrf5340dk_nrf5340_cpuapp for v2.2.0/peripheral_uart

Building peripheral_uart
west build --build-dir /Users/jahess/dev/2022/v2.2.0/peripheral_uart/build /Users/jahess/dev/2022/v2.2.0/peripheral_uart --pristine --board nrf5340dk_nrf5340_cpuapp -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DBOARD_ROOT:STRING="/Users/jahess/dev/2022/v2.2.0/peripheral_uart"

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /Users/jahess/dev/2022/v2.2.0/peripheral_uart
-- Found Python3: /opt/nordic/ncs/toolchains/v2.2.0/bin/python3.9 (found suitable exact version "3.9.6") found components: Interpreter
-- Cache files will be written to: /Users/jahess/Library/Caches/zephyr
-- Zephyr version: 3.2.99 (/opt/nordic/ncs/v2.2.0/zephyr)
-- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
-- Board: nrf5340dk_nrf5340_cpuapp
-- Found host-tools: zephyr 0.15.1 (/opt/nordic/ncs/toolchains/v2.2.0/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.15.1 (/opt/nordic/ncs/toolchains/v2.2.0/opt/zephyr-sdk)
-- Found Dtc: /opt/nordic/ncs/toolchains/v2.2.0/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
-- Found BOARD.dts: /opt/nordic/ncs/v2.2.0/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts
-- Found devicetree overlay: /Users/jahess/dev/2022/v2.2.0/peripheral_uart/app.overlay
-- Generated zephyr.dts: /Users/jahess/dev/2022/v2.2.0/peripheral_uart/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /Users/jahess/dev/2022/v2.2.0/peripheral_uart/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: /Users/jahess/dev/2022/v2.2.0/peripheral_uart/build/zephyr/dts.cmake
Parsing /Users/jahess/dev/2022/v2.2.0/peripheral_uart/Kconfig
Loaded configuration '/opt/nordic/ncs/v2.2.0/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_defconfig'
Merged configuration '/Users/jahess/dev/2022/v2.2.0/peripheral_uart/prj.conf'
Configuration saved to '/Users/jahess/dev/2022/v2.2.0/peripheral_uart/build/zephyr/.config'
Kconfig header saved to '/Users/jahess/dev/2022/v2.2.0/peripheral_uart/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 12.1.0
-- The CXX compiler identification is GNU 12.1.0
-- The ASM compiler identification is GNU
-- Found assembler: /opt/nordic/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc

=== child image hci_rpmsg - CPUNET begin ===
loading initial cache file /Users/jahess/dev/2022/v2.2.0/peripheral_uart/build/hci_rpmsg/child_image_preload.cmake
Loading Zephyr default modules (Zephyr base).
-- Application: /opt/nordic/ncs/v2.2.0/zephyr/samples/bluetooth/hci_rpmsg
-- Found Python3: /Users/jahess/anaconda2021.11/bin/python3.9 (found suitable exact version "3.9.7") found components: Interpreter
-- Cache files will be written to: /Users/jahess/Library/Caches/zephyr
-- Zephyr version: 3.2.99 (/opt/nordic/ncs/v2.2.0/zephyr)
-- Board: nrf5340dk_nrf5340_cpunet
-- Found host-tools: zephyr 0.15.1 (/opt/nordic/ncs/toolchains/v2.2.0/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.15.1 (/opt/nordic/ncs/toolchains/v2.2.0/opt/zephyr-sdk)
-- Found Dtc: /opt/nordic/ncs/toolchains/v2.2.0/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
-- Found BOARD.dts: /opt/nordic/ncs/v2.2.0/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpunet.dts
-- Generated zephyr.dts: /Users/jahess/dev/2022/v2.2.0/peripheral_uart/build/hci_rpmsg/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /Users/jahess/dev/2022/v2.2.0/peripheral_uart/build/hci_rpmsg/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: /Users/jahess/dev/2022/v2.2.0/peripheral_uart/build/hci_rpmsg/zephyr/dts.cmake

/opt/nordic/ncs/v2.2.0/nrf/subsys/partition_manager/partition_manager_enabled.conf:7: warning: attempt to assign the value 'y' to the undefined symbol PARTITION_MANAGER_ENABLED

warning: HAS_NORDIC_DRIVERS (defined at modules/hal_nordic/Kconfig:7) has direct dependencies 0 with value n, but is currently being y-selected by the following symbols:
- SOC_SERIES_NRF53X (defined at soc/arm/nordic_nrf/nrf53/Kconfig.series:6), with value y, direct dependencies <choice> (value: y), and select condition <choice> (value: y)

warning: HAS_NRFX (defined at modules/hal_nordic/nrfx/Kconfig:4) has direct dependencies 0 with value n, but is currently being y-selected by the following symbols:
- SOC_SERIES_NRF53X (defined at soc/arm/nordic_nrf/nrf53/Kconfig.series:6), with value y, direct dependencies <choice> (value: y), and select condition <choice> (value: y)

warning: NRFX_CLOCK (defined at modules/hal_nordic/nrfx/Kconfig:14) has direct dependencies HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
- CLOCK_CONTROL_NRF (defined at drivers/clock_control/Kconfig.nrf:13), with value y, direct dependencies DT_HAS_NORDIC_NRF_CLOCK_ENABLED && CLOCK_CONTROL (value: y), and select condition !CLOCK_CONTROL_NRF_FORCE_ALT && DT_HAS_NORDIC_NRF_CLOCK_ENABLED && CLOCK_CONTROL (value: y)

warning: NRFX_CLOCK_LFXO_TWO_STAGE_ENABLED (defined at modules/hal_nordic/nrfx/Kconfig:18) has direct dependencies NRFX_CLOCK && HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
- CLOCK_CONTROL_NRF_K32SRC_XTAL (defined at drivers/clock_control/Kconfig.nrf:37), with value y, direct dependencies <choice CLOCK_CONTROL_NRF_SOURCE> (value: y), and select condition !SOC_SERIES_BSIM_NRFXX && !CLOCK_CONTROL_NRF_FORCE_ALT && <choice CLOCK_CONTROL_NRF_SOURCE> (value: y)

warning: NRFX_DPPI (defined at modules/hal_nordic/nrfx/Kconfig:26) has direct dependencies HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
- UART_ENHANCED_POLL_OUT (defined at drivers/serial/Kconfig.nrfx:422), with value y, direct dependencies (UART_0_ENHANCED_POLL_OUT || UART_1_ENHANCED_POLL_OUT || UART_2_ENHANCED_POLL_OUT || UART_3_ENHANCED_POLL_OUT) && UART_NRFX && SERIAL (value: y), and select condition HAS_HW_NRF_DPPIC && (UART_0_ENHANCED_POLL_OUT || UART_1_ENHANCED_POLL_OUT || UART_2_ENHANCED_POLL_OUT || UART_3_ENHANCED_POLL_OUT) && UART_NRFX && SERIAL (value: y)

warning: NRFX_GPIOTE (defined at modules/hal_nordic/nrfx/Kconfig:63) has direct dependencies HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
- GPIO_NRFX (defined at drivers/gpio/Kconfig.nrfx:4), with value y, direct dependencies DT_HAS_NORDIC_NRF_GPIO_ENABLED && GPIO (value: y), and select condition DT_HAS_NORDIC_NRF_GPIO_ENABLED && GPIO (value: y)

warning: NRFX_IPC (defined at modules/hal_nordic/nrfx/Kconfig:79) has direct dependencies HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
- MBOX_NRFX_IPC (defined at boards/arm/nrf5340dk_nrf5340/Kconfig.defconfig:79, drivers/mbox/Kconfig:18), with value y, direct dependencies y (value: y), and select condition HAS_HW_NRF_IPC && MBOX (value: y)

error: Aborting due to Kconfig warnings

Parsing /opt/nordic/ncs/v2.2.0/zephyr/Kconfig
Loaded configuration '/opt/nordic/ncs/v2.2.0/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpunet_defconfig'
Merged configuration '/opt/nordic/ncs/v2.2.0/zephyr/samples/bluetooth/hci_rpmsg/prj.conf'
Merged configuration '/opt/nordic/ncs/v2.2.0/nrf/subsys/partition_manager/partition_manager_enabled.conf'
CMake Error at /opt/nordic/ncs/v2.2.0/zephyr/cmake/modules/kconfig.cmake:328 (message):
command failed with return code: 1
Call Stack (most recent call first):
/opt/nordic/ncs/v2.2.0/nrf/cmake/modules/kconfig.cmake:29 (include)
/opt/nordic/ncs/v2.2.0/zephyr/cmake/modules/zephyr_default.cmake:108 (include)
/opt/nordic/ncs/v2.2.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
/opt/nordic/ncs/v2.2.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
CMake Error at /opt/nordic/ncs/v2.2.0/nrf/cmake/multi_image.cmake:429 (message):
CMake generation for hci_rpmsg failed, aborting. Command: 1
Call Stack (most recent call first):
/opt/nordic/ncs/v2.2.0/nrf/cmake/multi_image.cmake:163 (add_child_image_from_source)
/opt/nordic/ncs/v2.2.0/nrf/samples/CMakeLists.txt:151 (add_child_image)


-- Configuring incomplete, errors occurred!
See also "/Users/jahess/dev/2022/v2.2.0/peripheral_uart/build/CMakeFiles/CMakeOutput.log".
See also "/Users/jahess/dev/2022/v2.2.0/peripheral_uart/build/CMakeFiles/CMakeError.log".
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/v2.2.0/bin/cmake -DWEST_PYTHON=/opt/nordic/ncs/toolchains/v2.2.0/bin/python3 -B/Users/jahess/dev/2022/v2.2.0/peripheral_uart/build -GNinja -DBOARD=nrf5340dk_nrf5340_cpuapp -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DBOARD_ROOT:STRING=/Users/jahess/dev/2022/v2.2.0/peripheral_uart -S/Users/jahess/dev/2022/v2.2.0/peripheral_uart

* The terminal process terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.

Parents Reply Children
No Data
Related