cschwan / sage-on-gentoo

(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
84 stars 26 forks source link

pdf-docs fail for 8.9.beta9 #549

Closed strogdon closed 5 years ago

strogdon commented 5 years ago

This for python3.6 in prefix and python2.7 in gentoo:

prefix:

Underfull \hbox (badness 6380) in paragraph at lines 28432--28436
\T1/pcr/m/n/10 png_viewer(...)\T1/ptm/m/n/10 . You can make this change per-ma-
nent by adding lines like these to your
[332] [54] [572] [333] [573] [55Latexmk: Summary of warnings from last run of (pdf)latex:
  Latex failed to resolve 246 citation(s)
Collected error summary (may duplicate other messages):
  pdflatex: Command for 'pdflatex' gave return code 1
      Refer to 'graphs.log' for details
]Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs, or warnings treated as errors.
=== TeX engine is 'pdfTeX'
Latexmk: Errors, so I did not complete making targets
 [334make: *** [Makefile:33: graphs.pdf] Error 12
]Process Process-82:
Traceback (most recent call last):
  File "/storage/strogdon/gentoo-rap/usr/lib64/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/storage/strogdon/gentoo-rap/usr/lib64/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_6/sage_setup/docbuild/__init__.py", line 79, in build_ref_doc
    getattr(Refe
renceSubBuilder(doc, lang), format)(*args, **kwds)
  File "/storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_6/sage_setup/docbuild/__init__.py", line 252, in pdf
    raise RuntimeError(error_message%(command, tex_dir))
RuntimeError: failed to run $MAKE all-pdf in /storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-9999/work/build_doc/latex/en/reference/graphs

gentoo:

Chapter 1.
(/usr/share/texmf-dist/tex/latex/psnfss/ts1ptm.fd)Latexmk: Summary of warnings from last run of (pdf)latex:
  Latex failed to resolve 246 citation(s)
Collected error summary (may duplicate other messages):
  pdflatex: Command for 'pdflatex' gave return code 1
      Refer to 'graphs.log' for details
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs, or warnings treated as errors.
=== TeX engine is 'pdfTeX'
Latexmk: Errors, so I did not complete making targets
make: *** [Makefile:33: graphs.pdf] Error 12
 [3Process Process-82:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 267, in _bootstrap
]    self.run()
 [4  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/sage_setup/docbuild/__init__.py", line 79, in build_ref_doc
]    getattr(ReferenceSubBuilder(doc, lang), format)(*args, **kwds)
  File "/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/sage_setup/docbuild/__init__.py", line 252, in pdf
    raise RuntimeError(error_message%(command, tex_dir))
RuntimeError: failed to run $MAKE all-pdf in /var/tmp/portage/sci-mathematics/sage-9999/work/build_doc/latex/en/reference/graphs

Both seem to be in graphs.tex. In both situations in graphs.log there is

! Package inputenc Error: Unicode character − (U+2212)
(inputenc)                not set up for use with LaTeX.

I haven't investigated futher.

strogdon commented 5 years ago

This appears to be the offending line (line 734) in graphs.tex

{\hyperref[\detokenize{sage/graphs/generic_graph:sage.graphs.generic_graph.GenericGraph.cycle_basis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cycle\_basis()}}}}}
&

I see nothing strange.

kiwifb commented 5 years ago

Versions of texlive used. I have seen similar errors before I am sure.

strogdon commented 5 years ago

texlive-2019 in both cases.

kiwifb commented 5 years ago

This is sage-devel material I'd say. Someone inserted a unicode character somewhere that doesn't have a mapping. It may be difficult to track down. When was the last time you built the pdf doc? 8.9.beta8?

kiwifb commented 5 years ago

And it is not obvious because https://www.fileformat.info/info/unicode/char/2212/index.htm it is looking just like a minus sign.

kiwifb commented 5 years ago

grep inputenc graphs.tex?

strogdon commented 5 years ago

I believe 8.9.beta8 built OK here, at least in prefix. Yes, I think a minus sign is the issue.

strogdon commented 5 years ago

I did successfully build 8.9.beta8 with py3 in prefix.

kiwifb commented 5 years ago

I can reproduce. The log is more useful than expected.

! Package inputenc Error: Unicode character − (U+2212)
(inputenc)                not set up for use with LaTeX.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.65295 ... that for every \(i \in \{1, ..., n −
                                                   1\}\) the
?
! Emergency stop.
 ...

l.65295 ... that for every \(i \in \{1, ..., n −
                                                   1\}\) the
You may provide a definition with
\DeclareUnicodeCharacter
kiwifb commented 5 years ago
src/sage/graphs/traversals.pyx:    By induction one can see that for every `i \in \{1, ..., n − 1\}` the

that's our culprit.

kiwifb commented 5 years ago

This is now https://trac.sagemath.org/ticket/28446

kiwifb commented 5 years ago

Fixed upstream, will be in the next "release".