#9660 closed defect (fixed)
gtk-doc-1.26 does not play well with glib and other packages
Reported by: | Wayne Blaszczyk | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 8.1 |
Component: | BOOK | Version: | SVN |
Severity: | normal | Keywords: | |
Cc: |
Description (last modified by ) ¶
After installing gtk-doc-1.26 (on a clean build), I'm having issues building glib and other packages with --enable-gtk-doc parameter.
make[4]: Entering directory '/opt/sources/glib-2.52.3/docs/reference/glib' DOC Building HTML In gtk-doc.xsl: For acronym (shadows) no value found! DOC Fixing cross-references Traceback (most recent call last): File "/usr/bin/gtkdoc-fixxref", line 57, in <module> fixxref.Run(options) File "/usr/share/gtk-doc/python/gtkdoc/fixxref.py", line 114, in Run FixCrossReferences(options) File "/usr/share/gtk-doc/python/gtkdoc/fixxref.py", line 217, in FixCrossReferences FixHTMLFile(options, full_entry) File "/usr/share/gtk-doc/python/gtkdoc/fixxref.py", line 236, in FixHTMLFile repl_func, content, flags=re.DOTALL) File "/usr/lib/python2.7/re.py", line 155, in sub return _compile(pattern, flags).sub(repl, string, count) File "/usr/share/gtk-doc/python/gtkdoc/fixxref.py", line 233, in repl_func return HighlightSourceVim(options, m.group(1), m.group(2)) File "/usr/share/gtk-doc/python/gtkdoc/fixxref.py", line 382, in HighlightSourceVim subprocess.check_call([script], shell=True) File "/usr/lib/python2.7/subprocess.py", line 186, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '["echo 'let html_number_lines=0|let html_use_css=1|let html_use_xhtml=1|e /tmp/tmpeyNfCq.h|syn on|set syntax=c|run! syntax/2html.vim|w! /tmp/tmpeyNfCq.h.html|qa!' | /usr/bin/vim -n -e -u NONE -T xterm >/dev/null"]' returned non-zero exit status 1 make[4]: *** [Makefile:946: html-build.stamp] Error 1 make[4]: Leaving directory '/opt/sources/glib-2.52.3/docs/reference/glib' make[3]: *** [Makefile:487: all-recursive] Error 1 make[3]: Leaving directory '/opt/sources/glib-2.52.3/docs/reference' make[2]: *** [Makefile:487: all-recursive] Error 1 make[2]: Leaving directory '/opt/sources/glib-2.52.3/docs' make[1]: *** [Makefile:1239: all-recursive] Error 1 make[1]: Leaving directory '/opt/sources/glib-2.52.3' make: *** [Makefile:860: all] Error 2
Building libtasn1 has the following error:
make[3]: Entering directory '/opt/sources/libtasn1-4.12/doc/reference' DOC Rebuilding template files make[3]: gtkdoc-mktmpl: Command not found make[3]: *** [Makefile:1240: tmpl-build.stamp] Error 127 make[3]: Leaving directory '/opt/sources/libtasn1-4.12/doc/reference' make[2]: *** [Makefile:1346: all-recursive] Error 1 make[2]: Leaving directory '/opt/sources/libtasn1-4.12/doc' make[1]: *** [Makefile:1024: all-recursive] Error 1 make[1]: Leaving directory '/opt/sources/libtasn1-4.12' make: *** [Makefile:956: all] Error 2
gtkdoc-mktmpl is not installed during gtk-doc build.
Change History (23)
comment:1 by , 8 years ago
Description: | modified (diff) |
---|
comment:2 by , 8 years ago
comment:3 by , 8 years ago
I'm running my weekly build atm, and this time the first error (glib) did not occur. I'll need to review my build order. This time around, I had (python) six installed as part of by build. The second error (libtasn1) still occurs. Arch has a patch (utf8) and a regression commit version? Something about GStreamer needing a missing file.
comment:4 by , 8 years ago
I can confirm that the first error is due to gtk-doc not being built with highlight. Once highlight was installed and gtk-doc re-built, the glib error went away.
comment:6 by , 8 years ago
Confirmed that adding highlight and reinstalling gtk-doc removes that first error.
comment:7 by , 8 years ago
For the second error, see NEWS file in gtk-doc tarball:
GTK-Doc 1.26 (Aug 11 2017) ============== Remove tmpl support (gtkdoc-mktmpl). Port all tools from bash/perl to python. [...]
comment:8 by , 8 years ago
Just seen the archlinux PKGBUILD: they removed --enable-gtk-doc from their build... I think we should do the same, or at least add "(currently broken)" or so, until upstream fixe their doc.
comment:9 by , 8 years ago
Removed --enable-gtk-doc from which package?
Concur with updating gtkdoc dependency on highlight.
comment:10 by , 8 years ago
The second error is in libtasn1. When I wrote about the archlinux PKGBUILD, it was the PKGBUILD for libtasn1 (sorry for writing to fast). Support for gtkdoc-mktmpl has been removed in gtk-doc (this was announced in previous versions README), so any package using that will throw an error. This is true of libtasn1, but maybe of others. Ideally, whether there are other packages using gtkdoc-mktmpl should be tested before release, otherwise, we'll have a lot of reports...
This 2nd error has nothing to do with the dependency on highlight. If highlight is not installed, gtk-doc relies on vim for syntax highlighting, but something is broken in the vim script (or the way the vim script is called from gtkdoc-fixxref).
comment:11 by , 8 years ago
This is the total list of failures that I had:
libtasn1 librsvg libxklavier evolution-data-server telepathy-logger
Not all were related to the missing gtkdoc-mktmpl script.
comment:12 by , 8 years ago
I have a relatively complete non-systemd instance of 8.1-rc2. I went back and rebuilt libtasn1, librsvg, glib, and libxklavier (through make) without any problems.
I also updated gtk-doc in the book and promoted highlight to a recommended dependency at revision 19141.
I can't test evolution-data-server or telepathy-logger right now, but if they build OK with gtk-doc (built with highlight), then we should probably close this ticket.
comment:13 by , 8 years ago
This is the error I get for librsvg-2.40.18
make[2]: Entering directory '/opt/sources/librsvg-2.40.18/doc' DOC Scanning header files DOC Introspecting gobjects usage: gtkdoc-scangobj [-h] [--version] --module MODULE [--types TYPES] [--type-init-func TYPE_INIT_FUNC] [--query-child-properties QUERY_CHILD_PROPERTIES] [--output-dir OUTPUT_DIR] [--cc CC] [--ld LD] [--cflags CFLAGS] [--ldflags LDFLAGS] [--run RUN] [--verbose] gtkdoc-scangobj: error: unrecognized arguments: --nogtkinit make[2]: *** [Makefile:753: scan-build.stamp] Error 2 make[2]: Leaving directory '/opt/sources/librsvg-2.40.18/doc' make[1]: *** [Makefile:1452: all-recursive] Error 1 make[1]: Leaving directory '/opt/sources/librsvg-2.40.18' make: *** [Makefile:848: all] Error 2
The md5sum for /usr/bin/gtkdoc-scangobj is 6bdbbc8a62974afda3f0318a159f0095. Can you please confirm that you have the exact same python script installed?
comment:14 by , 8 years ago
I can confirm that I have the exact same script installed and am not having any problems whatsoever, and I have built most of GNOME.
Make sure that you have six installed for both py2 and 3.
comment:15 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Marking as fixed with the dependency change. Building with highlight seems to have fixed things up. We can't duplicate the problem with highlight built in.
comment:16 by , 8 years ago
Strange that you cannot replicate it. I had to run the following to fix it:
sed -i s/" --nogtkinit"// doc/Makefile.am
as per https://github.com/GNOME/librsvg/commit/dfe34c8757debd07d4ef2f6f0381b2bcac1addc0
comment:17 by , 8 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Does this happen for you during configure, make, check, or install?
I'll reopen the ticket. I think we can add the sed to 8.1 if it is really needed.
comment:18 by , 8 years ago
OK, I see the issue. The problem only occurs if --enable-gtk-doc is passed to configure.
If I apply the sed to doc/Makefile.am, I get an error about
configure.ac:24: error: version mismatch. This is Automake 1.15.1, configure.ac:24: but the definition used by this AM_INIT_AUTOMAKE configure.ac:24: comes from Automake 1.15. You should recreate configure.ac:24: aclocal.m4 with aclocal and run automake again.
Applying the sed to Makefile.in, I get;
make[3]: gtkdoc-mktmpl: Command not found
I get the same when patching Makefile.am and running autoreconf after the sed.
Should we just mark this as broken for now?
comment:19 by , 8 years ago
I'm afraid that I'm using LFS-8.0, therefore I have automake 1.15. This is my build for librsvg-2.40.18:
sed -i s/" --nogtkinit"// doc/Makefile.am ./configure --prefix=/usr --enable-vala --disable-static --enable-gtk-doc make make install
You might want to try a autoreconf -fi after the sed and before the configure. As far as marking it as broken, that is your call, but please note the list of packages that I had issues with. The other alternative is to roll back gtk-doc to 1.25, and deal with this in 8.2? I'll be looking at the other problem packages, but it will be a long process.
comment:20 by , 8 years ago
I've looked at the other 4 packages that I've listed, and I'm going to give up and just stub out the gtk-doc parameter. I could not find anything useful from Arch. Gentoo and Fedora are still on 1.25. Hopefully when Gnome 3.26 comes out, these will be fixed.
comment:21 by , 8 years ago
glib: gtk-doc now works with a lot of warnings, but does not error out.
libtasn1: does not work due to using a deprecated, now removed program. I will add a note that gtk-doc is broken for this package.
librsvg: works with the sed s/" --nogtkinit" doc/Makefile.in
libxklavier: I will add the same note as libtasn1.
I do not have a systemd system that I can use for testing evolution-data-server or telepathy-logger. Looking at the source for evolution-data-server, we can probably add -DENABLE_GTK_DOC=OFF, but I cannot test it.
Looking at the source to telepathy-logger, I see a reference to gtkdoc-mktmpl so we should probably make the same comment as libtasn1 above.
comment:23 by , 8 years ago
With evolution-data-server, you just need to remove the -DENABLE_GTK_DOC=ON parameter. i.e. default is off.
I have the same error (the first one) with libblockdev. There is a variable g:loaded_2html_plugin, which is not set when calling the vim script, so that vim throws an error, which is caught by python... Not much more to say. I have updated gtk-doc on a system with previous versions of both vim and gtk-doc, so maybe that's the problem.