nRF Connect Documentation Build

I'm trying to build the documentation on a Windows 10 system. I've installed all of the required tools and made it to step 4 when I get the following:

C:\ncs\v1.9.1\nrf\doc>cmake -GNinja -S. -B_build
-- Configuring done
-- Generating done
-- Build files have been written to: C:/ncs/v1.9.1/nrf/doc/_build

C:\ncs\v1.9.1\nrf\doc>cd _build

C:\ncs\v1.9.1\nrf\doc\_build>ninja
ninja: error: '/scripts/requirements.txt', needed by 'nrf/src/versions.txt', missing and no known rule to make it

Any clue as to the ninja error?

Steve

  • Hi Steve,

    From the error it seems like the Python dependencies were not installed correctly. Please go to the C:/ncs/v1.9.1 folder and run the following commands:

    pip3 install -r zephyr/scripts/requirements.txt
    pip3 install -r nrf/scripts/requirements.txt
    pip3 install -r bootloader/mcuboot/scripts/requirements.txt

    After this delete all files and folders in C:/ncs/v1.9.1/nrf/doc that was created when you tried to build the documentation previously before trying again.

    Best regards,

    Marte

  • Hi Marte,

    When I run the pips, I got "Requirement already satisfied:..." for all requirements.

    Obviously I shouldn't delete all of the files in c:/ncs/v1.9.1/nrf/doc so I deleted just the _build folder as it was the only one recently created.

    The results are essentially the same:

    C:\ncs\v1.9.1\nrf\doc>cmake -GNinja -S. -B_build
    -- Found PythonInterp: C:/ncs/v1.9.1/toolchain/opt/bin/python.exe (found suitable version "3.8.2", minimum required is "3.4")
    -- Found Doxygen: C:/Program Files/doxygen/bin/doxygen.exe (found suitable version "1.9.3 (c0b9eafbfb53286ce31e75e2b6c976ee4d345473)", minimum required is "1.8.18") found components: doxygen
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/ncs/v1.9.1/nrf/doc/_build

    C:\ncs\v1.9.1\nrf\doc>cd _build

    C:\ncs\v1.9.1\nrf\doc\_build>ninja
    ninja: error: '/scripts/requirements.txt', needed by 'nrf/src/versions.txt', missing and no known rule to make it

    I've gone so far as to install the entire toolchain on a clean Windows 7 machine then trying to build the documentation there with the same issue occurring.

    Regards

    Steve

  • When it doesn't work on the current version, drop back a version...

    I Installed V1.9.0 in a new install folder C:\ncs1...

    re-ran all of the steps and it failed again but with different errors -

    C:\ncs1\v1.9.0\nrf\doc\_build>ninja
    [0/14] cmd.exe /C "cd /D C:\ncs1\v1.9.0\nrf\doc\_build && ...uild/matter/src C:/ncs1/v1.9.0/nrf/doc/_build/html/matter"
    Running Sphinx v4.5.0
    Cache disabled, set NCS_CACHE_ENABLE to enable it
    making output directory... done
    building [mo]: targets for 0 po files that are out of date
    building [html]: targets for 0 source files that are out of date
    updating environment: [new config] 12 added, 0 changed, 0 removed
    reading sources... [  8%] BUILDING
    Extension error (sphinx_markdown_tables):
    Handler <function process_tables at 0x00000258BD7A6E50> for event 'source-read' threw an exception (exception: 'zipimporter' object has no attribute 'exec_module')
    [2/14] Generating nrf/src/versions.txt
    FAILED: CMakeFiles/matter-html-all
    cmd.exe /C "cd /D C:\ncs1\v1.9.0\nrf\doc\_build && C:\ncs1\v1.9.0\toolchain\opt\bin\cmake.exe -E make_directory C:/ncs1/v1.9.0/nrf/doc/_build/matter C:/ncs1/v1.9.0/nrf/doc/_build/matter/src && C:\ncs1\v1.9.0\toolchain\opt\bin\cmake.exe -E env "DOXYGEN_EXECUTABLE=C:/Program Files/doxygen/bin/doxygen.exe" C:/ncs1/v1.9.0/toolchain/opt/bin/Scripts/sphinx-build.exe -b html -c C:/ncs1/v1.9.0/nrf/doc/matter -d C:/ncs1/v1.9.0/nrf/doc/_build/matter/doctree -w C:/ncs1/v1.9.0/nrf/doc/_build/matter/html.log -j auto C:/ncs1/v1.9.0/nrf/doc/_build/matter/src C:/ncs1/v1.9.0/nrf/doc/_build/html/matter"
    [4/14] cmd.exe /C "cd /D C:\ncs1\v1.9.0\nrf\doc\_build && .../nrf/doc/_build MCUboot,C:/ncs1/v1.9.0/bootloader/mcuboot"
    warning: DUMMY_DMA (defined at boards\xtensa\nxp_adsp_imx8\Kconfig.defconfig:10, boards\xtensa\nxp_adsp_imx8m\Kconfig.defconfig:10, boards\xtensa\nxp_adsp_imx8x\Kconfig.defconfig:10) defined without a type
    warning: IMX_EDMA (defined at boards\xtensa\nxp_adsp_imx8\Kconfig.defconfig:14, boards\xtensa\nxp_adsp_imx8x\Kconfig.defconfig:14) defined without a type
    warning: IMX_SDMA (defined at boards\xtensa\nxp_adsp_imx8m\Kconfig.defconfig:14) defined without a type
    warning: the choice symbol SOC_XILINX_ZYNQ7000 (defined at C:/ncs1/v1.9.0/zephyr/soc\arm\xilinx_zynq7000\Kconfig.soc:19, soc\arm\xilinx_zynq7000\Kconfig.soc:19) is defined with a prompt outside the choice

    Goes on for many 100s of lines with the final being

    warning: the choice symbol SOC_NXP_IMX8M (defined at soc/xtensa/nxp_adsp\imx8m\Kconfig.soc:7, soc/xtensa/nxp_adsp\imx8m\Kconfig.soc:7) is defined with a prompt outside the choice
    ninja: build stopped: subcommand failed.

    I give up. I've used up a week attempting to get documentation on Zepher/nRF Connect. Trying to piece together an understanding of a open source system using disparate documentation and others cryptic sample code is never a productive way to build and validate a medical application.

    Fortunately the Laird module we're using supplies smartBASIC as an alternative that is well and full documented. SOUP is SOUP. (Software Of unknown Provenance).

    I remember why we ran away from Nordic 8 years ago. :-(

    See Ya

  • Hi Steve,

    I am sorry to hear about your experience with Nordic. 

    I am not able to reproduce your issues on my side. The error message in your latest reply seems like it might be solved by updating to Python 3.10, since exec_module was new in 3.10, but I do not know why you are getting all the warnings or whether they will impact anything or not.

    You mention Windows 7 in your previous reply. We do not officially support Windows 7, and neither does Microsoft as you can see here Windows 7 support ended on January 14, 2020, so unfortunately we cannot guarantee that our tools will work with this OS.

    You can also look at our documentation online here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/index.html.

    Best regards,

    Marte

  • this error: 'zipimporter' object has no attribute 'exec_module', was due to sdk use emmbed python, and the standard library is a zip file.

    see github.com/.../1132https://github.com/Python-Markdown/markdown/issues/1132#issuecomment-1222395487

    simply extract 'html' folder out from <SDK>\toolchains\v2.2.0\opt\bin\python38.zip fix this issue

Related