Created attachment 638258 [details] opensubdiv build log When emerging media-libs-opensubdiv-3.3.3, the ebuild fails due to a syntax error related to documentation: [ 5%] Built target search.html File "/var/tmp/portage/media-libs/opensubdiv-3.3.3/work/OpenSubdiv-3_3_3/documentation/processTutorials.py", line 36 print "Could not read file \'"+inputfile+"\'" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Could not read file \'"+inputfile+"\'")? make[2]: *** [documentation/CMakeFiles/far_tutorial_4_far_tutorial_4.cpp.dir/build.make:88: documentation/far_tutorial_4.rst] Error 1 make[2]: Leaving directory '/var/tmp/portage/media-libs/opensubdiv-3.3.3/work/opensubdiv-3.3.3_build' make[1]: *** [CMakeFiles/Makefile2:3056: documentation/CMakeFiles/far_tutorial_4_far_tutorial_4.cpp.dir/all] Error 2 File "/var/tmp/portage/media-libs/opensubdiv-3.3.3/work/OpenSubdiv-3_3_3/documentation/processTutorials.py", line 36 print "Could not read file \'"+inputfile+"\'" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Could not read file \'"+inputfile+"\'")? The ebuild works fine when the doc use flag is disabled, therefore, it is an issue with the documentation. It may also be an issue with Python compatibility. The build log is attached.
This bug occurs when using python 3 to build the documentation. It is fixed using a patch developed by waebbl for opensubdiv-3.4.0 to force the documentation to build using python 2.7.
Created attachment 638490 [details, diff] Force Python-2.x to build the documentation
please prepare a pull request on github for your tested patch. Add to the comment: Closes: https://bugs.gentoo.org/722570
I have just created a PR for opensubdiv 3.4.3 which includes this patch. It works with blender-2.79b-r2, which is the only package in the tree which has a dependency on opensubdiv. So once opensubdiv-3.4.3 gets merged then opensubdiv 3.3.3 can be removed and this bug can then be closed. Howewver I am happy to backport the fixes to version 3.3.3 so it can be kept updated in the interim.
I have added a series of commits to my pull request to backport all the changes made in opensubdiv-3.4.3 to 3.3.3, in order to keep the stable version up to date until opensubdiv-3.4.3 is stabilised. Some of them are order dependent, however, as it is necessary to upgrade the ebuild to EAPI 7 before importing the force python 2.7 to build the documentation patch to prevent the documentation being installed in /usr/share/doc/OpenSubDiv illegally. Once these two are imported (at minimum), this bug can be closed.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c280c98bb725da61f5b4af2cf872004aea60cc41 commit c280c98bb725da61f5b4af2cf872004aea60cc41 Author: Adrian Grigo <agrigo2001@yahoo.com.au> AuthorDate: 2020-05-13 01:58:26 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2020-06-08 07:45:20 +0000 media-libs/opensubdiv: Version bump to 3.4.3 Version bump to media-libs/opensubdiv-3.4.3 This version has been updated to EAPI 7 and inherits from cmake rather than cmake-utils. The license has been corrected to modified apache-2 New USE flags are added to control installation of the docs, examples and tutorials. The build system is patched to install the tutorials into /usr/bin, and to use python 2.7 to build the documentation. The latter fixes bug 722570 for this ebuild. When using FEATURES="test", the basic and regression tests are enabled. However the GLTESTS are disabled as portage does not have access to an X11 display to run them during the build. A direct dependency on libXinerama was added as this is no longer included by glfw for wayland users. This fixes bug 708160 for this ebuild. For cuda users, the build will fail when using GCC 9+. If an incorrect version is selected, the ebuild will warn the user to run gcc-config. Others have found that cuda kernels fail to build with multiple jobs for previous versions of opensubdiv. I use MAKEOPTS="-j1" to prevent this, although it has not been an issue for me. Signed-off-by: Adrian Grigo <agrigo2001@yahoo.com.au> Closes: https://bugs.gentoo.org/696592 Closes: https://bugs.gentoo.org/708160 Closes: https://bugs.gentoo.org/722570 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Joonas Niilola <juippis@gentoo.org> media-libs/opensubdiv/Manifest | 1 + ...ocumentation-CMakeLists.txt-force-python2.patch | 51 ++++++++++++ ...ensubdiv-3.4.3-install-tutorials-into-bin.patch | 52 +++++++++++++ media-libs/opensubdiv/metadata.xml | 19 +++-- media-libs/opensubdiv/opensubdiv-3.4.3.ebuild | 90 ++++++++++++++++++++++ 5 files changed, 205 insertions(+), 8 deletions(-)