Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC BUILD FAIL #34068

Closed
hongshui3000 opened this issue Apr 7, 2021 · 4 comments
Closed

DOC BUILD FAIL #34068

hongshui3000 opened this issue Apr 7, 2021 · 4 comments
Assignees
Labels
area: Bluetooth area: Documentation bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug Waiting for response Waiting for author's response

Comments

@hongshui3000
Copy link
Contributor

hongshui3000 commented Apr 7, 2021

Describe the bug
LOG1:

E:zephyr\doc\_build\rst\doc\reference\bluetooth\gatt.rst:112: WARNING: Error in declarator
If declarator-id with parameters (e.g., 'void f(int arg)'):
  Invalid C declaration: Expected identifier in nested name. [error at 14]
    ATOMIC_DEFINE (flags, BT_GATT_SUBSCRIBE_NUM_FLAGS)
    --------------^
If parenthesis in noptr-declarator (e.g., 'void (*f(int arg))(double)'):
  Error in declarator or parameters
  Invalid C declaration: Expecting "(" in parameters. [error at 20]
    ATOMIC_DEFINE (flags, BT_GATT_SUBSCRIBE_NUM_FLAGS)
    --------------------^

FILE: zephyr\include\bluetooth\gatt.h

/** @brief GATT Subscribe parameters */
struct bt_gatt_subscribe_params {
	/** Notification value callback */
	bt_gatt_notify_func_t notify;
	/** Subscribe CCC write request response callback */
	bt_gatt_write_func_t write;
	/** Subscribe value handle */
	uint16_t value_handle;
	/** Subscribe CCC handle */
	uint16_t ccc_handle;
#if defined(CONFIG_BT_GATT_AUTO_DISCOVER_CCC)
	/** Subscribe End handle (for automatic discovery) */
	uint16_t end_handle;
	/** Discover parameters used when ccc_handle = 0 */
	struct bt_gatt_discover_params *disc_params;
#endif /* CONFIG_BT_GATT_AUTO_DISCOVER_CCC */
	/** Subscribe value */
	uint16_t value;
	/** Subscription flags */
	ATOMIC_DEFINE(flags, BT_GATT_SUBSCRIBE_NUM_FLAGS); -------------------------Here

	sys_snode_t node;
};

LOG2:

# Sphinx version: 3.2.1
# Python version: 3.9.0 (CPython)
# Docutils version: 0.16 release
# Jinja2 version: 2.11.2
# Last messages:
#   checking consistency...
#   done
#   preparing documents...
#   done
#   writing output... [  0%] index
#   writing output... [  0%] reference/devicetree/bindings
#   writing output... [  0%] reference/devicetree/bindings/sensor/we,wsen-itds
#   writing output... [  1%] reference/devicetree/index
#   writing output... [  1%] releases/index
#   writing output... [  1%] releases/release-notes-2.5
# Loaded extensions:
#   sphinx.ext.mathjax (3.2.1) from c:\python39\lib\site-packages\sphinx\ext\mathjax.py
#   sphinxcontrib.applehelp (1.0.2) from c:\python39\lib\site-packages\sphinxcontrib\applehelp\__init__.py
#   sphinxcontrib.devhelp (1.0.2) from c:\python39\lib\site-packages\sphinxcontrib\devhelp\__init__.py
#   sphinxcontrib.htmlhelp (1.0.3) from c:\python39\lib\site-packages\sphinxcontrib\htmlhelp\__init__.py
#   sphinxcontrib.serializinghtml (1.1.4) from c:\python39\lib\site-packages\sphinxcontrib\serializinghtml\__init__.py
#   sphinxcontrib.qthelp (1.0.3) from c:\python39\lib\site-packages\sphinxcontrib\qthelp\__init__.py
#   alabaster (0.7.12) from c:\python39\lib\site-packages\alabaster\__init__.py
#   breathe (4.23.0) from c:\python39\lib\site-packages\breathe\__init__.py
#   sphinx.ext.todo (3.2.1) from c:\python39\lib\site-packages\sphinx\ext\todo.py
#   sphinx.ext.extlinks (3.2.1) from c:\python39\lib\site-packages\sphinx\ext\extlinks.py
#   sphinx.ext.autodoc.type_comment (3.2.1) from c:\python39\lib\site-packages\sphinx\ext\autodoc\type_comment.py
#   sphinx.ext.autodoc (3.2.1) from c:\python39\lib\site-packages\sphinx\ext\autodoc\__init__.py
#   zephyr.application (1.0) from E:\work\\zephyr\doc\_extensions\zephyr\application.py
#   zephyr.html_redirects (unknown version) from E:\work\\zephyr\doc\_extensions\zephyr\html_redirects.py
#   only.eager_only (unknown version) from E:\work\zephyr\doc\_extensions\only\eager_only.py
#   zephyr.dtcompatible-role (unknown version) from E:\work\zephyr\doc\_extensions\zephyr\dtcompatible-role.py
#   zephyr.link-roles (unknown version) from E:\work\zephyr\doc\_extensions\zephyr\link-roles.py
#   sphinx_tabs.tabs (unknown version) from c:\python39\lib\site-packages\sphinx_tabs\tabs.py
Traceback (most recent call last):
  File "c:\python39\lib\site-packages\sphinx\cmd\build.py", line 280, in build_main
    app.build(args.force_all, filenames)
  File "c:\python39\lib\site-packages\sphinx\application.py", line 348, in build
    self.builder.build_update()
  File "c:\python39\lib\site-packages\sphinx\builders\__init__.py", line 297, in build_update
    self.build(to_build,
  File "c:\python39\lib\site-packages\sphinx\builders\__init__.py", line 361, in build
    self.write(docnames, list(updated_docnames), method)
  File "c:\python39\lib\site-packages\sphinx\builders\__init__.py", line 535, in write
    self._write_serial(sorted(docnames))
  File "c:\python39\lib\site-packages\sphinx\builders\__init__.py", line 542, in _write_serial
    doctree = self.env.get_and_resolve_doctree(docname, self)
  File "c:\python39\lib\site-packages\sphinx\environment\__init__.py", line 539, in get_and_resolve_doctree
    self.apply_post_transforms(doctree, docname)
  File "c:\python39\lib\site-packages\sphinx\environment\__init__.py", line 585, in apply_post_transforms
    transformer.apply_transforms()
  File "c:\python39\lib\site-packages\sphinx\transforms\__init__.py", line 87, in apply_transforms
    super().apply_transforms()
  File "c:\python39\lib\site-packages\docutils\transforms\__init__.py", line 171, in apply_transforms
    transform.apply(**kwargs)
  File "c:\python39\lib\site-packages\sphinx\transforms\post_transforms\__init__.py", line 44, in apply
    self.run(**kwargs)
  File "c:\python39\lib\site-packages\sphinx\transforms\post_transforms\__init__.py", line 91, in run
    newnode = self.resolve_anyref(refdoc, node, contnode)
  File "c:\python39\lib\site-packages\sphinx\transforms\post_transforms\__init__.py", line 122, in resolve_anyref
    results.extend(domain.resolve_any_xref(self.env, refdoc, self.app.builder,
  File "c:\python39\lib\site-packages\sphinx\domains\c.py", line 3751, in resolve_any_xref
    return [('c:' + self.role_for_objtype(objtype), retnode)]
TypeError: can only concatenate str (not "NoneType") to str

Environment (please complete the following information):

Windows(Chinese)

@hongshui3000 hongshui3000 added the bug The issue is a bug, or the PR is fixing a bug label Apr 7, 2021
@gmarull
Copy link
Member

gmarull commented Apr 7, 2021

ATOMIC_DEFINE(flags, BT_GATT_SUBSCRIBE_NUM_FLAGS); is a known issue, and it is actually filtered out, has no relation with the reported problem. Looks like you are running out of date dependencies, make sure to run first pip install -U scripts/requirements-doc.txt. If the problem persists, you may try to set SPHINXOPTS= to see if default parallelization is the culprit.

@gmarull gmarull added the Waiting for response Waiting for author's response label Apr 7, 2021
@hongshui3000
Copy link
Contributor Author

hongshui3000 commented Apr 8, 2021

@gmarull
Thanks
after updating the version.
log:

Exception occurred:
  File "c:\python39\lib\site-packages\sphinx\domains\c.py", line 1532, in _fill_empty
    assert line is not None
AssertionError
The full traceback has been saved in C:\Users\user\AppData\Local\Temp\sphinx-err-f8tsflcd.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:/sphinx-doc/sphinx/issues>. Thanks!
# Sphinx version: 3.3.0
# Python version: 3.9.0 (CPython)
# Docutils version: 0.16 release
# Jinja2 version: 2.11.2
# Last messages:
#   Running Sphinx v3.3.0
#   loading pickled environment...
#   done
#   building [mo]: targets for 0 po files that are out of date
#   building [html]: targets for 2 source files that are out of date
#   updating environment:
#   0 added, 145 changed, 0 removed
#   reading sources... [  0%] guides/flash_debug/coredump
# Loaded extensions:
#   sphinx.ext.mathjax (3.3.0) from c:\python39\lib\site-packages\sphinx\ext\mathjax.py
#   sphinxcontrib.applehelp (1.0.2) from c:\python39\lib\site-packages\sphinxcontrib\applehelp\__init__.py
#   sphinxcontrib.devhelp (1.0.2) from c:\python39\lib\site-packages\sphinxcontrib\devhelp\__init__.py
#   sphinxcontrib.htmlhelp (1.0.3) from c:\python39\lib\site-packages\sphinxcontrib\htmlhelp\__init__.py
#   sphinxcontrib.serializinghtml (1.1.4) from c:\python39\lib\site-packages\sphinxcontrib\serializinghtml\__init__.py
#   sphinxcontrib.qthelp (1.0.3) from c:\python39\lib\site-packages\sphinxcontrib\qthelp\__init__.py
#   alabaster (0.7.12) from c:\python39\lib\site-packages\alabaster\__init__.py
#   breathe (4.28.0) from c:\python39\lib\site-packages\breathe\__init__.py
#   sphinx.ext.todo (3.3.0) from c:\python39\lib\site-packages\sphinx\ext\todo.py
#   sphinx.ext.extlinks (3.3.0) from c:\python39\lib\site-packages\sphinx\ext\extlinks.py
#   sphinx.ext.autodoc.type_comment (3.3.0) from c:\python39\lib\site-packages\sphinx\ext\autodoc\type_comment.py
#   sphinx.ext.autodoc (3.3.0) from c:\python39\lib\site-packages\sphinx\ext\autodoc\__init__.py
#   zephyr.application (1.0) from E:\work\ZC3827\ZCAN-IOT\zephyr\doc\_extensions\zephyr\application.py
#   zephyr.html_redirects (unknown version) from E:\work\ZC3827\ZCAN-IOT\zephyr\doc\_extensions\zephyr\html_redirects.py
#   only.eager_only (unknown version) from E:\work\ZC3827\ZCAN-IOT\zephyr\doc\_extensions\only\eager_only.py
#   zephyr.dtcompatible-role (unknown version) from E:\work\ZC3827\ZCAN-IOT\zephyr\doc\_extensions\zephyr\dtcompatible-role.py
#   zephyr.link-roles (unknown version) from E:\work\ZC3827\ZCAN-IOT\zephyr\doc\_extensions\zephyr\link-roles.py
#   sphinx_tabs.tabs (unknown version) from c:\python39\lib\site-packages\sphinx_tabs\tabs.py
Traceback (most recent call last):
  File "c:\python39\lib\site-packages\sphinx\cmd\build.py", line 280, in build_main
    app.build(args.force_all, filenames)
  File "c:\python39\lib\site-packages\sphinx\application.py", line 352, in build
    self.builder.build_update()
  File "c:\python39\lib\site-packages\sphinx\builders\__init__.py", line 297, in build_update
    self.build(to_build,
  File "c:\python39\lib\site-packages\sphinx\builders\__init__.py", line 311, in build
    updated_docnames = set(self.read())
  File "c:\python39\lib\site-packages\sphinx\builders\__init__.py", line 418, in read
    self._read_serial(docnames)
  File "c:\python39\lib\site-packages\sphinx\builders\__init__.py", line 439, in _read_serial
    self.read_doc(docname)
  File "c:\python39\lib\site-packages\sphinx\builders\__init__.py", line 479, in read_doc
    doctree = read_doc(self.app, self.env, self.env.doc2path(docname))
  File "c:\python39\lib\site-packages\sphinx\io.py", line 223, in read_doc
    pub.publish()
  File "c:\python39\lib\site-packages\docutils\core.py", line 217, in publish
    self.document = self.reader.read(self.source, self.parser,
  File "c:\python39\lib\site-packages\sphinx\io.py", line 128, in read
    self.parse()
  File "c:\python39\lib\site-packages\docutils\readers\__init__.py", line 77, in parse
    self.parser.parse(self.input, document)
  File "c:\python39\lib\site-packages\sphinx\parsers.py", line 102, in parse
    self.statemachine.run(inputlines, document, inliner=self.inliner)
  File "c:\python39\lib\site-packages\docutils\parsers\rst\states.py", line 170, in run
    results = StateMachineWS.run(self, input_lines, input_offset,
  File "c:\python39\lib\site-packages\docutils\statemachine.py", line 241, in run
    context, next_state, result = self.check_line(
  File "c:\python39\lib\site-packages\docutils\statemachine.py", line 459, in check_line
    return method(match, context, next_state)
  File "c:\python39\lib\site-packages\docutils\parsers\rst\states.py", line 2769, in underline
    self.section(title, source, style, lineno - 1, messages)
  File "c:\python39\lib\site-packages\docutils\parsers\rst\states.py", line 327, in section
    self.new_subsection(title, lineno, messages)
  File "c:\python39\lib\site-packages\docutils\parsers\rst\states.py", line 393, in new_subsection
    newabsoffset = self.nested_parse(
  File "c:\python39\lib\site-packages\docutils\parsers\rst\states.py", line 281, in nested_parse
    state_machine.run(block, input_offset, memo=self.memo,
  File "c:\python39\lib\site-packages\docutils\parsers\rst\states.py", line 196, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "c:\python39\lib\site-packages\docutils\statemachine.py", line 241, in run
    context, next_state, result = self.check_line(
  File "c:\python39\lib\site-packages\docutils\statemachine.py", line 459, in check_line
    return method(match, context, next_state)
  File "c:\python39\lib\site-packages\docutils\parsers\rst\states.py", line 2769, in underline
    self.section(title, source, style, lineno - 1, messages)
  File "c:\python39\lib\site-packages\docutils\parsers\rst\states.py", line 327, in section
    self.new_subsection(title, lineno, messages)
  File "c:\python39\lib\site-packages\docutils\parsers\rst\states.py", line 393, in new_subsection
    newabsoffset = self.nested_parse(
  File "c:\python39\lib\site-packages\docutils\parsers\rst\states.py", line 281, in nested_parse
    state_machine.run(block, input_offset, memo=self.memo,
  File "c:\python39\lib\site-packages\docutils\parsers\rst\states.py", line 196, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "c:\python39\lib\site-packages\docutils\statemachine.py", line 241, in run
    context, next_state, result = self.check_line(
  File "c:\python39\lib\site-packages\docutils\statemachine.py", line 459, in check_line
    return method(match, context, next_state)
  File "c:\python39\lib\site-packages\docutils\parsers\rst\states.py", line 2342, in explicit_markup
    nodelist, blank_finish = self.explicit_construct(match)
  File "c:\python39\lib\site-packages\docutils\parsers\rst\states.py", line 2354, in explicit_construct
    return method(self, expmatch)
  File "c:\python39\lib\site-packages\docutils\parsers\rst\states.py", line 2096, in directive
    return self.run_directive(
  File "c:\python39\lib\site-packages\docutils\parsers\rst\states.py", line 2146, in run_directive
    result = directive_instance.run()
  File "c:\python39\lib\site-packages\breathe\directives.py", line 386, in run
    node_list.extend(object_renderer.render(context.node_stack[0], context))
  File "c:\python39\lib\site-packages\breathe\renderer\sphinxrenderer.py", line 2147, in render
    result = method(self, node)
  File "c:\python39\lib\site-packages\breathe\renderer\sphinxrenderer.py", line 2056, in dispatch_compound
    return self.visit_file(node)
  File "c:\python39\lib\site-packages\breathe\renderer\sphinxrenderer.py", line 1125, in visit_file
    return self.visit_compound(node, render_signature=render_signature)
  File "c:\python39\lib\site-packages\breathe\renderer\sphinxrenderer.py", line 1036, in visit_compound
    rendered_data = self.render(file_data, parent_context)
  File "c:\python39\lib\site-packages\breathe\renderer\sphinxrenderer.py", line 2147, in render
    result = method(self, node)
  File "c:\python39\lib\site-packages\breathe\renderer\sphinxrenderer.py", line 891, in visit_doxygendef
    return self.render(node.compounddef)
  File "c:\python39\lib\site-packages\breathe\renderer\sphinxrenderer.py", line 2147, in render
    result = method(self, node)
  File "c:\python39\lib\site-packages\breathe\renderer\sphinxrenderer.py", line 1219, in visit_compounddef
    child_nodes = self.render(sectiondef)
  File "c:\python39\lib\site-packages\breathe\renderer\sphinxrenderer.py", line 2147, in render
    result = method(self, node)
  File "c:\python39\lib\site-packages\breathe\renderer\sphinxrenderer.py", line 1261, in visit_sectiondef
    node_list.extend(self.render_iterable(node.memberdef))
  File "c:\python39\lib\site-packages\breathe\renderer\sphinxrenderer.py", line 2157, in render_iterable
    output.extend(self.render(entry))
  File "c:\python39\lib\site-packages\breathe\renderer\sphinxrenderer.py", line 2147, in render
    result = method(self, node)
  File "c:\python39\lib\site-packages\breathe\renderer\sphinxrenderer.py", line 2063, in dispatch_memberdef
    return self.visit_function(node)
  File "c:\python39\lib\site-packages\breathe\renderer\sphinxrenderer.py", line 1754, in visit_function
    nodes = self.handle_declaration(node, declaration)
  File "c:\python39\lib\site-packages\breathe\renderer\sphinxrenderer.py", line 633, in handle_declaration
    nodes_ = self.run_directive(obj_type, declaration, content_callback, options)
  File "c:\python39\lib\site-packages\breathe\renderer\sphinxrenderer.py", line 598, in run_directive
    nodes = directive.run()
  File "c:\python39\lib\site-packages\sphinx\domains\c.py", line 3225, in run
    return super().run()
  File "c:\python39\lib\site-packages\sphinx\directives\__init__.py", line 190, in run
    name = self.handle_signature(sig, signode)
  File "c:\python39\lib\site-packages\sphinx\domains\c.py", line 3263, in handle_signature
    symbol = parentSymbol.add_declaration(
  File "c:\python39\lib\site-packages\sphinx\domains\c.py", line 1983, in add_declaration
    res = self._add_symbols(nestedName, declaration, docname, line)
  File "c:\python39\lib\site-packages\sphinx\domains\c.py", line 1926, in _add_symbols
    symbol._fill_empty(declaration, docname, line)
  File "c:\python39\lib\site-packages\sphinx\domains\c.py", line 1538, in _fill_empty
    self._add_function_params()
  File "c:\python39\lib\site-packages\sphinx\domains\c.py", line 1559, in _add_function_params
    self._add_symbols(nn, decl, self.docname, self.line)
  File "c:\python39\lib\site-packages\sphinx\domains\c.py", line 1926, in _add_symbols
    symbol._fill_empty(declaration, docname, line)
  File "c:\python39\lib\site-packages\sphinx\domains\c.py", line 1532, in _fill_empty
    assert line is not None
AssertionError

After I delete the characters(Würth), it works.See issue #34076

@hongshui3000
Copy link
Contributor Author

This issue has been repeated with another issue close it

1 similar comment
@hongshui3000
Copy link
Contributor Author

This issue has been repeated with another issue close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth area: Documentation bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug Waiting for response Waiting for author's response
Projects
None yet
Development

No branches or pull requests

3 participants