Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 722570 - media-libs/opensubdiv-3.3.3 fails with doc enabled
Summary: media-libs/opensubdiv-3.3.3 fails with doc enabled
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Adrian
Keywords: PATCH, PullRequest
Depends on:
Reported: 2020-05-12 01:51 UTC by 27
Modified: 2020-06-08 07:45 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

opensubdiv build log (opensubdiv_build.log,167.99 KB, text/x-log)
2020-05-12 01:51 UTC, 27
Force Python-2.x to build the documentation (file_722570.txt,1.63 KB, patch)
2020-05-12 23:53 UTC, Adrian
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description 27 2020-05-12 01:51:51 UTC
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/", 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/", 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.
Comment 1 Adrian 2020-05-12 23:51:12 UTC
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.
Comment 2 Adrian 2020-05-12 23:53:56 UTC
Created attachment 638490 [details, diff]
Force Python-2.x to build the documentation
Comment 3 Jonas Stein gentoo-dev 2020-05-13 00:29:01 UTC
please prepare a pull request on github for your tested patch.
Add to the comment:
Comment 4 Adrian 2020-05-13 02:20:34 UTC
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.
Comment 5 Adrian 2020-05-14 02:53:34 UTC
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.
Comment 6 Larry the Git Cow gentoo-dev 2020-06-08 07:45:58 UTC
The bug has been closed via the following commit(s):

commit c280c98bb725da61f5b4af2cf872004aea60cc41
Author:     Adrian Grigo <>
AuthorDate: 2020-05-13 01:58:26 +0000
Commit:     Joonas Niilola <>
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
    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 <>
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Joonas Niilola <>

 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(-)