Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choosing CONFIG_CHIP Kconfig breaks LwM2M client client example build #44519

Closed
billkarduck opened this issue Apr 4, 2022 · 1 comment
Closed
Labels
area: LWM2M bug The issue is a bug, or the PR is fixing a bug

Comments

@billkarduck
Copy link

Describe the bug
Choosing CHIP Kconfig breaks LwM2M client example build.
The selection Chip Kconfig CONFIG_CHIP defines CONFIG_POSIX_API via and imply rule.
Adding CONFIG_POSIX_API=n fails too.

Please also mention any information which could help others to understand
the problem you're facing:
I need to send messages via LwM2M protocol from the CHIP/Matter node

To Reproduce

  1. cd zephyr/samples/net/lwm2m_client
  2. Add the CHIP definition to the prj.conf file
    ###Enable CHIP
    CONFIG_CHIP=y
    CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y
    CONFIG_CHIP_PROJECT_CONFIG="src/chip_project_config.h"
    CONFIG_STD_CPP14=y
  3. rm -rf build
  4. west build -b nrf5340dk_nrf5340_cpuapp

Expected behavior
LwM2M Client examples builds and links

Impact
Show Stopper

Logs and console output
../lwm2m_client-> west build -b nrf5340dk_nrf5340_cpuapp
-- west build: generating a build system
Including boilerplate (Zephyr base): /home/bill/d/neworld/nexgen/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/bill/d/neworld/nexgen/zephyr/samples/net/lwm2m_client
-- Zephyr version: 2.7.99 (/home/bill/d/neworld/nexgen/zephyr), build: v2.7.99-ncs1-17-gc3208e7ff49d
-- Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.10") found components: Interpreter
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: nrf5340dk_nrf5340_cpuapp
-- Cache files will be written to: /home/bill/.cache/zephyr
-- Found dtc: /usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/mnt/eeb8b0c9-9b6f-4f44-8eb1-f7f5c469c53a/toolchains/gcc-arm-none-eabi-10.3-2021.10)
-- Found BOARD.dts: /home/bill/d/neworld/nexgen/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts
-- Generated zephyr.dts: /home/bill/d/neworld/nexgen/zephyr/samples/net/lwm2m_client/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/bill/d/neworld/nexgen/zephyr/samples/net/lwm2m_client/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /home/bill/d/neworld/nexgen/zephyr/samples/net/lwm2m_client/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /home/bill/d/neworld/nexgen/zephyr/samples/net/lwm2m_client/build/zephyr/dts.cmake
Parsing /home/bill/d/neworld/nexgen/zephyr/Kconfig
Loaded configuration '/home/bill/d/neworld/nexgen/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_defconfig'
Merged configuration '/home/bill/d/neworld/nexgen/zephyr/samples/net/lwm2m_client/prj.conf'

warning: TEST_RANDOM_GENERATOR (defined at subsys/random/Kconfig:8) was assigned the value 'y' but
got the value 'n'. Check these unsatisfied dependencies: (!ENTROPY_HAS_DRIVER) (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_TEST_RANDOM_GENERATOR.html and/or look
up TEST_RANDOM_GENERATOR in the menuconfig/guiconfig interface. The Application Development Primer,
Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
helpful too.

warning: Experimental symbol CHIP is enabled.

warning: NET_SOCKETS_POSIX_NAMES (defined at subsys/net/lib/sockets/Kconfig:23) has direct dependencies !POSIX_API && NET_SOCKETS && NETWORKING with value n, but is currently being y-selected by the following symbols:

  • LWM2M (defined at subsys/net/lib/lwm2m/Kconfig:4), with value y, direct dependencies NETWORKING (value: y), and select condition NETWORKING (value: y)

error: Aborting due to Kconfig warnings

CMake Error at /home/bill/d/neworld/nexgen/zephyr/cmake/kconfig.cmake:272 (message):
command failed with return code: 1
Call Stack (most recent call first):
/home/bill/d/neworld/nexgen/zephyr/cmake/app/boilerplate.cmake:544 (include)
/home/bill/d/neworld/nexgen/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
/home/bill/d/neworld/nexgen/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
CMakeLists.txt:4 (find_package)

-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /home/bill/.local/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/mnt/eeb8b0c9-9b6f-4f44-8eb1-f7f5c469c53a/neworld/nexgen/zephyr/samples/net/lwm2m_client/build -S/mnt/eeb8b0c9-9b6f-4f44-8eb1-f7f5c469c53a/neworld/nexgen/zephyr/samples/net/lwm2m_client -GNinja -DBOARD=nrf5340dk_nrf5340_cpuapp

Try Adding CONFIG_POSIX_API=n to the prj.conf, but fails in this way:
../lwm2m_client-> west build -b nrf5340dk_nrf5340_cpuapp
-- west build: generating a build system
Including boilerplate (Zephyr base): /home/bill/d/neworld/nexgen/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/bill/d/neworld/nexgen/zephyr/samples/net/lwm2m_client
-- Zephyr version: 2.7.99 (/home/bill/d/neworld/nexgen/zephyr), build: v2.7.99-ncs1-17-gc3208e7ff49d
-- Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.10") found components: Interpreter
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: nrf5340dk_nrf5340_cpuapp
-- Cache files will be written to: /home/bill/.cache/zephyr
-- Found dtc: /usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/mnt/eeb8b0c9-9b6f-4f44-8eb1-f7f5c469c53a/toolchains/gcc-arm-none-eabi-10.3-2021.10)
-- Found BOARD.dts: /home/bill/d/neworld/nexgen/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts
-- Generated zephyr.dts: /home/bill/d/neworld/nexgen/zephyr/samples/net/lwm2m_client/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/bill/d/neworld/nexgen/zephyr/samples/net/lwm2m_client/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /home/bill/d/neworld/nexgen/zephyr/samples/net/lwm2m_client/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /home/bill/d/neworld/nexgen/zephyr/samples/net/lwm2m_client/build/zephyr/dts.cmake
Parsing /home/bill/d/neworld/nexgen/zephyr/Kconfig
Loaded configuration '/home/bill/d/neworld/nexgen/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_defconfig'
Merged configuration '/home/bill/d/neworld/nexgen/zephyr/samples/net/lwm2m_client/prj.conf'
Configuration saved to '/home/bill/d/neworld/nexgen/zephyr/samples/net/lwm2m_client/build/zephyr/.config'
Kconfig header saved to '/home/bill/d/neworld/nexgen/zephyr/samples/net/lwm2m_client/build/zephyr/include/generated/autoconf.h'

warning: TEST_RANDOM_GENERATOR (defined at subsys/random/Kconfig:8) was assigned the value 'y' but
got the value 'n'. Check these unsatisfied dependencies: (!ENTROPY_HAS_DRIVER) (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_TEST_RANDOM_GENERATOR.html and/or look
up TEST_RANDOM_GENERATOR in the menuconfig/guiconfig interface. The Application Development Primer,
Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
helpful too.

warning: Experimental symbol CHIP is enabled.

-- The C compiler identification is GNU 10.3.1
-- The CXX compiler identification is GNU 10.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /home/bill/d/toolchains/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-gcc
-- Found Python3: /usr/bin/python3.8 (found version "3.8.10") found components: Interpreter
CMake Error at /home/bill/d/neworld/nexgen/modules/lib/matter/config/nrfconnect/chip-module/CMakeLists.txt:184 (chip_gn_arg_cflags):
chip_gn_arg_cflags Macro invoked with incorrect arguments for macro named:
chip_gn_arg_cflags

CMake Warning at /home/bill/d/neworld/nexgen/zephyr/CMakeLists.txt:764 (message):
No SOURCES given to Zephyr library: subsys__net__pkt_filter

Excluding target from build.

-- Configuring incomplete, errors occurred!
See also "/home/bill/d/neworld/nexgen/zephyr/samples/net/lwm2m_client/build/CMakeFiles/CMakeOutput.log".
See also "/home/bill/d/neworld/nexgen/zephyr/samples/net/lwm2m_client/build/CMakeFiles/CMakeError.log".
FATAL ERROR: command exited with status 1: /home/bill/.local/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/mnt/eeb8b0c9-9b6f-4f44-8eb1-f7f5c469c53a/neworld/nexgen/zephyr/samples/net/lwm2m_client/build -S/mnt/eeb8b0c9-9b6f-4f44-8eb1-f7f5c469c53a/neworld/nexgen/zephyr/samples/net/lwm2m_client -GNinja -DBOARD=nrf5340dk_nrf5340_cpuapp

Environment (please complete the following information):

  • OS:Linux, Ubuntu 20 LTS
  • Zephyr SDK, Nordic Nrf Connect
  • head manifest c3208e7

Additional context

@billkarduck billkarduck added the bug The issue is a bug, or the PR is fixing a bug label Apr 4, 2022
@mbolivar-nordic
Copy link
Contributor

Please re-file this request on DevZone; this is an NCS-specific question and this is the upstream Zephyr github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: LWM2M bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

No branches or pull requests

3 participants