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

gtkdoc error: incorrect path to types file #3773

Closed
lantw44 opened this issue Jun 21, 2018 · 4 comments
Closed

gtkdoc error: incorrect path to types file #3773

lantw44 opened this issue Jun 21, 2018 · 4 comments

Comments

@lantw44
Copy link
Contributor

lantw44 commented Jun 21, 2018

In this case, pango.types is a generated file, but meson wants to find it in the source directory instead of the build directory. I found this affects pango, json-glib, graphene, geocode-glib.

Running custom install script '/usr/local/bin/python3 /usr/home/lantw44/gnome/devinstall/bin/meson --internal gtkdoc --sourcedir=/usr/home/lantw44/gnome/source/pango --builddir=/usr/home/lantw44/gnome/build/pango --subdir=docs --headerdirs=/usr/home/lantw44/gnome/source/pango/pango@@/usr/home/lantw44/gnome/build/pango/pango --mainfile=pango-docs.sgml --modulename=pango --mode=auto --scanargs=--rebuild-types@@--deprecated-guards=PANGO_DISABLE_DEPRECATED@@--ignore-decorators=_PANGO_EXTERN@@--ignore-headers=pangoatsui-private.h pangocairo-private.h pangocairo-fc.h pangocairo-win32.h pangocairo-atsui.h pango-color-table.h pango-engine-private.h pango-impl-utils.h pango-glyph-item-private.h pango-layout-private.h pango-script-table.h pango-script-private.h pangofc-private.h pangoft2-private.h pangowin32-private.h pangoatsui-private.h pangox-private.h pangoxft-private.h pango-ot-private.h pango-script-lang-table.h pango-language-sample-table.h pangocoretext-private.h pangoatsui-private.h pangocairo-coretextfont.h pangocairo-coretext.h pangocoretext.h pangocairo-win32.h pangowin32.h --gobjects-types-file=/usr/home/lantw44/gnome/source/pango/docs/pango.types --fixxrefargs=--html-dir=/home/lantw44/gnome/devinstall/share/gtk-doc/html@@--extra-dir=/home/lantw44/gnome/devinstall/share/gtk-doc/html/glib@@--extra-dir=/home/lantw44/gnome/devinstall/share/gtk-doc/html/gobject@@--extra-dir=/home/lantw44/gnome/devinstall/share/gtk-doc/html/cairo --mkdbargs=--sgml-mode@@--output-format=xml --html-assets=/usr/home/lantw44/gnome/source/pango/docs/layout.gif@@/usr/home/lantw44/gnome/source/pango/docs/rotated-text.png --content-files= --cflags=-I/usr/home/lantw44/gnome/build/pango/pango/. -I/usr/home/lantw44/gnome/source/pango/pango/. -I/home/lantw44/gnome/devinstall/include/glib-2.0 -I/home/lantw44/gnome/devinstall/lib/glib-2.0/include -I/home/lantw44/gnome/devinstall/include/fribidi -I/home/lantw44/gnome/devinstall/include/harfbuzz -I/usr/local/include/freetype2 -D_THREAD_SAFE -pthread -I/home/lantw44/gnome/devinstall/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/libdrm -I/usr/local/include/libpng16 -I/usr/home/lantw44/gnome/build/pango/. -I/usr/home/lantw44/gnome/source/pango/. -march=corei7 -B/home/lantw44/.local/bin -pipe -g3 -Og --ldflags=-L/usr/home/lantw44/gnome/build/pango/pango -L/home/lantw44/gnome/devinstall/lib -Wl,-rpath,/home/lantw44/gnome/devinstall/lib -Wl,-rpath,/usr/home/lantw44/gnome/build/pango/pango -lpango-1.0 /home/lantw44/gnome/devinstall/lib/libgobject-2.0.so /home/lantw44/gnome/devinstall/lib/libglib-2.0.so -lintl -lm /home/lantw44/gnome/devinstall/lib/libfribidi.so /home/lantw44/gnome/devinstall/lib/libharfbuzz.so /usr/local/lib/libfontconfig.so /usr/local/lib/libfreetype.so /usr/local/lib/libXrender.so /usr/local/lib/libX11.so /usr/local/lib/libXft.so /home/lantw44/gnome/devinstall/lib/libcairo.so -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lpangoft2-1.0 -lpangoxft-1.0 -lpangocairo-1.0 -march=corei7 -B/home/lantw44/.local/bin -pipe -g3 -Og --cc=clang --ld=clang'
Building documentation for pango
ERROR: 
Error in gtkdoc helper script:

ERROR: 'gtkdoc-scangobj' failed with status 1
Traceback (most recent call last):
  File "/home/lantw44/gnome/devinstall/bin/gtkdoc-scangobj", line 71, in <module>
    sys.exit(scangobj.run(options))
  File "/home/lantw44/gnome/devinstall/share/gtk-doc/python/gtkdoc/scangobj.py", line 1230, in run
    for line in open(options.types, 'r', encoding='utf-8'):
FileNotFoundError: [Errno 2] No such file or directory: '/usr/home/lantw44/gnome/source/pango/docs/pango.types'

FAILED: meson-install 
/usr/local/bin/python3 /usr/home/lantw44/gnome/devinstall/bin/meson --internal install /usr/home/lantw44/gnome/build/pango/meson-private/install.dat
ninja: build stopped: subcommand failed.
@xclaesse
Copy link
Member

pango has gobject_typesfile: 'pango.types', but it doesn't ship pango.types because it's generated by gtkdoc-scan --rebuild-types. I think this can be solved in pango by using something like join_paths(meson.current_build_dir(), 'pango.types').

gtkdochelper.py could be smart and if scanargs has --rebuild-types then use the generated types file, and gobject_typesfile would be an optional kwarg.

@lantw44
Copy link
Contributor Author

lantw44 commented Jun 21, 2018

I think this can be solved in pango by using something like join_paths(meson.current_build_dir(), 'pango.types').

Yes, it can be solved by modifying docs/meson.build. I think the question here is whether this issue is considered a regression.

@xclaesse
Copy link
Member

oh, I see, that's probably a regression of PR #3746, before that the current dir was the build dir where the pango.types was generated... IMO we should ignore the value of gobject_typesfile if --rebuild-types is found in scanargs.

xclaesse added a commit to xclaesse/meson that referenced this issue Jun 21, 2018
rossburton pushed a commit to rossburton/meson that referenced this issue Jun 26, 2018
@xclaesse
Copy link
Member

@nirbheek @jpakkane I think it's important to get this merged before the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants