Re: build failed due to missing headers


Carles Cufi
 

On 10/4/19 1:50 PM, Cufi, Carles wrote:
Hi there,

I'm doing (west version is 0.6.2):
west build -b nrf52840_mdk samples/basic/blinky

and got:
...
...
../soc/arm/nordic_nrf/nrf52/soc.h:16:10: fatal error: nrfx.h: No such
file or directory
#include <nrfx.h>
^~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.


Any idea, on what is wrong and how to fix it?
Works fine here, are you sure you ran "west update"?
yeap.

nrxf.h exist in modules directory but doesn't seems to be picked up:

sdalu@hyperion:~/Z/zephyrproject$ find . -name 'nrfx.h'
./modules/lib/openthread/third_party/NordicSemiconductor/nrfx/nrfx.h
./modules/hal/nordic/nrfx/nrfx.h


re-run west update:
=== updating hal_atmel (modules/hal/atmel):
--- hal_atmel: checked out 04ff67a0826a51041e51034faf8fc4d3eeacd846 as
detached HEAD === updating ci-tools (tools/ci-tools):
--- ci-tools: checked out e01f3bce2a94847253369efb9a081f5c0e9ec882 as
detached HEAD === updating civetweb (modules/lib/civetweb):
--- civetweb: checked out 99129c5efc907ea613c4b73ccff07581feb58a7a as
detached HEAD === updating esp-idf (modules/hal/esp-idf):
--- esp-idf: checked out 6835bfc741bf15e98fb7971293913f770df6081f as
detached HEAD === updating fatfs (modules/fs/fatfs):
--- fatfs: checked out df96914dd989907f3a5de4cb95b116c2f305820d as
detached HEAD === updating hal_cypress (modules/hal/cypress):
--- hal_cypress: checked out a12d92816a53a521d79cefcf5c38b9dc8a4fed6e as
detached HEAD === updating hal_nordic (modules/hal/nordic):
--- hal_nordic: checked out 1b14177ff2176a1d17f3dd5e7e217f44337255db as
detached HEAD === updating hal_openisa (modules/hal/openisa):
--- hal_openisa: checked out be5c01f86c96500def5079bcc58d2baefdffb6c8 as
detached HEAD === updating hal_microchip (modules/hal/microchip):
--- hal_microchip: checked out 85302959c0c659311cf90ac51d133e5ce19c9288
as detached HEAD
=== updating hal_silabs (modules/hal/silabs):
--- hal_silabs: checked out 9151e614c23997074acd1096a3e8a9e5c255d5b9 as
detached HEAD === updating hal_st (modules/hal/st):
--- hal_st: checked out 0ec40aed8087f26bd9ac1b70fb5a6c326a6451aa as
detached HEAD === updating hal_stm32 (modules/hal/stm32):
--- hal_stm32: checked out 272281a1990ec7097f1844778955ed60fe28662a as
detached HEAD === updating hal_ti (modules/hal/ti):
--- hal_ti: checked out 7a82e93e14766ef6e42df9915ea2ab8e3b952a8b as
detached HEAD === updating libmetal (modules/hal/libmetal):
--- libmetal: checked out 45e630d6152824f807d3f919958605c4626cbdff as
detached HEAD === updating lvgl (modules/lib/gui/lvgl):
--- lvgl: checked out d4708d0a432e95f51bdc712591ba5295b751140c as
detached HEAD === updating mbedtls (modules/crypto/mbedtls):
--- mbedtls: checked out bbcb1b14285ac1b694d8c7e47c2f139c80b7fc4c as
detached HEAD === updating mcumgr (modules/lib/mcumgr):
--- mcumgr: checked out 84934959d2d1722a23b7e7e200191ae4a6f96168 as
detached HEAD === updating net-tools (tools/net-tools):
--- net-tools: checked out 30b7efa827b04d2e47840716b0372737fe7d6c92 as
detached HEAD === updating nffs (modules/fs/nffs):
--- nffs: checked out bc62a2fa9d98ddb5d633c932ea199bc68e10f194 as
detached HEAD === updating hal_nxp (modules/hal/nxp):
--- hal_nxp: checked out 97265a5396edc6a9de5f2fb643d505f37064e606 as
detached HEAD === updating open-amp (modules/lib/open-amp):
--- open-amp: checked out 9b591b289e1f37339bd038b5a1f0e6c8ad39c63a as
detached HEAD === updating openthread (modules/lib/openthread):
--- openthread: checked out 3c32244f098f8daf8741efe0a2ad839b67f8567f as
detached HEAD === updating segger (modules/debug/segger):
--- segger: checked out 6fcf61606d6012d2c44129edc033f59331e268bc as
detached HEAD === updating tinycbor (modules/lib/tinycbor):
--- tinycbor: checked out 31ae89e4b768612722620cb6cb173a0de4a19cc9 as
detached HEAD === updating littlefs (modules/fs/littlefs):
--- littlefs: checked out fe9572dd5a9fcf93a249daa4233012692bd2881d as
detached HEAD


Got same error:
sdalu@hyperion:~/Z/zephyrproject/zephyr$ ~/.local/bin/west build -b
nrf52840_mdk samples/basic/blinky
-- west build: build configuration:
source directory:
/home/sdalu/Z/zephyrproject/zephyr/samples/basic/blinky
build directory: /home/sdalu/Z/zephyrproject/zephyr/build
BOARD: nrf52840_mdk (origin: CMakeCache.txt)
-- west build: building application
[1/106] Building C object
zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
FAILED:
zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
ccache /usr/local/gcc-arm-embedded/bin/arm-none-eabi-gcc
-DBUILD_VERSION=zephyr-v2.0.0-920-g4bca0f3d3391 -DKERNEL
-D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I../kernel/include
-I../arch/arm/include -I../include -I../include/drivers -
Izephyr/include/generated -I../soc/arm/nordic_nrf/nrf52 -
I../ext/hal/cmsis/Include -isystem ../lib/libc/minimal/include -isystem
/usr/local/gcc-arm-embedded-8-2018-q4-major/bin/../lib/gcc/arm-none-
eabi/8.2.1/include
-isystem
/usr/local/gcc-arm-embedded-8-2018-q4-major/bin/../lib/gcc/arm-none-
eabi/8.2.1/include-fixed
-Os
-
imacros/home/sdalu/Z/zephyrproject/zephyr/build/zephyr/include/generated
/autoconf.h
-ffreestanding -fno-common -g -mthumb -mcpu=cortex-m4 -
imacros/home/sdalu/Z/zephyrproject/zephyr/include/toolchain/zephyr_stdin
t.h
-Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-
pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -
Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -
fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-
prefix-
map=/home/sdalu/Z/zephyrproject/zephyr/samples/basic/blinky=CMAKE_SOURCE
_DIR
-fmacro-prefix-map=/home/sdalu/Z/zephyrproject/zephyr=ZEPHYR_BASE
-ffunction-sections -fdata-sections -mabi=aapcs -march=armv7e-m -std=c99
-nostdinc -MD -MT
zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj -MF
zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj.d -o
zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj -c
/home/sdalu/Z/zephyrproject/zephyr/arch/arm/core/offsets/offsets.c
In file included from ../include/arch/arm/cortex_m/cmsis.h:17,
from
../include/arch/arm/cortex_m/mpu/arm_mpu_v7m.h:10,
from ../include/arch/arm/cortex_m/mpu/arm_mpu.h:13,
from ../include/arch/arm/arch.h:246,
from ../include/arch/cpu.h:17,
from ../include/kernel_includes.h:34,
from ../include/kernel.h:17,
from ../kernel/include/kernel_structs.h:10,
from
/home/sdalu/Z/zephyrproject/zephyr/arch/arm/core/offsets/offsets.c:26:
../soc/arm/nordic_nrf/nrf52/soc.h:16:10: fatal error: nrfx.h: No such
file or directory
#include <nrfx.h>
^~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
ERROR: command exited with status 1: /usr/local/bin/cmake --build
/home/sdalu/Z/zephyrproject/zephyr/build
Can you try removing the entire /home/sdalu/Z/zephyrproject/zephyr/build folder and building again? It might be an issue with stale build files.

Carles

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