Re: Build error with west T2 star topology


Bolivar, Marti
 

"Attilio Dona via Lists.Zephyrproject.Org"
<attilio.dona=gmail.com@...> writes:

I'm trying to setup a T2 topology (Star topology with an application
repository as the manifest repository
<https://docs.zephyrproject.org/latest/guides/west/repo-tool.html#topologies-supported>
).

The most similar problem that I've found it is from the thread
https://lists.zephyrproject.org/g/users/message/1710
but after all the checkings I'm not able to get my setup working.

zhing is the directory of my manifest project, with the following
zhing/west.yml config

manifest:
defaults:
remote: upstream

remotes:
- name: upstream
url-base: https://github.com/attdona
- name: zephyr
url-base: https://github.com/zephyrproject-rtos
- name: juullabs-oss
url-base: https://github.com/JuulLabs-OSS

projects:
- name: net-tools
remote: zephyr
revision: 30b7efa827b04d2e47840716b0372737fe7d6c92
- name: tinycbor
remote: zephyr
path: modules/lib/tinycbor
revision: 31ae89e4b768612722620cb6cb173a0de4a19cc9
- name: zephyr
remote: zephyr
revision: v2.0.0
west-commands: scripts/west-commands.yml
- name: mcuboot
remote: juullabs-oss
revision: 704b8ba4815fc1d214df477676ca6d2eb419a4eb
- name: hal_nordic
remote: zephyr
revision: 7bf2d404d0bf7f36d77d5090b5207f8b4676776c
path: modules/hal/nordic
- name: mbedtls
remote: zephyr
revision: 4bba3b845453033b7ac9ecabb6cf694d8c1381a1
path: modules/crypto/mbedtls

self:
path: zhing


When I build my project I get a compilation error because tinycbor includes
are not present in compilation rules.

Below a build with a build with the zephyrsmp_srv sample that reproduce the
problem.

(zh) adona@attilio-pc:~/tmp/ZHING$ west build -b nrf52840_pca10056
zephyr/samples/subsys/mgmt/mcumgr/smp_svr --pristine
Thanks for including a full log of a pristine build.

-- west build: making build dir /home/adona/tmp/ZHING/build pristine
-- west build: build configuration:
source directory:
/home/adona/tmp/ZHING/zephyr/samples/subsys/mgmt/mcumgr/smp_svr
build directory: /home/adona/tmp/ZHING/build
BOARD: nrf52840_pca10056 (origin: command line)
-- west build: generating a build system
Zephyr version: 2.0.0
-- Found PythonInterp: /home/adona/tmp/ZHING/zhing/zh/bin/python (found
suitable version "3.6.8", minimum required is "3.4")
-- Selected BOARD nrf52840_pca10056
-- Found west: /home/adona/tmp/ZHING/zhing/zh/bin/west (found suitable
version "0.6.2", minimum required is "0.6.0")
-- Loading
/home/adona/tmp/ZHING/zephyr/boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts
as base
-- Overlaying /home/adona/tmp/ZHING/zephyr/dts/common/common.dts
Device tree configuration written to
/home/adona/tmp/ZHING/build/zephyr/include/generated/generated_dts_board.conf
Parsing Kconfig tree in /home/adona/tmp/ZHING/zephyr/Kconfig
Loaded configuration
'/home/adona/tmp/ZHING/zephyr/boards/arm/nrf52840_pca10056/nrf52840_pca10056_defconfig'
Merged configuration
'/home/adona/tmp/ZHING/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/prj.conf'
Configuration saved to '/home/adona/tmp/ZHING/build/zephyr/.config'
-- Cache files will be written to: /home/adona/.cache/zephyr
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- The ASM compiler identification is GNU
-- Found assembler: /opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Performing Test toolchain_is_ok
-- Performing Test toolchain_is_ok - Success
Including module: tinycbor in path:
/home/adona/tmp/ZHING/modules/lib/tinycbor
Looks like the tinycbor module as found, based on this output.

Including module: nordic in path: /home/adona/tmp/ZHING/modules/hal/nordic
Including module: mbedtls in path:
/home/adona/tmp/ZHING/modules/crypto/mbedtls
-- Configuring done
-- Generating done
-- Build files have been written to: /home/adona/tmp/ZHING/build
-- west build: building application
[1/202] Preparing syscall dependency handling

[117/202] Building C object CMakeFiles/app.dir/src/main.c.obj
FAILED: CMakeFiles/app.dir/src/main.c.obj
ccache /opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-DBUILD_VERSION=zephyr-v2.0.0 -DKERNEL -DNRF52840_XXAA -D_FORTIFY_SOURCE=2
-D__ZEPHYR__=1 -I/home/adona/tmp/ZHING/zephyr/kernel/include
-I/home/adona/tmp/ZHING/zephyr/arch/arm/include
-I/home/adona/tmp/ZHING/zephyr/include
-I/home/adona/tmp/ZHING/zephyr/include/drivers -Izephyr/include/generated
-I/home/adona/tmp/ZHING/zephyr/soc/arm/nordic_nrf/nrf52
-I/home/adona/tmp/ZHING/zephyr/soc/arm/nordic_nrf/include
-I/home/adona/tmp/ZHING/zephyr/ext/lib/crypto/tinycrypt/include
-I/home/adona/tmp/ZHING/zephyr/ext/lib/fnmatch/.
-I/home/adona/tmp/ZHING/zephyr/ext/hal/cmsis/Include
-I/home/adona/tmp/ZHING/zephyr/subsys/bluetooth
-I/home/adona/tmp/ZHING/zephyr/subsys/bluetooth/controller/ll_sw/nordic
-I/home/adona/tmp/ZHING/modules/hal/nordic/nrfx
-I/home/adona/tmp/ZHING/modules/hal/nordic/nrfx/drivers/include
-I/home/adona/tmp/ZHING/modules/hal/nordic/nrfx/hal
-I/home/adona/tmp/ZHING/modules/hal/nordic/nrfx/mdk
-I/home/adona/tmp/ZHING/modules/hal/nordic/. -isystem
/home/adona/tmp/ZHING/zephyr/lib/libc/minimal/include -isystem
/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/include
-isystem
/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/include-fixed
-Os -imacros/home/adona/tmp/ZHING/build/zephyr/include/generated/autoconf.h
-ffreestanding -fno-common -g -mthumb -mcpu=cortex-m4
-imacros/home/adona/tmp/ZHING/zephyr/include/toolchain/zephyr_stdint.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/adona/tmp/ZHING/zephyr/samples/subsys/mgmt/mcumgr/smp_svr=CMAKE_SOURCE_DIR
-fmacro-prefix-map=/home/adona/tmp/ZHING/zephyr=ZEPHYR_BASE
-ffunction-sections -fdata-sections -mabi=aapcs -march=armv7e-m -std=c99
-nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF
CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj
-c
/home/adona/tmp/ZHING/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/src/main.c
In file included from
/home/adona/tmp/ZHING/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/src/main.c:12:
/home/adona/tmp/ZHING/zephyr/include/mgmt/buf.h:11:10: fatal error:
cbor_encoder_writer.h: No such file or directory
#include "cbor_encoder_writer.h"
^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

west is on PATH and tinycbor seems correctly managed:

(zh) adona@attilio-pc:~/tmp/ZHING$ west -V
West version: v0.6.2

(zh) adona@attilio-pc:~/tmp/ZHING$ type west
west is hashed (/home/adona/tmp/ZHING/zhing/zh/bin/west)

(zh) adona@attilio-pc:~/tmp/ZHING$ west list tinycbor
tinycbor modules/lib/tinycbor
31ae89e4b768612722620cb6cb173a0de4a19cc9
https://github.com/zephyrproject-rtos/tinycbor

(zh) adona@attilio-pc:~/tmp/ZHING$ cat build/zephyr_modules.txt
"tinycbor":"/home/adona/tmp/ZHING/modules/lib/tinycbor"
"nordic":"/home/adona/tmp/ZHING/modules/hal/nordic"
"mbedtls":"/home/adona/tmp/ZHING/modules/crypto/mbedtls"
I agree that this all looks fine where the west manifest and zephyr
modules are concerned.


What could be wrong?
The compiler command line for the file which fails to build doesn't have
/home/adona/tmp/ZHING/modules/lib/tinycbor/src on the include path. That
is where cbor_encoder_writer.h is located, so it makes sense that the
build is failing.

Any other check that is it worth to be done?
Looking at tinycbor/CMakeLists.txt, my guess is that somehow
CONFIG_TINYCBOR=n in your build, which is preventing the TINYCBOR
library from being linked into zephyr_interface. Just a guess, though.
You can check /home/adona/tmp/ZHING/build/zephyr/.config to be sure.

On my machine, using the upstream manifest and building the same app,
it's y:

$ grep CONFIG_TINYCBOR build/zephyr/.config
CONFIG_TINYCBOR=y

If you see =n, that's the problem, but then I'm not sure what could be
causing it.

Marti


Thanks for your help,
Attilio

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