3. メンテナンス・トラブルシュート - pkg・ports アップデート関連 - make オプション - MAKE_JOBS_UNSAFE=yes

 
3.1 概要
3.2 MAKE_JOBS_UNSAFE=yes
3.3 消極的な解決

3.1 概要

 発生は 2018年5月25日。  VMWare 上に作成した FreeBSD 11.1 RELEASE で発生しました。

> pkg version -vl "<"
cmake-3.11.1                       <   needs updating (index has 3.11.2)
 という状況にあったので

> portupgrade -rR cmake
 すると

[Reading data from pkg(8) ... - 81 packages found - done]
[Gathering depends for devel/cmake ........................................................................... done]
[Exclude up-to-date packages ............................. done]
--->  Upgrading 'cmake-3.11.1' to 'cmake-3.11.2' (devel/cmake)
--->  Building '/usr/ports/devel/cmake'
===>  Cleaning for cmake-3.11.2

・・・略・・・

  File "/usr/local/lib/python2.7/site-packages/docutils/utils/smartquotes.py", line 323
    :1:     Perfor    text = re.sub(r"""\. \. \.""", smartchars.ellipsis, text)
                                                                              ^
SyntaxError: unexpected character after line continuation character
--- Utilities/Sphinx/doc_format_man ---
*** [Utilities/Sphinx/doc_format_man] Error code 1

make[4]: stopped in /usr/ports/devel/cmake/work/cmake-3.11.2
1 error

make[4]: stopped in /usr/ports/devel/cmake/work/cmake-3.11.2
--- Utilities/Sphinx/CMakeFiles/documentation.dir/all ---
*** [Utilities/Sphinx/CMakeFiles/documentation.dir/all] Error code 2

make[3]: stopped in /usr/ports/devel/cmake/work/cmake-3.11.2
A failure has been detected in another branch of the parallel make

make[4]: stopped in /usr/ports/devel/cmake/work/cmake-3.11.2
--- Source/kwsys/CMakeFiles/cmsys.dir/all ---
*** [Source/kwsys/CMakeFiles/cmsys.dir/all] Error code 2

make[3]: stopped in /usr/ports/devel/cmake/work/cmake-3.11.2
2 errors

make[3]: stopped in /usr/ports/devel/cmake/work/cmake-3.11.2
*** [all] Error code 2

make[2]: stopped in /usr/ports/devel/cmake/work/cmake-3.11.2
1 error

make[2]: stopped in /usr/ports/devel/cmake/work/cmake-3.11.2
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/cmake
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/cmake
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20180525-19233-1r7ui9 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=cmake-3.11.1 UPGRADE_PORT_VER=3.11.1 make
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
	! devel/cmake (cmake-3.11.1)	(unknown build error)
 てな感じでエラーになっちゃったのです。

3.2 MAKE_JOBS_UNSAFE=yes

 「MAKE_JOBS_UNSAFE=yes」ってオプションで make できるのか?  やってみます。

> cd
> make MAKE_JOBS_UNSAFE=yes
===>  Building for cmake-3.11.2
[  0%] Building CXX object Source/kwsys/CMakeFiles/cmsys.dir/Glob.cxx.o
[  1%] Building CXX object Source/kwsys/CMakeFiles/cmsys.dir/RegularExpression.cxx.o

・・・略・・・

[ 99%] Built target ccmake
[100%] sphinx-build man: see Utilities/Sphinx/build-man.log
Traceback (most recent call last):
  File "/usr/local/bin/sphinx-build", line 11, in <module>
    load_entry_point('Sphinx==1.6.5', 'console_scripts', 'sphinx-build')()
  File "/usr/local/lib/python2.7/site-packages/sphinx/__init__.py", line 71, in main
    return build_main(argv)
  File "/usr/local/lib/python2.7/site-packages/sphinx/__init__.py", line 82, in build_main
    from sphinx import cmdline
  File "/usr/local/lib/python2.7/site-packages/sphinx/cmdline.py", line 24, in <module>
    from sphinx.application import Sphinx
  File "/usr/local/lib/python2.7/site-packages/sphinx/application.py", line 26, in <module>
    from docutils.parsers.rst import directives, roles
  File "/usr/local/lib/python2.7/site-packages/docutils/parsers/rst/__init__.py", line 77, in <module>
    from docutils.transforms import universal
  File "/usr/local/lib/python2.7/site-packages/docutils/transforms/universal.py", line 24, in <module>
    from docutils.utils import smartquotes
  File "/usr/local/lib/python2.7/site-packages/docutils/utils/smartquotes.py", line 323
    :1:     Perfor    text = re.sub(r"""\. \. \.""", smartchars.ellipsis, text)
                                                                              ^
SyntaxError: unexpected character after line continuation character
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/devel/cmake/work/cmake-3.11.2
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/devel/cmake/work/cmake-3.11.2
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/devel/cmake/work/cmake-3.11.2
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/cmake
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/cmake
 途中までうまくいきそうだったのですが・・・。

3.3 消極的な解決

 結局のところ、cmake-3.11 の間は make も portupgrade も失敗していたのですが・・・。  cmake-3.12 で portupgrade が正常に終了するようになりました。