Building the docs - error

I’m trying to build the gmt documentation, but ran into the following problem:

$ cmake --build . --target docs_html 
[  0%] Copying doc/rst/source ...
[  0%] Built target _docs_copy_rst_tree_source
[  0%] Built target _docs_rst_mkdir_verbatim
[  0%] Built target script2verbatim
[ 15%] Built target _docs_examples_verbatim
[ 15%] Copying doc/rst/_extensions ...
[ 15%] Built target _docs_copy_rst_tree__extensions
[ 15%] Copying doc/rst/themes ...
[ 15%] Built target _docs_copy_rst_tree_themes
[ 15%] Copying doc/rst/_templates ...
[ 15%] Built target _docs_copy_rst_tree__templates
[ 15%] Built target _docs_rst_src
[ 15%] Copying doc/rst/_static ...
[ 15%] Built target _docs_copy_rst_tree__static
[ 15%] Built target _docs_rst_mkdir_images
[ 20%] Built target _docs_copy_fig
[ 20%] Built target gen_gmt_headers
[ 21%] Built target pslib
[ 54%] Built target gmtlib
[ 54%] Built target gmt
[ 54%] Built target gmt_for_img_convert
gmake[3]: *** No rule to make target 'doc/scripts/images/GMT_RGBchart.ps', needed by 'doc/rst/source/_images/images/GMT_RGBchart.pdf'.  Stop.
gmake[2]: *** [CMakeFiles/Makefile2:1351: doc/scripts/CMakeFiles/_docs_html_scripts_fig.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:1303: doc/rst/CMakeFiles/docs_html.dir/rule] Error 2
gmake: *** [Makefile:569: docs_html] Error 2

This didn’t happen some weeks/months ago. Anything changed? I see that dvc is needed to pull in the images(?). Based on https://docs.generic-mapping-tools.org/dev/devdocs/contributing.html#building-the-documentation

Yes, for master you will need to install dvc and follow those instructions.

Did a dvc pull, but still god the error. Must investigate more.

I suggest wipe the build dir and cmake from scratch.

Sounds like a good idea.

Wiping the build dir did the trick. However:

  • sphinx-panels seems to be a dependency, but not mentioned (maybe others as well?). Also, how to install sphinx et al should be mentioned, it is isnt already.

  • optimize_images removed?

    $ cmake --build . --target optimize_images
    gmake: *** No rule to make target 'optimize_images'.  Stop.
    
  • [100%] Built target docs_depends
    [100%] Building manpages...
    /home/anbj/gmt/b/doc/rst/source/animations.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/changes.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/cookbook.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/datasets.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/deprecated-defaults.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/devdocs/api.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/devdocs/contributing.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/devdocs/debug.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/devdocs/devdocs.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/devdocs/maintenance.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/devdocs/postscriptlight.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/devdocs/rst-cheatsheet.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/devdocs/team.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/gallery.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/migrating.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/modules.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/modules-classic.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/std-opts-classic.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/switching.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/tutorial.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/tutorial_jl.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/users-contrib-scripts.rst: WARNING: document isn't included in any toctree
    /home/anbj/gmt/b/doc/rst/source/users-contrib-symbols.rst: WARNING: document isn't included in any toctree
    

    Maybe adding :orphan: should fix this? If it needs to be fixed.

  • dvc pull should be done inside the build directory; given that it resides within the cloed gmt source tree (see docs). I use a build directory that is outside the cloned gmt source directory, so dvc pull does not work. Maybe improve wording on this.

  • sphinx-panels seems to be a dependency, but not mentioned (maybe others as well?). Also, how to install sphinx et al should be mentioned, it is isnt already.

sphinx-panels and other sphinx extensions are already included in the GMT repository (see https://github.com/GenericMappingTools/gmt/tree/master/doc/rst/_extensions), so that people who build the documentation don’t need to install these extensions. Of course, sphinx should be installed and the related instructions are available at Home · GenericMappingTools/gmt Wiki · GitHub.

  • optimize_images removed?
$ cmake --build . --target optimize_images
gmake: *** No rule to make target 'optimize_images'.  Stop.

optimize_images needs pngquant. The target is unavailable if pngquant is not installed on your system.

[100%] Built target docs_depends
[100%] Building manpages...
/home/anbj/gmt/b/doc/rst/source/animations.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/changes.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/cookbook.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/datasets.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/deprecated-defaults.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/devdocs/api.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/devdocs/contributing.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/devdocs/debug.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/devdocs/devdocs.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/devdocs/maintenance.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/devdocs/postscriptlight.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/devdocs/rst-cheatsheet.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/devdocs/team.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/gallery.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/migrating.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/modules.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/modules-classic.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/std-opts-classic.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/switching.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/tutorial.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/tutorial_jl.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/users-contrib-scripts.rst: WARNING: document isn't included in any toctree
/home/anbj/gmt/b/doc/rst/source/users-contrib-symbols.rst: WARNING: document isn't included in any toctree

Maybe adding :orphan: should fix this? If it needs to be fixed.

Yes, it’s a known problem but I don’t have a solution yet. If adding :orphan: works, please submit a PR.

  • dvc pull should be done inside the build directory; given that it resides within the cloed gmt source tree (see docs). I use a build directory that is outside the cloned gmt source directory, so dvc pull does not work. Maybe improve wording on this.

Actually, dvc pull can be done in any directories inside the GMT source tree.

Thanks seisman. Will look into.

About dvc pull; my build directory is not inside the GMT source tree, so I get an error. Maybe this is OK.

Thanks for trying this. I just posted a somewhat-related discussion topic on GitHub.

1 Like