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

make htmldocs-fast not working in development workspace #31486

Closed
pabigot opened this issue Jan 21, 2021 · 1 comment · Fixed by #31534
Closed

make htmldocs-fast not working in development workspace #31486

pabigot opened this issue Jan 21, 2021 · 1 comment · Fixed by #31534
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug

Comments

@pabigot
Copy link
Collaborator

pabigot commented Jan 21, 2021

make htmldocs-fast fails for me with the following error:

tirzah[262]$ pwd
/mnt/nordic/zp/zephyr
tirzah[263]$ rm -rf doc/_build/
tirzah[264]$ make htmldocs-fast
make htmldocs KCONFIG_TURBO_MODE=1
make[1]: Entering directory '/mnt/nordic/zp/zephyr'
cmake -GNinja  -Bdoc/_build -Sdoc/ -DDOC_TAG=development \
	-DSPHINXOPTS=-q \
	-DKCONFIG_TURBO_MODE=1
-- Zephyr base: /mnt/nordic/zp/zephyr
-- West: /home/pab/.local/bin/west (west --version: "West version: v0.8.0")
-- Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.5") found components: Interpreter 
-- Found Doxygen: /usr/local/bin/doxygen (found version "1.9.0 (8e87f6bb404065d2c8802a9c61756e3c7a729fb1)") found components: doxygen 
-- Found LATEX: /usr/bin/latex   
-- Zephyr version: 2.4.99 (/mnt/nordic/zp/zephyr)
CMake Error at /mnt/nordic/zp/zephyr/cmake/zephyr_module.cmake:107 (zephyr_string):
  Unknown CMake command "zephyr_string".
Call Stack (most recent call first):
  CMakeLists.txt:47 (include)
-- Configuring incomplete, errors occurred!
See also "/mnt/nordic/zp/zephyr/doc/_build/CMakeFiles/CMakeOutput.log".
make[1]: *** [Makefile:25: configure] Error 1
make[1]: Leaving directory '/mnt/nordic/zp/zephyr'
make: *** [Makefile:16: htmldocs-fast] Error 2

On slack @utzig fixed this with the following patch:

diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 4c34e20e67..6fb3274851 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -44,6 +44,7 @@ include(${ZEPHYR_BASE}/cmake/version.cmake)
 # Process modules
 set(KCONFIG_BINARY_DIR ${CMAKE_BINARY_DIR}/Kconfig)
 file(MAKE_DIRECTORY ${KCONFIG_BINARY_DIR})
+include(${ZEPHYR_BASE}/cmake/extensions.cmake)
 include(${ZEPHYR_BASE}/cmake/zephyr_module.cmake)
 # Note that this won't force fatal error if latexmk is not found.

Once that's done, I get this error:

tirzah[268]$ make htmldocs-fast
make htmldocs KCONFIG_TURBO_MODE=1
make[1]: Entering directory '/mnt/nordic/zp/zephyr'
cmake -GNinja  -Bdoc/_build -Sdoc/ -DDOC_TAG=development \
	-DSPHINXOPTS=-q \
	-DKCONFIG_TURBO_MODE=1
-- Zephyr base: /mnt/nordic/zp/zephyr
-- West: /home/pab/.local/bin/west (west --version: "West version: v0.8.0")
-- Zephyr version: 2.4.99 (/mnt/nordic/zp/zephyr)
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/nordic/zp/zephyr/doc/_build
cmake --build doc/_build -- htmldocs  # -v # VERBOSE=1
[0/5] Running gen_devicetree_rest.py /mnt/nordic/zp/zephyr/doc/_build/rst/doc/reference/devicetree
[1/5] Running gen_kconfig_rest.py /mnt/nordic/zp/zephyr/doc/_build/rst/doc/reference/kconfig/
FAILED: CMakeFiles/kconfig 
cd /mnt/nordic/zp/zephyr/doc && /usr/bin/cmake -E make_directory /mnt/nordic/zp/zephyr/doc/_build/rst/doc/reference/kconfig && /usr/bin/cmake -E env PYTHONPATH=/mnt/nordic/zp/zephyr/scripts/kconfig:.:/home/pab/Utils/lib/python:/usr/local/lib64/python3.8/site-packages:/usr/local/lib/python3.8/site-packages:/mnt/nordic/zp/zephyr/scripts/dts ZEPHYR_BASE=/mnt/nordic/zp/zephyr srctree=/mnt/nordic/zp/zephyr "BOARD_DIR=boards/*/*" "ARCH=*" ARCH_DIR=arch SOC_DIR=soc KCONFIG_BINARY_DIR=/mnt/nordic/zp/zephyr/doc/_build/Kconfig KCONFIG_WARN_UNDEF=y KCONFIG_TURBO_MODE=1 KCONFIG_DOC_MODE=1 /usr/bin/python3.8 scripts/gen_kconfig_rest.py /mnt/nordic/zp/zephyr/doc/_build/rst/doc/reference/kconfig/ --separate-all-index --keep-module-paths --modules Architecture,arch,/mnt/nordic/zp/zephyr/arch Driver,drivers,/mnt/nordic/zp/zephyr/drivers Kernel,kernel,/mnt/nordic/zp/zephyr/kernel Library,lib,/mnt/nordic/zp/zephyr/lib Subsystem,subsys,/mnt/nordic/zp/zephyr/subsys "External Module,modules,/mnt/nordic/zp/zephyr/modules"
scripts/gen_kconfig_rest.py: doc/_build/Kconfig/Kconfig.modules:2: Could not open '/mnt/nordic/zp/zephyr/' (in 'osource "$(ZEPHYR_HAL_NORDIC_KCONFIG)"') (EISDIR: Is a directory)
[3/5] Copying files to /mnt/nordic/zp/zephyr/doc/_build/rst
ninja: build stopped: subcommand failed.
make[1]: *** [Makefile:19: htmldocs] Error 1
make[1]: Leaving directory '/mnt/nordic/zp/zephyr'
make: *** [Makefile:16: htmldocs-fast] Error 2

which looks a lot like what #31446 fixed for another script. I don't know where to fix that.

@pabigot pabigot added the bug The issue is a bug, or the PR is fixing a bug label Jan 21, 2021
@pabigot
Copy link
Collaborator Author

pabigot commented Jan 21, 2021

@utzig @tejlmand please coordinate to resolve this.

tejlmand added a commit to tejlmand/zephyr that referenced this issue Jan 22, 2021
Fixes: zephyrproject-rtos#31486

Sourcing `cmake/extensions.cmake` to have Zephyr functions available
when including Zephyr CMake files into doc build system.

This is a follow up on zephyrproject-rtos#30904 by supporting generated Kconfig files
that might contain lines as `osource "$(ZEPHYR_<MODULE_NAME>_KCONFIG)"`
to be properly parsed for doc building.

Signed-off-by: Torsten Rasmussen <[email protected]>
@tejlmand tejlmand self-assigned this Jan 22, 2021
nashif pushed a commit that referenced this issue Jan 22, 2021
Fixes: #31486

Sourcing `cmake/extensions.cmake` to have Zephyr functions available
when including Zephyr CMake files into doc build system.

This is a follow up on #30904 by supporting generated Kconfig files
that might contain lines as `osource "$(ZEPHYR_<MODULE_NAME>_KCONFIG)"`
to be properly parsed for doc building.

Signed-off-by: Torsten Rasmussen <[email protected]>
lmaciejonczyk pushed a commit to lmaciejonczyk/zephyr that referenced this issue Feb 4, 2021
Fixes: zephyrproject-rtos#31486

Sourcing `cmake/extensions.cmake` to have Zephyr functions available
when including Zephyr CMake files into doc build system.

This is a follow up on zephyrproject-rtos#30904 by supporting generated Kconfig files
that might contain lines as `osource "$(ZEPHYR_<MODULE_NAME>_KCONFIG)"`
to be properly parsed for doc building.

Signed-off-by: Torsten Rasmussen <[email protected]>
(cherry picked from commit 44c1f7f)
Signed-off-by: Johann Fischer <[email protected]>
(cherry picked from commit a1d9d82)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants