<div dir="ltr"><div dir="ltr"></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 3, 2021 at 11:51 AM Ryan Long <<a href="mailto:ryan.long@oarcorp.com">ryan.long@oarcorp.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="gmail-m_5061359141266137309WordSection1">
<p class="MsoNormal">Gedare,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I applied your patch, but it still isn’t working for me. The error is the same in the console output and config.log.<u></u><u></u></p>
<p class="MsoNormal">The ./waf configure command that I’m running is<br>
<br>
./waf configure --prefix='`pwd`' –pdf<u></u><u></u></p>
<p class="MsoNormal"><u></u> </p></div></div></blockquote><div><br></div><div>I get a different error using this command line, but it passes the bibtex part. So I'm not sure.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US" style="overflow-wrap: break-word;"><div class="gmail-m_5061359141266137309WordSection1"><p class="MsoNormal"><u></u></p>
<p class="MsoNormal">I don’t know if that could be part of the issue.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Ryan<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in">
<p class="MsoNormal"><b>From:</b> Gedare Bloom <<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a>> <br>
<b>Sent:</b> Wednesday, February 3, 2021 11:28 AM<br>
<b>To:</b> Ryan Long <<a href="mailto:ryan.long@oarcorp.com" target="_blank">ryan.long@oarcorp.com</a>><br>
<b>Cc:</b> <a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<b>Subject:</b> Re: Debugging rtems-docs Sphinx issue<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Hi Ryan,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Tue, Feb 2, 2021 at 2:53 PM Ryan Long <<a href="mailto:ryan.long@oarcorp.com" target="_blank">ryan.long@oarcorp.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I’m working on
<a href="https://devel.rtems.org/ticket/4229#ticket" target="_blank">https://devel.rtems.org/ticket/4229#ticket</a> . The following command is being issued:<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">/home/rlong/nta-workspace/nta-docs/sphinx/bin/sphinx-build -b html -D extensions=sphinxcontrib.bibtex -C . out contents.rst -><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">If I run this with the “->” at the end, I get “bash: syntax error near unexpected token `newline'” as the erro message. If I run it without the arrow,
<u></u><u></u></p>
<p class="MsoNormal">It prints out the usage, and it says “sphinx-build: error: cannot find files ['contents.rst']”.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">That -> is not valid bash syntax. I guess that is something out of the waf error logging. You can see where these checks are built in common/waf.py<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">contents.rst appears to be something generated dynamically by that waf.py in check_sphinx_extension, so that is not something you can test independently.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal">I tried adding the recommended configuration settings to each of the conf.py files as sphinxcontrib-bibtex’s documentation recommended, and<u></u><u></u></p>
<p class="MsoNormal">I added “master_doc = 'contents'” to each of them as well based on the warning message from config.log. Neither had any effect.<u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">I think the master_doc thing is unrelated.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal">Does anyone know how to fix this?<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">It looks like the important part is actually this:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12pt">err:<br>
Extension error:<br>
You must configure the bibtex_bibfiles setting<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">So our waf.py that checks the sphinxcontrib.bibtex extension does not pass through the bibtex_bibfiles setting. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Since that check uses the -C flag, the config file doesn't get read, so modifying conf.py will bring no joy. That said, we should include that bibtex_bibfiles in our conf.py, so I add that in a separate patch.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">You can create a file contents.rst by hand and put in it the same:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">.. COMMENT sphinx test<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">then you can run<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">$ sphinx-build -b html -D extensions=sphinx.ext.autodoc -C . out contents.rst<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">for example<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Unfortunately, I can't seem to figure out how to pass the bibtex_bibfiles list to the command line. Everything I tried ends up parsing it into individual characters, e.g.,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">$ touch refs.bib<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">$ sphinx-build -b html -D extensions=sphinxcontrib.bibtex -D bibtex_bibfiles=refs.bib -C . out contents.rst<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">WARNING: could not open bibtex file /mnt/devel/rtems/rtems-docs/build/r.<br>
WARNING: could not open bibtex file /mnt/devel/rtems/rtems-docs/build/e.<br>
WARNING: could not open bibtex file /mnt/devel/rtems/rtems-docs/build/f.<br>
WARNING: could not open bibtex file /mnt/devel/rtems/rtems-docs/build/s.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">then it dies because it can't open .<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">What I could get to work is to create a minimal config file and pass that:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">$ echo "bibtex_bibfiles = ['refs.bib']" > conf.py<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">sphinx-build -b html -D extensions=sphinxcontrib.bibtex -c . . out contents.rst<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">So I made the check rule dynamically create refs.bib and conf.py within the testbuild directory. It might be more elegant to figure out how to pass the _list_ that contains refs.bib in the command line -D version, but this seemed to work.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I also added the bibtex_bibfiles setting to our common/conf.py file. Please try out the patch I just sent.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Gedare<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Ryan<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><u></u><u></u></p>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote></div></div>