Opened on 08/25/20 at 08:25:56
Closed on 07/10/23 at 08:31:08
#4062 closed defect (wontfix)
waf configure fails on Ubuntu 20.04 with python error.
Reported by: | kgardas | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | doc | Version: | |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
In an attempt to get waf running on Ubuntu 20.04 I've hit following error:
ubuntu@ubuntu20lxc:~/git/rtems/rtems-docs$ ./waf configure --pdf Setting top to : /home/ubuntu/git/rtems/rtems-docs Setting out to : /home/ubuntu/git/rtems/rtems-docs/build Checking for program 'git' : /usr/bin/git Checking for program 'sphinx-build' : /usr/bin/sphinx-build Checking for program 'aspell' : not found Checking if Sphinx is at least 1.3 : yes (1.8) Checking Sphinx Options : none Checking Sphinx Nit-Pick mode : no Checking for 'sphinx.ext.autodoc' : found Checking for 'sphinx.ext.coverage' : found Checking for 'sphinx.ext.doctest' : found Checking for 'sphinx.ext.graphviz' : found Checking for 'sphinx.ext.intersphinx' : found Checking for 'sphinx.ext.mathjax' : found Checking for 'sphinxcontrib.bibtex' : found Checking for program 'tex' : /usr/bin/tex Checking for program 'latex' : /usr/bin/latex Checking for program 'pdflatex' : /usr/bin/pdflatex Checking for program 'xelatex' : not found Checking for program 'bibtex' : /usr/bin/bibtex Checking for program 'dvips' : /usr/bin/dvips Checking for program 'dvipdf' : /usr/bin/dvipdf Checking for program 'ps2pdf' : /usr/bin/ps2pdf Checking for program 'makeindex' : /usr/bin/makeindex Checking for program 'pdf2ps' : /usr/bin/pdf2ps Checking for program 'makeglossaries' : /usr/bin/makeglossaries Traceback (most recent call last): File "/home/ubuntu/git/rtems/rtems-docs/.waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Scripting.py", line 119, in waf_entry_point run_commands() File "/home/ubuntu/git/rtems/rtems-docs/.waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Scripting.py", line 182, in run_commands ctx=run_command(cmd_name) File "/home/ubuntu/git/rtems/rtems-docs/.waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Scripting.py", line 173, in run_command ctx.execute() File "/home/ubuntu/git/rtems/rtems-docs/.waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Configure.py", line 85, in execute super(ConfigurationContext,self).execute() File "/home/ubuntu/git/rtems/rtems-docs/.waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Context.py", line 92, in execute self.recurse([os.path.dirname(g_module.root_path)]) File "/home/ubuntu/git/rtems/rtems-docs/.waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Context.py", line 133, in recurse user_function(self) File "/home/ubuntu/git/rtems/rtems-docs/wscript", line 49, in configure conf.recurse(b) File "/home/ubuntu/git/rtems/rtems-docs/.waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Context.py", line 133, in recurse user_function(self) File "/home/ubuntu/git/rtems/rtems-docs/common/waf.py", line 264, in cmd_configure latex.configure_tests(ctx) File "/home/ubuntu/git/rtems/rtems-docs/common/latex.py", line 122, in configure_tests local_packs = local_packages() File "/home/ubuntu/git/rtems/rtems-docs/common/latex.py", line 94, in local_packages host, version = host_name() File "/home/ubuntu/git/rtems/rtems-docs/common/latex.py", line 85, in host_name distro = platform.dist() AttributeError: module 'platform' has no attribute 'dist' ubuntu@ubuntu20lxc:~/git/rtems/rtems-docs$ python --version Python 3.8.2
Change History (3)
comment:1 Changed on 08/25/20 at 22:42:47 by Chris Johns
comment:2 Changed on 07/10/23 at 08:29:50 by kgardas
With the suggested way of using it:
python3.8 -m venv sphinx38 . ./sphinx38/bin/activate pip install --upgrade pip pip install Sphinx pip install sphinxcontrib-bibtex cd rtems-docs.git ./waf distclean configure
this runs fine. But when I try to add --pdf
into waf I get following error:
(sphinx38) rtems@silence:~/git/rtems/rtems-docs$ ./waf distclean configure --pdf 'distclean' finished successfully (0.003s) Setting top to : /export/home/rtems/git/rtems/rtems-docs Setting out to : /export/home/rtems/git/rtems/rtems-docs/build Checking for program 'git' : /usr/bin/git Checking for program 'sphinx-build' : /export/home/rtems/sphinx38/bin/sphinx-build Checking for program 'aspell' : /usr/bin/aspell Checking if Sphinx is at least 1.3 : yes (7.0) Checking Sphinx Options : none Checking Sphinx Nit-Pick mode : no Checking for 'sphinx.ext.autodoc' : found Checking for 'sphinx.ext.coverage' : found Checking for 'sphinx.ext.doctest' : found Checking for 'sphinx.ext.graphviz' : found Checking for 'sphinx.ext.intersphinx' : found Checking for 'sphinx.ext.mathjax' : found Checking for 'sphinxcontrib.bibtex' : found Checking for program 'tex' : /usr/bin/tex Checking for program 'latex' : /usr/bin/latex Checking for program 'pdflatex' : /usr/bin/pdflatex Checking for program 'xelatex' : /usr/bin/xelatex Checking for program 'bibtex' : /usr/bin/bibtex Checking for program 'dvips' : /usr/bin/dvips Checking for program 'dvipdf' : /usr/bin/dvipdf Checking for program 'ps2pdf' : /usr/bin/ps2pdf Checking for program 'makeindex' : /usr/bin/makeindex Checking for program 'pdf2ps' : /usr/bin/pdf2ps Checking for program 'makeglossaries' : /usr/bin/makeglossaries Traceback (most recent call last): File "/export/home/rtems/git/rtems/rtems-docs/common/latex.py", line 85, in host_name from distro import linux_distribution ModuleNotFoundError: No module named 'distro' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/export/home/rtems/git/rtems/rtems-docs/.waf3-2.0.25-767522112be77f8585812fcfaa08e805/waflib/Scripting.py", line 119, in waf_entry_point run_commands() File "/export/home/rtems/git/rtems/rtems-docs/.waf3-2.0.25-767522112be77f8585812fcfaa08e805/waflib/Scripting.py", line 182, in run_commands ctx=run_command(cmd_name) File "/export/home/rtems/git/rtems/rtems-docs/.waf3-2.0.25-767522112be77f8585812fcfaa08e805/waflib/Scripting.py", line 173, in run_command ctx.execute() File "/export/home/rtems/git/rtems/rtems-docs/.waf3-2.0.25-767522112be77f8585812fcfaa08e805/waflib/Configure.py", line 85, in execute super(ConfigurationContext,self).execute() File "/export/home/rtems/git/rtems/rtems-docs/.waf3-2.0.25-767522112be77f8585812fcfaa08e805/waflib/Context.py", line 92, in execute self.recurse([os.path.dirname(g_module.root_path)]) File "/export/home/rtems/git/rtems/rtems-docs/.waf3-2.0.25-767522112be77f8585812fcfaa08e805/waflib/Context.py", line 133, in recurse user_function(self) File "/export/home/rtems/git/rtems/rtems-docs/wscript", line 48, in configure conf.recurse(b) File "/export/home/rtems/git/rtems/rtems-docs/.waf3-2.0.25-767522112be77f8585812fcfaa08e805/waflib/Context.py", line 133, in recurse user_function(self) File "/export/home/rtems/git/rtems/rtems-docs/common/waf.py", line 269, in cmd_configure latex.configure_tests(ctx) File "/export/home/rtems/git/rtems/rtems-docs/common/latex.py", line 125, in configure_tests local_packs = local_packages() File "/export/home/rtems/git/rtems/rtems-docs/common/latex.py", line 97, in local_packages host, version = host_name() File "/export/home/rtems/git/rtems/rtems-docs/common/latex.py", line 87, in host_name from platform import linux_distribution ImportError: cannot import name 'linux_distribution' from 'platform' (/usr/lib/python3.8/platform.py)
Anyway, the workaround for this exists and this is using python3 directly:
rtems@silence:~/git/rtems/rtems-docs$ python3 ./waf distclean configure --pdf 'distclean' finished successfully (0.001s) Setting top to : /export/home/rtems/git/rtems/rtems-docs Setting out to : /export/home/rtems/git/rtems/rtems-docs/build Checking for program 'git' : /usr/bin/git Checking for program 'sphinx-build' : /usr/bin/sphinx-build Checking for program 'aspell' : /usr/bin/aspell Checking if Sphinx is at least 1.3 : yes (3.3) Checking Sphinx Options : none Checking Sphinx Nit-Pick mode : no Checking for 'sphinx.ext.autodoc' : found Checking for 'sphinx.ext.coverage' : found Checking for 'sphinx.ext.doctest' : found Checking for 'sphinx.ext.graphviz' : found Checking for 'sphinx.ext.intersphinx' : found Checking for 'sphinx.ext.mathjax' : found Checking for 'sphinxcontrib.bibtex' : found Checking for program 'tex' : /usr/bin/tex Checking for program 'latex' : /usr/bin/latex Checking for program 'pdflatex' : /usr/bin/pdflatex Checking for program 'xelatex' : /usr/bin/xelatex Checking for program 'bibtex' : /usr/bin/bibtex Checking for program 'dvips' : /usr/bin/dvips Checking for program 'dvipdf' : /usr/bin/dvipdf Checking for program 'ps2pdf' : /usr/bin/ps2pdf Checking for program 'makeindex' : /usr/bin/makeindex Checking for program 'pdf2ps' : /usr/bin/pdf2ps Checking for program 'makeglossaries' : /usr/bin/makeglossaries Checking for program 'pygmentize' : /usr/bin/pygmentize Checking for Tex package 'Bjarne' : ok Checking for Tex package 'alltt' : ok Checking for Tex package 'amsmath' : ok Checking for Tex package 'amssymb' : ok Checking for Tex package 'amstext' : ok Checking for Tex package 'anyfontsize' : ok Checking for Tex package 'array' : ok Checking for Tex package 'atbegshi' : ok Checking for Tex package 'babel' : ok Checking for Tex package 'calc' : ok Checking for Tex package 'capt-of' : ok Checking for Tex package 'charter' : ok Checking for Tex package 'cmap' : ok Checking for Tex package 'color' : ok Checking for Tex package 'enumitem' : ok Checking for Tex package 'eqparbox' : ok Checking for Tex package 'etoolbox' : ok Checking for Tex package 'fancybox' : ok Checking for Tex package 'fancyhdr' : ok Checking for Tex package 'fancyvrb' : ok Checking for Tex package 'float' : ok Checking for Tex package 'fncychap' : ok Checking for Tex package 'fontenc' : ok Checking for Tex package 'footnote' : ok Checking for Tex package 'framed' : ok Checking for Tex package 'graphicx' : ok Checking for Tex package 'hypcap' : ok Checking for Tex package 'hyperref' : ok Checking for Tex package 'ifplatform' : ok Checking for Tex package 'ifthen' : ok Checking for Tex package 'inputenc' : ok Checking for Tex package 'keyval' : ok Checking for Tex package 'kvoptions' : ok Checking for Tex package 'lineno' : ok Checking for Tex package 'longtable' : ok Checking for Tex package 'makeidx' : ok Checking for Tex package 'multirow' : ok Checking for Tex package 'parskip' : ok Checking for Tex package 'pdftexcmds' : ok Checking for Tex package 'textcomp' : ok Checking for Tex package 'threeparttable' : ok Checking for Tex package 'times' : ok Checking for Tex package 'titlesec' : ok Checking for Tex package 'upquote' : ok Checking for Tex package 'utf8' : ok Checking for Tex package 'wrapfig' : ok Checking for Tex package 'xcolor' : ok Checking for Tex package 'xstring' : ok Checking for Tex package 'inconsolata' : ok Checking for Tex package 'lato' : ok 'configure' finished successfully (16.862s) rtems@silence:~/git/rtems/rtems-docs$
comment:3 Changed on 07/10/23 at 08:31:08 by kgardas
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Closing this since I'm original reporter and workaround for issue exists.
Note: See
TracTickets for help on using
tickets.
I cannot repeat the error. I have installed
Python 3.8.5
on FreeBSD 12 and successfully run:The
pip
configuration is: