Re: Compiling sample program on MAC 10.14 gets a compilation error


Bolivar, Marti
 

On April 4, 2022 11:19 pm, Sowmya Krishnaswamy via lists.zephyrproject.org wrote:
Hi,

I am following the steps outlined in

1. https://learn.adafruit.com/blinking-led-with-zephyr-rtos/installing-zephyr-osx <https://learn.adafruit.com/blinking-led-with-zephyr-rtos/installing-zephyr-osx>
2. https://learn.adafruit.com/blinking-led-with-zephyr-rtos/building-a-sample-program <https://learn.adafruit.com/blinking-led-with-zephyr-rtos/building-a-sample-program>

On MAC-OS (10.14).

brew install gcc-arm-embedded --cask
which arm-none-eabi-gdb
export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
export GNUARMEMB_TOOLCHAIN_PATH=/usr/local/
echo $ZEPHYR_TOOLCHAIN_VARIANT

west build -p auto -b nucleo_wb55rg samples/basic/blinky
-- west build: making build dir /Users/user/zephyrproject/zephyr/build pristine
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /Users/user/zephyrproject/zephyr/samples/basic/blinky
-- Found Python3: /usr/local/opt/python@3.9/bin/python3.9 (found suitable exact version "3.9.12") found components: Interpreter
-- Cache files will be written to: /Users/user/Library/Caches/zephyr
-- Zephyr version: 3.0.99 (/Users/user/zephyrproject/zephyr)
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: nucleo_wb55rg
-- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/usr/local)
-- Found BOARD.dts: /Users/user/zephyrproject/zephyr/boards/arm/nucleo_wb55rg/nucleo_wb55rg.dts
-- Generated zephyr.dts: /Users/user/zephyrproject/zephyr/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /Users/user/zephyrproject/zephyr/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /Users/user/zephyrproject/zephyr/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /Users/user/zephyrproject/zephyr/build/zephyr/dts.cmake
/Users/user/zephyrproject/zephyr/build/zephyr/zephyr.dts:98.39-103.5: Warning (interrupt_provider): /soc/interrupt-controller@58000800: Missing #address-cells in interrupt provider
Parsing /Users/user/zephyrproject/zephyr/Kconfig
Loaded configuration '/Users/user/zephyrproject/zephyr/boards/arm/nucleo_wb55rg/nucleo_wb55rg_defconfig'
Merged configuration '/Users/user/zephyrproject/zephyr/samples/basic/blinky/prj.conf'
Configuration saved to '/Users/user/zephyrproject/zephyr/build/zephyr/.config'
Kconfig header saved to '/Users/user/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 11.2.1
-- The CXX compiler identification is GNU 11.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/local/bin/arm-none-eabi-gcc
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/user/zephyrproject/zephyr/build
-- west build: building application
[1/156] Preparing syscall dependency handling

[2/156] Generating include/generated/version.h
-- Zephyr version: 3.0.99 (/Users/user/zephyrproject/zephyr), build: zephyr-v3.0.0-2262-ge8a369e7da50
[19/156] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj
FAILED: zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj
ccache /usr/local/bin/arm-none-eabi-gcc -DCORE_CM4 -DHSE_VALUE=32000000 -DKERNEL -DSTM32WB55xx -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/Users/user/zephyrproject/zephyr/kernel/include -I/Users/user/zephyrproject/zephyr/arch/arm/include -I/Users/user/zephyrproject/zephyr/include -I/Users/user/zephyrproject/zephyr/build/zephyr/include/generated -I/Users/user/zephyrproject/zephyr/soc/arm/st_stm32/stm32wb -I/Users/user/zephyrproject/zephyr/drivers -I/Users/user/zephyrproject/zephyr/soc/arm/st_stm32/common -I/Users/user/zephyrproject/modules/hal/cmsis/CMSIS/Core/Include -I/Users/user/zephyrproject/modules/hal/atmel/include -I/Users/user/zephyrproject/modules/hal/stm32/stm32cube/stm32wbxx/soc -I/Users/user/zephyrproject/modules/hal/stm32/stm32cube/stm32wbxx/drivers/include -I/Users/user/zephyrproject/modules/hal/stm32/stm32cube/stm32wbxx/drivers/include/Legacy -I/Users/user/zephyrproject/modules/hal/stm32/stm32cube/common_ll/include -isystem /Users/user/zephyrproject/zephyr/lib/libc/minimal/include -isystem /Applications/ARM/bin/../lib/gcc/arm-none-eabi/11.2.1/include -isystem /Applications/ARM/bin/../lib/gcc/arm-none-eabi/11.2.1/include-fixed -Os -imacros /Users/user/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -imacros /Users/user/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/Users/user/zephyrproject/zephyr/samples/basic/blinky=CMAKE_SOURCE_DIR -fmacro-prefix-map=/Users/user/zephyrproject/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/Users/user/zephyrproject=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj -MF zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj.d -o zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj -c /Users/user/zephyrproject/zephyr/lib/os/timeutil.c
/Users/user/zephyrproject/zephyr/lib/os/timeutil.c: In function 'timeutil_sync_skew_to_ppb':
/Users/user/zephyrproject/zephyr/lib/os/timeutil.c:185:9: internal compiler error: Illegal instruction: 4
185 | int64_t ppb64 = (int64_t)((1.0 - (double)skew) * 1E9);
| ^~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.linaro.org/ <https://bugs.linaro.org/>> for instructions.
[28/156] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/thread_entry.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /Users/user/zephyrproject/zephyr/build
users-MacBook-Pro:zephyr user$

Would anyone know what might be the issue and how to resolve this?

Best Regards
Sowmya




Join {users@lists.zephyrproject.org to automatically receive all group messages.