Fix gdb/doc/ PDF build on Fedora Rawhide==F-29

Message ID 20180331173219.GA18607@host1.jankratochvil.net
State New, archived
Headers

Commit Message

Jan Kratochvil March 31, 2018, 5:32 p.m. UTC
  Hi,

on Fedora Rawhide==F-29 PDF build fails with:
	https://kojipkgs.fedoraproject.org//work/tasks/2102/26052102/build.log
	texi2dvi --pdf  -I ../../../gdb/doc/../mi -I ../../../gdb/doc \
		../../../gdb/doc/gdb.texinfo
	! I can't find file `texinfo.tex'.

TBH I do not see how the file could be found in earlier versions.  Also both
F-29 and F-28 have texinfo-tex-6.5-3.fc28.x86_64 while in F-28 it still builds
fine but in F-29 it does not - so apparently it depends on some other package.

But I did not investigate why as IMO the patch below is a logical one.

OK for check-in?


Jan
gdb/ChangeLog
2018-03-31  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* doc/Makefile.in (TEXI2DVI): Add $(SET_TEXINPUTS).
  

Comments

Simon Marchi March 31, 2018, 11:44 p.m. UTC | #1
On 2018-03-31 13:32, Jan Kratochvil wrote:
> Hi,
> 
> on Fedora Rawhide==F-29 PDF build fails with:
> 	https://kojipkgs.fedoraproject.org//work/tasks/2102/26052102/build.log
> 	texi2dvi --pdf  -I ../../../gdb/doc/../mi -I ../../../gdb/doc \
> 		../../../gdb/doc/gdb.texinfo
> 	! I can't find file `texinfo.tex'.
> 
> TBH I do not see how the file could be found in earlier versions.  Also 
> both
> F-29 and F-28 have texinfo-tex-6.5-3.fc28.x86_64 while in F-28 it still 
> builds
> fine but in F-29 it does not - so apparently it depends on some other 
> package.
> 
> But I did not investigate why as IMO the patch below is a logical one.
> 
> OK for check-in?
> 
> 
> Jan

Hi Jan,

 From the logs of building it on F27, it is picked up at

   /usr/share/texlive/texmf-local/texmf-compat/tex/texinfo/texinfo.tex

   $ readlink -f 
/usr/share/texlive/texmf-local/texmf-compat/tex/texinfo/texinfo.tex
   /usr/share/texmf/tex/texinfo/texinfo.tex

which is probably in the default latex include dirs, I guess because of 
this line in texmf.cnf:

   TEXMFLOCAL = $TEXMFROOT/texmf-local//

The directory /usr/share/texlive/texmf-local exists on F27 and F28 but 
not on F29.  So the F29 config references a directory that does not 
exist.  Re-creating it and updating the tex hash:

   # mkdir /usr/share/texlive/texmf-local
   # ln -s ../../texmf /usr/share/texlive/texmf-local/texmf-compat
   # texhash

makes it work for me on F29.  So maybe there's actually a bug in the F29 
version of the texinfo package that you should report?  I have no idea 
if that change in the packaging was intended or not, but having the 
texinfo.tex file excluded from the default latex search path will 
probably break anything trying to use texinfo.

As for the version of texinfo.tex in the source tree, my guess is 
(correct me if I'm wrong) that it was put there in a time where it was 
not so readily available as a package in distros.  But realistically, 
today, everyone picks it up from their distro's texinfo package (which 
is proven by the fact that you didn't need to set TEXINPUTS to find the 
in-tree version until a distro package broke).

If we can now expect people to pick up texinfo.tex from their distro, 
then I think we should instead remove SET_TEXINPUTS altogether.

Simon
  
Jan Kratochvil April 1, 2018, 4:46 a.m. UTC | #2
On Sun, 01 Apr 2018 01:44:16 +0200, Simon Marchi wrote:
>   # mkdir /usr/share/texlive/texmf-local
>   # ln -s ../../texmf /usr/share/texlive/texmf-local/texmf-compat
>   # texhash
> 
> makes it work for me on F29.  So maybe there's actually a bug in the F29
> version of the texinfo package that you should report?

Thanks, filed:
	Regression from F-28: texinfo PDF document no longer builds
	https://bugzilla.redhat.com/show_bug.cgi?id=1562580


> As for the version of texinfo.tex in the source tree, my guess is (correct
> me if I'm wrong) that it was put there in a time where it was not so readily
> available as a package in distros.  But realistically, today, everyone picks
> it up from their distro's texinfo package (which is proven by the fact that
> you didn't need to set TEXINPUTS to find the in-tree version until a distro
> package broke).
> 
> If we can now expect people to pick up texinfo.tex from their distro, then I
> think we should instead remove SET_TEXINPUTS altogether.

GDB sources carry even readline/, zlib/ and intl/ from which at least that
readline/ causes --with-system-readline to be buggy and despite causing such
problems they are still there.  My guess is it is so because some OS which
disappeared 30 years ago did miss them.


Jan
  
Jan Kratochvil April 2, 2018, 4:58 p.m. UTC | #3
On Sun, 01 Apr 2018 06:46:46 +0200, Jan Kratochvil wrote:
> On Sun, 01 Apr 2018 01:44:16 +0200, Simon Marchi wrote:
> >   # mkdir /usr/share/texlive/texmf-local
> >   # ln -s ../../texmf /usr/share/texlive/texmf-local/texmf-compat
> >   # texhash
> > 
> > makes it work for me on F29.  So maybe there's actually a bug in the F29
> > version of the texinfo package that you should report?
> 
> Thanks, filed:
> 	Regression from F-28: texinfo PDF document no longer builds
> 	https://bugzilla.redhat.com/show_bug.cgi?id=1562580

texlive-base has been fixed in Fedora Rawhide so I am withdrawing this patch.

Still sure the texinfo/ directory is currently unused plus obsolete so it
should be most probably deleted (although it may be in use by some non-GDB
component of the sourceware tree, I did not check).


Jan
  

Patch

diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index 0323bc4ecb..fa745b3542 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -63,7 +63,7 @@  MAKEHTMLFLAGS =
 TEXI2ROFF=texi2roff
 
 # where to find texi2dvi, ditto
-TEXI2DVI=texi2dvi
+TEXI2DVI=$(SET_TEXINPUTS) texi2dvi
 
 # Package to install the docs under
 PACKAGE = @PACKAGE@