Opened 3 years ago

Closed 3 years ago

#63727 closed defect (fixed)

cmake @3.21.4 +docs+python39+qt5: Could not import extension sphinx.directives.patches

Reported by: cooljeanius (Eric Gallager) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc: michaelld (Michael Dickens), blair (Blair Zajac), mascguy (Christopher Nielsen), hapaguy (Brian Kurt Fujikawa)
Port: cmake

Description

Trying to upgrade cmake from 3.21.3 to 3.21.4 fails for me with this error:

[ 16%] Built target cmsysTestsC
WARNING: while setting up extension sphinx.addnodes: node class 'meta' is already registered, its visitors will be overridden
[ 16%] Linking CXX static library libcmjsoncpp.a
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.21.4/Utilities/cmjsoncpp && /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-v3.21.4-f65cebf51a2cf3af2017fd9b03c685c77da00c74/Bootstrap.cmk/cmake -P CMakeFiles/cmjsoncpp.dir/cmake_clean_target.cmake
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.21.4/Utilities/cmjsoncpp && /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-v3.21.4-f65cebf51a2cf3af2017fd9b03c685c77da00c74/Bootstrap.cmk/cmake -E cmake_link_script CMakeFiles/cmjsoncpp.dir/link.txt --verbose=ON
/Library/Developer/CommandLineTools/usr/bin/ar qc libcmjsoncpp.a CMakeFiles/cmjsoncpp.dir/src/lib_json/json_reader.cpp.o CMakeFiles/cmjsoncpp.dir/src/lib_json/json_value.cpp.o CMakeFiles/cmjsoncpp.dir/src/lib_json/json_writer.cpp.o
/Library/Developer/CommandLineTools/usr/bin/ranlib libcmjsoncpp.a
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-v3.21.4-f65cebf51a2cf3af2017fd9b03c685c77da00c74'

Extension error:
Could not import extension sphinx.directives.patches (exception: cannot import name 'html' from 'docutils.parsers.rst.directives' (/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/docutils/parsers/rst/directives/__init__.py))
[ 16%] Built target cmjsoncpp
make[2]: *** [Utilities/Sphinx/doc_format_html] Error 2
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-v3.21.4-f65cebf51a2cf3af2017fd9b03c685c77da00c74'
make[1]: *** [Utilities/Sphinx/CMakeFiles/documentation.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 17%] Linking CXX static library libcmsys.a
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.21.4/Source/kwsys && /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-v3.21.4-f65cebf51a2cf3af2017fd9b03c685c77da00c74/Bootstrap.cmk/cmake -P CMakeFiles/cmsys.dir/cmake_clean_target.cmake
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.21.4/Source/kwsys && /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-v3.21.4-f65cebf51a2cf3af2017fd9b03c685c77da00c74/Bootstrap.cmk/cmake -E cmake_link_script CMakeFiles/cmsys.dir/link.txt --verbose=ON
/Library/Developer/CommandLineTools/usr/bin/ar qc libcmsys.a CMakeFiles/cmsys.dir/ProcessUNIX.c.o CMakeFiles/cmsys.dir/Base64.c.o CMakeFiles/cmsys.dir/EncodingC.c.o CMakeFiles/cmsys.dir/MD5.c.o CMakeFiles/cmsys.dir/Terminal.c.o CMakeFiles/cmsys.dir/System.c.o CMakeFiles/cmsys.dir/String.c.o CMakeFiles/cmsys.dir/Directory.cxx.o CMakeFiles/cmsys.dir/DynamicLoader.cxx.o CMakeFiles/cmsys.dir/EncodingCXX.cxx.o CMakeFiles/cmsys.dir/Glob.cxx.o CMakeFiles/cmsys.dir/RegularExpression.cxx.o CMakeFiles/cmsys.dir/SystemTools.cxx.o CMakeFiles/cmsys.dir/CommandLineArguments.cxx.o CMakeFiles/cmsys.dir/FStream.cxx.o CMakeFiles/cmsys.dir/SystemInformation.cxx.o CMakeFiles/cmsys.dir/Status.cxx.o
/Library/Developer/CommandLineTools/usr/bin/ranlib libcmsys.a
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-v3.21.4-f65cebf51a2cf3af2017fd9b03c685c77da00c74'
[ 17%] Built target cmsys
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-v3.21.4-f65cebf51a2cf3af2017fd9b03c685c77da00c74'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-v3.21.4-f65cebf51a2cf3af2017fd9b03c685c77da00c74'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.21.4" && /usr/bin/make -j16 -w all VERBOSE=ON 
Exit code: 2

I'm guessing this is due to the +docs variant? I'm on Big Sur with Xcode 13.1, for reference.

Change History (9)

comment:1 Changed 3 years ago by blair (Blair Zajac)

Cc: blair added

comment:2 Changed 3 years ago by blair (Blair Zajac)

I'm seeing this also.

However, I rolled back to 3.21.3 by reverting 45ead5ebcd96752f19b86d088cca360cccc2926c and f7914c68d24df8665ed361e1d884cf09c5034c10 and I'm seeing the same error, so it looks like something on the Sphinx side may be the cause.

comment:3 in reply to:  2 ; Changed 3 years ago by reneeotten (Renee Otten)

Replying to blair:

so it looks like something on the Sphinx side may be the cause.

Agreed, see also 63739.

comment:4 in reply to:  3 ; Changed 3 years ago by cooljeanius (Eric Gallager)

Replying to reneeotten:

Replying to blair:

so it looks like something on the Sphinx side may be the cause.

Agreed, see also 63739.

This affects mame, too, it seems:

--->  Building mame
DEBUG: Executing proc-pre-org.macports.build-build-0
DEBUG: Phase pre-build: g_mame_build_args_docs_list: SPHINXBUILD=/opt/local/bin/sphinx-build-3.9
DEBUG: Phase pre-build: g_mame_build_args_bgfx_list: {ARCHOPTS="-Xlinker -no_deduplicate -Wno-unused-command-line-argument -stdlib=libc++"} CC=\"/usr/bin/clang\" CXX=\"/usr/bin/clang++\" OVERRIDE_CC=\"/usr/bin/clang\" OVERRIDE_CXX=\"/usr/bin/clang++\" CFLAGS=\"-isystem/opt/local/include\" LDOPTS=\"-L/opt/local/lib\" PRECOMPILE=1 TESTS=0 BENCHMARKS=0 DEBUG=1 OPTIMIZE=0 NOWERROR=1 VERBOSE=1 USE_LIBSDL=1 USE_SYSTEM_LIB_ASIO=1 USE_SYSTEM_LIB_EXPAT=1 USE_SYSTEM_LIB_FLAC=1 USE_SYSTEM_LIB_JPEG=1 USE_SYSTEM_LIB_LUA=1 USE_SYSTEM_LIB_PORTAUDIO=1 USE_SYSTEM_LIB_PORTMIDI=1 USE_SYSTEM_LIB_PUGIXML=1 USE_SYSTEM_LIB_SQLITE3=1 USE_SYSTEM_LIB_UTF8PROC=1 USE_SYSTEM_LIB_ZLIB=1 TOOLS=1 PTR64=1 PYTHON_EXECUTABLE=/opt/local/bin/python3.9 --trace
DEBUG: Phase pre-build: g_mame_build_targets_bgfx_list: osx-debug64
DEBUG: Phase pre-build: g_mame_build_args_dist_list: {ARCHOPTS="-Xlinker -no_deduplicate -Wno-unused-command-line-argument -stdlib=libc++"} CC=\"/usr/bin/clang\" CXX=\"/usr/bin/clang++\" OVERRIDE_CC=\"/usr/bin/clang\" OVERRIDE_CXX=\"/usr/bin/clang++\" CFLAGS=\"-isystem/opt/local/include\" LDOPTS=\"-L/opt/local/lib\" PRECOMPILE=1 TESTS=0 BENCHMARKS=0 DEBUG=1 OPTIMIZE=0 NOWERROR=1 VERBOSE=1 USE_LIBSDL=1 USE_SYSTEM_LIB_ASIO=1 USE_SYSTEM_LIB_EXPAT=1 USE_SYSTEM_LIB_FLAC=1 USE_SYSTEM_LIB_JPEG=1 USE_SYSTEM_LIB_LUA=1 USE_SYSTEM_LIB_PORTAUDIO=1 USE_SYSTEM_LIB_PORTMIDI=1 USE_SYSTEM_LIB_PUGIXML=1 USE_SYSTEM_LIB_SQLITE3=1 USE_SYSTEM_LIB_UTF8PROC=1 USE_SYSTEM_LIB_ZLIB=1 TOOLS=1 PTR64=1 PYTHON_EXECUTABLE=/opt/local/bin/python3.9
DEBUG: Executing org.macports.build (mame)
Building documentation target: man
DEBUG: mame_build_run: p_work_path: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_emulators_mame/mame/work/mame-0237/docs
DEBUG: mame_build_run: p_makefile: Makefile
DEBUG: mame_build_run: p_target: man
DEBUG: mame_build_run: p_build_args_list: SPHINXBUILD=/opt/local/bin/sphinx-build-3.9
DEBUG: mame_build_run: build_cmd_line: /opt/local/bin/gmake  --jobs=16  --file=Makefile  -w  man  SPHINXBUILD=/opt/local/bin/sphinx-build-3.9
DEBUG: system -W /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_emulators_mame/mame/work/mame-0237/docs: /opt/local/bin/gmake  --jobs=16  --file=Makefile  -w  man  SPHINXBUILD=/opt/local/bin/sphinx-build-3.9
gmake: Entering directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_emulators_mame/mame/work/mame-mame0237/docs'
/opt/local/bin/sphinx-build-3.9 -b man -d build/doctrees   source build/man
Running Sphinx v4.2.0
WARNING: while setting up extension sphinx.addnodes: node class 'meta' is already registered, its visitors will be overridden

Extension error:
Could not import extension sphinx.directives.patches (exception: cannot import name 'html' from 'docutils.parsers.rst.directives' (/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/docutils/parsers/rst/directives/__init__.py))
gmake: *** [Makefile:122: man] Error 2
gmake: Leaving directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_emulators_mame/mame/work/mame-mame0237/docs'
Command failed: /opt/local/bin/gmake  --jobs=16  --file=Makefile  -w  man  SPHINXBUILD=/opt/local/bin/sphinx-build-3.9
Exit code: 2
Error: Failed to build mame: command execution failed
DEBUG: Error code: NONE

comment:5 Changed 3 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:6 Changed 3 years ago by hapaguy (Brian Kurt Fujikawa)

Cc: hapaguy added

comment:7 in reply to:  4 Changed 3 years ago by cooljeanius (Eric Gallager)

Replying to cooljeanius:

Replying to reneeotten:

Replying to blair:

so it looks like something on the Sphinx side may be the cause.

Agreed, see also 63739.

This affects mame, too, it seems

Hm, it appears the issue building mame has cleared up? In any case, I'm working around the original bug with building cmake by simply installing it without the +docs variant for now...

comment:8 Changed 3 years ago by michaelld (Michael Dickens)

Guessing this is the same issue as issue:63765 ... a problem with the latest py-docutils update

Version 0, edited 3 years ago by michaelld (Michael Dickens) (next)

comment:9 Changed 3 years ago by michaelld (Michael Dickens)

Owner: set to michaelld
Resolution: fixed
Status: newclosed

In ebe02cae9dab3d68ac6f69c53d3df124b7922b84/macports-ports (master):

py-docutils: add commit r8555 to address various usage issues

Closes: #63765
Closes: #63739
Closes: #63727

Note: See TracTickets for help on using tickets.