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

Infinite configuring loop for samples\drivers\led_ws2812 sample #37637

Closed
thedjnK opened this issue Aug 12, 2021 · 4 comments · Fixed by #38333
Closed

Infinite configuring loop for samples\drivers\led_ws2812 sample #37637

thedjnK opened this issue Aug 12, 2021 · 4 comments · Fixed by #38333
Assignees
Labels
area: LED Label to identify LED subsystem bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: medium Medium impact/importance bug

Comments

@thedjnK
Copy link
Collaborator

thedjnK commented Aug 12, 2021

Describe the bug
Upon configuring the sample application samples\drivers\led_ws2812 for the nrf52dk_nrf52832 target, it configures OK, when building with ninja however, it endlessly re-configures the project over and over

To Reproduce
Steps to reproduce the behavior:

  1. mkdir build; cd build
  2. cmake -GNinja -DBOARD=nrf52dk_nrf52832 ..
  3. ninja
  4. See loop

Expected behavior
The project to build

Impact
Impact wise the sample is useless, so showstopped in that regard, but in terms of priority, probably very low

Logs and console output
Configuring:

cmake -GNinja -DBOARD=nrf52dk_nrf52832 ..
Including boilerplate (Zephyr base): C:/zephy_5/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/zephy_5/zephyr/samples/drivers/led_ws2812
-- Zephyr version: 2.6.0-rc1 (C:/zephy_5/zephyr), build: v2.6.0-rc1-ncs1-6-gf1cb56cfb023
-- Found Python3: C:/Python38/python.exe (found suitable exact version "3.8.10") found components: Interpreter
-- Found west (found suitable version "0.11.0", minimum required is "0.7.1")
-- Board: nrf52dk_nrf52832
-- Cache files will be written to: C:/zephy_5/zephyr/.cache
-- Found toolchain: gnuarmemb (C:/gcc-arm)
-- Found BOARD.dts: C:/zephy_5/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832.dts
-- Found devicetree overlay: C:/zephy_5/zephyr/samples/drivers/led_ws2812/boards/nrf52dk_nrf52832.overlay
-- Generated zephyr.dts: C:/zephy_5/zephyr/samples/drivers/led_ws2812/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/zephy_5/zephyr/samples/drivers/led_ws2812/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: C:/zephy_5/zephyr/samples/drivers/led_ws2812/build/zephyr/include/generated/device_extern.h
Parsing C:/zephy_5/zephyr/samples/drivers/led_ws2812/Kconfig
Loaded configuration 'C:/zephy_5/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832_defconfig'
Merged configuration 'C:/zephy_5/zephyr/samples/drivers/led_ws2812/prj.conf'
Merged configuration 'C:/zephy_5/zephyr/samples/drivers/led_ws2812/boards/nrf52dk_nrf52832.conf'
Configuration saved to 'C:/zephy_5/zephyr/samples/drivers/led_ws2812/build/zephyr/.config'
Kconfig header saved to 'C:/zephy_5/zephyr/samples/drivers/led_ws2812/build/zephyr/include/generated/autoconf.h'
-- 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: C:/gcc-arm/bin/arm-none-eabi-gcc.exe
CMake Warning at ../../../soc/arm/nordic_nrf/nrf52/CMakeLists.txt:21 (message):
  Both SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58 and an NRF SPIM driver are
  enabled, therefore PAN 58 will apply if RXD.MAXCNT == 1 and TXD.MAXCNT <= 1


-- Application version: v2.6.0-rc1-ncs1-6-gf1cb56cfb023
-- Configuring done
-- Generating done
-- Build files have been written to: C:/zephy_5/zephyr/samples/drivers/led_ws2812/build

Building:

ninja
[0/1] Re-running CMake...
Including boilerplate (Zephyr base (cached)): C:/zephy_5/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/zephy_5/zephyr/samples/drivers/led_ws2812
-- Zephyr version: 2.6.0-rc1 (C:/zephy_5/zephyr), build: v2.6.0-rc1-ncs1-6-gf1cb56cfb023
-- Found west (found suitable version "0.11.0", minimum required is "0.7.1")
-- Board: nrf52dk_nrf52832
-- Cache files will be written to: C:/zephy_5/zephyr/.cache
-- Found toolchain: gnuarmemb (C:/gcc-arm)
-- Found BOARD.dts: C:/zephy_5/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832.dts
-- Found devicetree overlay: C:/zephy_5/zephyr/samples/drivers/led_ws2812/boards/nrf52dk_nrf52832.overlay
-- Generated zephyr.dts: C:/zephy_5/zephyr/samples/drivers/led_ws2812/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/zephy_5/zephyr/samples/drivers/led_ws2812/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: C:/zephy_5/zephyr/samples/drivers/led_ws2812/build/zephyr/include/generated/device_extern.h
Parsing C:/zephy_5/zephyr/samples/drivers/led_ws2812/Kconfig
Loaded configuration 'C:/zephy_5/zephyr/samples/drivers/led_ws2812/build/zephyr/.config'
No change to configuration in 'C:/zephy_5/zephyr/samples/drivers/led_ws2812/build/zephyr/.config'
No change to Kconfig header in 'C:/zephy_5/zephyr/samples/drivers/led_ws2812/build/zephyr/include/generated/autoconf.h'
CMake Warning at ../../../soc/arm/nordic_nrf/nrf52/CMakeLists.txt:21 (message):
  Both SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58 and an NRF SPIM driver are
  enabled, therefore PAN 58 will apply if RXD.MAXCNT == 1 and TXD.MAXCNT <= 1


-- Application version: v2.6.0-rc1-ncs1-6-gf1cb56cfb023
-- Configuring done
-- Generating done
-- Build files have been written to: C:/zephy_5/zephyr/samples/drivers/led_ws2812/build
[0/1] Re-running CMake...
Including boilerplate (Zephyr base (cached)): C:/zephy_5/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/zephy_5/zephyr/samples/drivers/led_ws2812
-- Zephyr version: 2.6.0-rc1 (C:/zephy_5/zephyr), build: v2.6.0-rc1-ncs1-6-gf1cb56cfb023
-- Found west (found suitable version "0.11.0", minimum required is "0.7.1")
-- Board: nrf52dk_nrf52832
-- Cache files will be written to: C:/zephy_5/zephyr/.cache
-- Found toolchain: gnuarmemb (C:/gcc-arm)
-- Found BOARD.dts: C:/zephy_5/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832.dts
-- Found devicetree overlay: C:/zephy_5/zephyr/samples/drivers/led_ws2812/boards/nrf52dk_nrf52832.overlay
-- Generated zephyr.dts: C:/zephy_5/zephyr/samples/drivers/led_ws2812/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/zephy_5/zephyr/samples/drivers/led_ws2812/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: C:/zephy_5/zephyr/samples/drivers/led_ws2812/build/zephyr/include/generated/device_extern.h
Parsing C:/zephy_5/zephyr/samples/drivers/led_ws2812/Kconfig
Loaded configuration 'C:/zephy_5/zephyr/samples/drivers/led_ws2812/build/zephyr/.config'
No change to configuration in 'C:/zephy_5/zephyr/samples/drivers/led_ws2812/build/zephyr/.config'
No change to Kconfig header in 'C:/zephy_5/zephyr/samples/drivers/led_ws2812/build/zephyr/include/generated/autoconf.h'
CMake Warning at ../../../soc/arm/nordic_nrf/nrf52/CMakeLists.txt:21 (message):
  Both SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58 and an NRF SPIM driver are
  enabled, therefore PAN 58 will apply if RXD.MAXCNT == 1 and TXD.MAXCNT <= 1


-- Application version: v2.6.0-rc1-ncs1-6-gf1cb56cfb023
-- Configuring done
ninja: error: rebuilding 'build.ninja': interrupted by user

Environment (please complete the following information):

  • OS: Windows 10
  • Toolchain: ARM GCC GNU 10.3.1 2021.07
  • Commit SHA or Version used: nRF connect SDK 1.6.1 with the version of zephyr that has
@thedjnK thedjnK added the bug The issue is a bug, or the PR is fixing a bug label Aug 12, 2021
@cfriedt cfriedt added area: LED Label to identify LED subsystem platform: nRF Nordic nRFx priority: low Low impact/importance bug labels Aug 17, 2021
@mbolivar-nordic
Copy link
Contributor

-- Application version: v2.6.0-rc1-ncs1-6-gf1cb56cfb023

@thedjnK This is not an upstream Zephyr version. Please retest on upstream Zephyr and reopen if it reproduces.

@mbolivar-nordic
Copy link
Contributor

@thedjnK if it only reproduces downstream, please use DevZone to let us know.

@epietrowicz
Copy link

epietrowicz commented Sep 3, 2021

I was able to reproduce using upstream (see attached for build logs).
Zephyr version: 2.6.99 (C:/Users/Jatin/zephyrproject/zephyr), build: zephyr-v2.6.0-2940-g529d9149d395

console_output_looping_bug.txt

@tejlmand tejlmand added priority: medium Medium impact/importance bug and removed priority: low Low impact/importance bug labels Sep 6, 2021
@tejlmand tejlmand reopened this Sep 6, 2021
@tejlmand
Copy link
Collaborator

tejlmand commented Sep 6, 2021

Fixed here: #38333

@tejlmand tejlmand added the has-pr label Sep 6, 2021
tejlmand added a commit to tejlmand/zephyr that referenced this issue Sep 6, 2021
Fixes: zephyrproject-rtos#37637

toolchain_parse_make_rule() parses depfiles and converted `\\` to the
CMake list separator `;`.

However, gcc -M might create depfiles with windows path separator `\`
causing this conversion to fail, as a path like:
c:\...\zephyr\samples\drivers\led_ws2812\nrf52-bindings.h

resulting in a file list as:
c:;...;zephyr;samples;drivers;led_ws2812;nrf52-bindings.h

which results in a CMake configure dependency to be added to `C:`.
As C: is always newer than the build.ninja file, this resulted in
continues CMake re-invocation.

As a small side-note, the `\` in file name did only occur in situations
where a relative past had been used elsewhere in the build system, such
as here:
https://github.com/zephyrproject-rtos/zephyr/blob/\
c3050a5/samples/drivers/led_ws2812/\
boards/nrf52dk_nrf52832.overlay#L9

To ensure proper handling of files, then all files are converted to
CMake paths, that is with forward slashes: `/`

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
cfriedt pushed a commit that referenced this issue Sep 11, 2021
Fixes: #37637

toolchain_parse_make_rule() parses depfiles and converted `\\` to the
CMake list separator `;`.

However, gcc -M might create depfiles with windows path separator `\`
causing this conversion to fail, as a path like:
c:\...\zephyr\samples\drivers\led_ws2812\nrf52-bindings.h

resulting in a file list as:
c:;...;zephyr;samples;drivers;led_ws2812;nrf52-bindings.h

which results in a CMake configure dependency to be added to `C:`.
As C: is always newer than the build.ninja file, this resulted in
continues CMake re-invocation.

As a small side-note, the `\` in file name did only occur in situations
where a relative past had been used elsewhere in the build system, such
as here:
https://github.com/zephyrproject-rtos/zephyr/blob/\
c3050a5/samples/drivers/led_ws2812/\
boards/nrf52dk_nrf52832.overlay#L9

To ensure proper handling of files, then all files are converted to
CMake paths, that is with forward slashes: `/`

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: LED Label to identify LED subsystem bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants