Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 731668 - dev-libs/jansson-2.13.1[doc]: fails to build with >=sphinx-3.0
Summary: dev-libs/jansson-2.13.1[doc]: fails to build with >=sphinx-3.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: David Zero
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-07-08 07:21 UTC by Joonas Niilola
Modified: 2020-12-13 10:44 UTC (History)
2 users (show)

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


Attachments
Apply upstream patches for Sphinx-3 compatibility (jansson-2.13.1-sphinx3.patch,10.03 KB, patch)
2020-11-14 05:41 UTC, Anon Emuss
Details | Diff
Modify ebuild to apply sphinx3 patch (jansson-2.13.1.ebuild.patch,733 bytes, patch)
2020-11-14 05:46 UTC, Anon Emuss
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joonas Niilola gentoo-dev 2020-07-08 07:21:35 UTC
This is a blocker bug for removal of old sphinx versions while jansson-2.13.1 stays in tree, and preferably should be patched to work with later sphinx's versions. Any related upstream issues can be linked here.

----------
Making html in doc
make[1]: Entering directory '/var/tmp/portage/dev-libs/jansson-2.13.1/work/jansson-2.13.1-abi_x86_64.amd64/doc'
sphinx-build -b html -d _build/doctrees  /var/tmp/portage/dev-libs/jansson-2.13.1/work/jansson-2.13.1/doc _build/html
Running Sphinx v3.1.2

Exception occurred:
  File "/var/tmp/portage/dev-libs/jansson-2.13.1/work/jansson-2.13.1/doc/ext/refcounting.py", line 60, in setup
    app.add_directive('refcounting', refcounting_directive, 0, (1, 0, 0))
TypeError: add_directive() takes from 3 to 4 positional arguments but 5 were given
The full traceback has been saved in /var/tmp/portage/dev-libs/jansson-2.13.1/temp/sphinx-err-2yfexmm7.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make[1]: *** [Makefile:453: html-local] Error 2
make[1]: Leaving directory '/var/tmp/portage/dev-libs/jansson-2.13.1/work/jansson-2.13.1-abi_x86_64.amd64/doc'
make: *** [Makefile:638: html-recursive] Error 1
 * ERROR: dev-libs/jansson-2.13.1::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=dev-libs/jansson-2.13.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/jansson-2.13.1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-libs/jansson-2.13.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/jansson-2.13.1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-libs/jansson-2.13.1/work/jansson-2.13.1-abi_x86_64.amd64'
 * S: '/var/tmp/portage/dev-libs/jansson-2.13.1/work/jansson-2.13.1'

>>> Failed to emerge dev-libs/jansson-2.13.1, Log file:
----------

----------
 >: cat /var/tmp/portage/dev-libs/jansson-2.13.1/temp/sphinx-err-2yfexmm7.log
# Sphinx version: 3.1.2
# Python version: 3.7.8 (CPython)
# Docutils version: 0.16 release
# Jinja2 version: 2.11.2
# Last messages:

# Loaded extensions:
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/sphinx/cmd/build.py", line 279, in build_main
    args.tags, args.verbosity, args.jobs, args.keep_going)
  File "/usr/lib/python3.7/site-packages/sphinx/application.py", line 244, in __init__
    self.setup_extension(extension)
  File "/usr/lib/python3.7/site-packages/sphinx/application.py", line 398, in setup_extension
    self.registry.load_extension(self, extname)
  File "/usr/lib/python3.7/site-packages/sphinx/registry.py", line 419, in load_extension
    metadata = setup(app)
  File "/var/tmp/portage/dev-libs/jansson-2.13.1/work/jansson-2.13.1/doc/ext/refcounting.py", line 60, in setup
    app.add_directive('refcounting', refcounting_directive, 0, (1, 0, 0))
TypeError: add_directive() takes from 3 to 4 positional arguments but 5 were given
----------
Comment 1 Larry the Git Cow gentoo-dev 2020-07-08 07:23:58 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5c857ea7a4e1be55ea9eef69fc074867a988817

commit d5c857ea7a4e1be55ea9eef69fc074867a988817
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2020-07-08 07:23:18 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-07-08 07:23:46 +0000

    dev-libs/jansson: Add bug ID to explain and track status of sphinx req
    
    Bug: https://bugs.gentoo.org/731668
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 dev-libs/jansson/jansson-2.13.1.ebuild | 1 +
 1 file changed, 1 insertion(+)
Comment 2 David Zero 2020-07-09 07:54:09 UTC
The issue is tracked upstream at https://github.com/akheron/jansson/issues/530 .
Comment 3 Larry the Git Cow gentoo-dev 2020-07-24 08:28:33 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a2aa0020c04bfd9ccbd24dafa38e757673c23c1

commit 8a2aa0020c04bfd9ccbd24dafa38e757673c23c1
Author:     David Zero <zero-one@zer0-one.net>
AuthorDate: 2020-07-22 02:37:05 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-07-24 08:28:14 +0000

    dev-libs/jansson: fix building with docs
    
    Bug: https://bugs.gentoo.org/731668
    Signed-off-by: David Zero <zero-one@zer0-one.net>
    Closes: https://github.com/gentoo/gentoo/pull/16770
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 dev-libs/jansson/jansson-2.12.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 4 David Zero 2020-09-20 07:43:42 UTC
This issue was fixed upstream in https://github.com/akheron/jansson/pull/543 . Just waiting for a new release to be cut.
Comment 5 Anon Emuss 2020-11-14 05:41:40 UTC
Created attachment 671302 [details, diff]
Apply upstream patches for Sphinx-3 compatibility

I got a little impatient waiting for a new version to come along, so I rebased and squashed the patches from https://github.com/akheron/jansson/pull/543 (using the master commit claiming to merge that pull request) onto the v2.13.1 tag, and created this patch.  The changes in the patch appear to be fairly basic changes that should not have any effects outside of the documentation.  Applying it appears to allow jansson-2.13.1[doc] to compile and install with either dev-python/sphinx-2.4.4 or dev-python/sphinx-3.2.1.

The only differences when using dev-python/sphinx-2.4.4 vs. dev-python/sphinx-3.2.1 are in /usr/share/doc/jansson-2.13.1/.  I spot-checked some of the differences and they seemed like reasonable differences to expect for an upgraded version of sphinx.
Comment 6 Anon Emuss 2020-11-14 05:46:54 UTC
Created attachment 671305 [details, diff]
Modify ebuild to apply sphinx3 patch

This is my attempt to modify the jansson-2.13.1.ebuild to apply the sphinx3 patch and remove the version block on the dev-python/sphinx dependency. It appears to work, but works in-place (does not create jansson-2.13.1-r1.ebuild).
Comment 7 David Zero 2020-11-14 06:47:41 UTC
Thanks for this. I'll test it myself tomorrow to double-check and then get it merged.
Comment 8 Anon Emuss 2020-11-15 06:31:56 UTC
Glad to be helpful.
Comment 9 Larry the Git Cow gentoo-dev 2020-12-13 10:44:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b4171655437ff84b5b03a5763a42a764578cd4b

commit 0b4171655437ff84b5b03a5763a42a764578cd4b
Author:     David Zero <zero-one@zer0-one.net>
AuthorDate: 2020-12-06 09:25:50 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-12-13 10:44:21 +0000

    dev-libs/jansson: remove dependency on sphinx < 3.0
    
    This revision removes the dependency on sphinx < 3.0 .
    
    Closes: https://bugs.gentoo.org/731668
    Package-Manager: Portage-3.0.9, Repoman-3.0.2
    Signed-off-by: David Zero <zero-one@zer0-one.net>
    Closes: https://github.com/gentoo/gentoo/pull/18528
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 .../jansson/files/jansson-2.13.1-sphinx3.patch     | 269 +++++++++++++++++++++
 dev-libs/jansson/jansson-2.13.1-r1.ebuild          |  41 ++++
 2 files changed, 310 insertions(+)