Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: 'gtkdoc-scangobj' failed with status 1 #3892

Open
bigon opened this issue Jul 16, 2018 · 12 comments

Comments

Projects
None yet
5 participants
@bigon
Copy link

commented Jul 16, 2018

Hi,

When trying to build libfprint with meson 0.47.1, I get the following error:

[0/1] Running all tests.
No tests defined.
create-stamp debian/debhelper-build-stamp
fakeroot debian/rules binary
dh binary
dh_testroot
dh_prep
dh_auto_install
cd obj-x86_64-linux-gnu && DESTDIR=/<>/debian/tmp LC_ALL=C.UTF-8 ninja install
[0/1] Installing files.
Building documentation for libfprint
ERROR:
Error in gtkdoc helper script:

ERROR: 'gtkdoc-scangobj' failed with status 1
Traceback (most recent call last):
File "/usr/bin/gtkdoc-scangobj", line 71, in
sys.exit(scangobj.run(options))
File "/usr/share/gtk-doc/python/gtkdoc/scangobj.py", line 1230, in run
for line in common.open_text(options.types):
File "/usr/share/gtk-doc/python/gtkdoc/common.py", line 57, in open_text
return codecs.open(filename, mode, encoding=encoding)
File "/usr/lib/python2.7/codecs.py", line 898, in open
file = builtin.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory: '/<>/obj-x86_64-linux-gnu/doc/libfprint.types'

When removing the "--rebuild-types" option from scan_args in doc/meson.build the build succeed.

The doc/meson.build from libfprint contains:

gnome.gtkdoc('libfprint',
             main_xml: 'libfprint-docs.xml',
             src_dir: join_paths(meson.source_root(), 'libfprint'),
             dependencies: libfprint_dep,
             content_files: content_files,
             expand_content_files: expand_content_files,
             scan_args: [
               '--rebuild-types',
               '--ignore-decorators=API_EXPORTED',
               '--ignore-headers=' + ' '.join(private_headers),
             ],
             fixxref_args: [
               '--html-dir=@0@'.format(docpath),
               '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
               '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
             ],
             html_assets: html_images,
             install: true)
@ignatenkobrain

This comment has been minimized.

Copy link
Member

commented Jul 16, 2018

I asuume that gtk-doc has some problem with <<PKGBUILDDIR>>

@bigon

This comment has been minimized.

Copy link
Author

commented Jul 16, 2018

Well, no
This is replaced by sbuild (debian autobuilder thing) when printing the logs

The value of <<PKGBUILDDIR>> is /var/lib/sbuild/build/libfprint-kT2KT7/libfprint-0.8.1 or something like that

@hadess

This comment has been minimized.

Copy link

commented Jul 16, 2018

I asuume that gtk-doc has some problem with <>

Nope. Seems to be a problem after the Python 3.7 upgrade. This Fedora rawhide CI run for libfprint worked:
https://gitlab.freedesktop.org/libfprint/libfprint/-/jobs/7618
and this one that ran today failed:
https://gitlab.freedesktop.org/libfprint/libfprint/-/jobs/10021

The main difference is the Python 3.6 to 3.7 upgrade.

@hadess

This comment has been minimized.

Copy link

commented Jul 17, 2018

Downgrading to meson-0.46.1-2.fc29.noarch.rpm in the libfprint CI fixed/worked-around the problem. Neither 0.47.0 nor 0.47.1 managed to finish the build, with the same error.

fdo-mirror pushed a commit to freedesktop/libfprint that referenced this issue Jul 17, 2018

build: Downgrade meson in CI script
It failed to finish the build otherwise:
mesonbuild/meson#3892
@heftig

This comment has been minimized.

Copy link
Contributor

commented Jul 17, 2018

It seems that gtkdoc-scan --rebuild-types will not produce a types file if it would be empty.

The libfprint build fails since 75bb6b0.

@ignatenkobrain

This comment has been minimized.

Copy link
Member

commented Jul 18, 2018

Just for the record, libfprint fails in fedora with:

[0/1] /usr/bin/python3 /usr/bin/meson install --no-rebuild
Building documentation for libfprint
ERROR: 
Error in gtkdoc helper script:
ERROR: 'gtkdoc-scangobj' failed with status 1
Traceback (most recent call last):
  File "/usr/bin/gtkdoc-scangobj", line 71, in <module>
    sys.exit(scangobj.run(options))
  File "/usr/share/gtk-doc/python/gtkdoc/scangobj.py", line 1230, in run
    for line in common.open_text(options.types):
  File "/usr/share/gtk-doc/python/gtkdoc/common.py", line 51, in open_text
    return open(filename, mode, encoding=encoding)
FileNotFoundError: [Errno 2] No such file or directory: '/builddir/build/BUILD/libfprint-0.8.2/x86_64-redhat-linux-gnu/doc/libfprint.types'
@ignatenkobrain

This comment has been minimized.

Copy link
Member

commented Jul 18, 2018

@heftig I would say that this is bug in gtk-doc. I have went and created an issue in upstream

@xclaesse

This comment has been minimized.

Copy link
Member

commented Jul 18, 2018

libfprint only depends on glib, not gobject/gio, so it should just remove the --rebuild-types option. I think meson is right to expect that a .types file gets created when --rebuild-types option is passed. Could you please close this bug and report against libfprint?

@hadess

This comment has been minimized.

Copy link

commented Jul 18, 2018

The meson change causes a regression. If you're happy with regressions, I'm happy to fix libfprint myself.

@xclaesse

This comment has been minimized.

Copy link
Member

commented Jul 18, 2018

IMO it's not a regression, it should never have been working. But I'll let @jpakkane judge on that.

@hadess

This comment has been minimized.

Copy link

commented Jul 18, 2018

IMO it's not a regression, it should never have been working. But I'll let @jpakkane judge on that.

If it used to work and doesn't anymore, then it's a regression. Whether we need to care about it is a completely different matter, it is matter-of-factly, a regression.

fdo-mirror pushed a commit to freedesktop/libfprint that referenced this issue Jul 20, 2018

build: Fix build with newer meson
The gtk-doc meson helper regressed in that it didn't expect the
libfprint.types file to not exist, as earlier versions did. Remove
the --rebuild-types call so that it is not generated, and meson carries
on compiling the rest of the library.

See https://gitlab.gnome.org/GNOME/gtk-doc/issues/48
See mesonbuild/meson#3892
See https://bugzilla.redhat.com/show_bug.cgi?id=1604585
@hadess

This comment has been minimized.

Copy link

commented Jul 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.