Bug 150798 - [GTK][Mac] Disable gtk-doc
Summary: [GTK][Mac] Disable gtk-doc
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords:
Depends on:
Blocks: 126492
  Show dependency treegraph
 
Reported: 2015-11-02 05:54 PST by Philippe Normand
Modified: 2016-03-08 15:24 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.08 KB, patch)
2015-11-02 06:20 PST, Philippe Normand
mcatanzaro: review+
Details | Formatted Diff | Diff
Patch (1.23 KB, patch)
2015-12-07 23:39 PST, Philip Chimento
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2015-11-02 05:54:17 PST
I'm getting this currently:

[34/201] Generating ../docs-build-no-html.stamp
FAILED: cd /Users/philn/dev/WebKit/WebKitBuild/Release && CC=/usr/local/opt/ccache/libexec/cc CFLAGS=-I/usr/local/Cellar/openssl/1.0.2c/include/\ -I/usr/local/Cellar/gettext/0.19.6/include/\ \ -fcolor-diagnostics\ -Qunused-arguments /Users/philn/dev/WebKit/Tools/gtk/generate-gtkdoc --skip-html && touch docs-build-no-html.stamp
Copying template files to output directory...
Running gtkdoc-scan
Running gtkdoc-scangobj
Undefined symbols for architecture x86_64:
  "_webkit_dom_css_value_get_type", referenced from:
      _get_object_types in webkitdomgtk-4.0-scan.o
  "_webkit_dom_entity_reference_get_type", referenced from:
      _get_object_types in webkitdomgtk-4.0-scan.o
  "_webkit_dom_html_base_font_element_get_type", referenced from:
      _get_object_types in webkitdomgtk-4.0-scan.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Linking of scanner failed: 

Generating webkitdomgtk-4.0 documentation...
Traceback (most recent call last):
  File "/Users/philn/dev/WebKit/Tools/gtk/generate-gtkdoc", line 201, in <module>
    saw_warnings = generate_documentation(webkitdom_generator)
  File "/Users/philn/dev/WebKit/Tools/gtk/generate-gtkdoc", line 148, in generate_documentation
    return generate_doc(generator, arguments.skip_html)
  File "/Users/philn/dev/WebKit/Tools/gtk/generate-gtkdoc", line 134, in generate_doc
    generator.generate(not skip_html)
  File "/Users/philn/dev/WebKit/Tools/gtk/gtkdoc.py", line 143, in generate
    self._run_gtkdoc_scangobj()
  File "/Users/philn/dev/WebKit/Tools/gtk/gtkdoc.py", line 338, in _run_gtkdoc_scangobj
    env=env, cwd=self.output_dir)
  File "/Users/philn/dev/WebKit/Tools/gtk/gtkdoc.py", line 209, in _run_command
    % (args[0], process.returncode))
Exception: gtkdoc-scangobj produced a non-zero return code 1
[34/201] Linking CXX shared library lib/libTestRunnerInjectedBundle.dylib
ninja: build stopped: subcommand failed.
Comment 1 Philippe Normand 2015-11-02 06:13:49 PST
Did you see this error Philip?

Seems like something we could fix at some point but I have no idea what's going on there so for now I'd like to disable gtk-doc support on Mac/GTK.
Comment 2 Philippe Normand 2015-11-02 06:20:16 PST
Created attachment 264581 [details]
Patch
Comment 3 Philip Chimento 2015-11-02 08:57:59 PST
No, I never saw this, for me the documentation builds correctly. Perhaps it is a similar symptom to #144785 though, where it seems like XCode's linker isn't pulling in all of the DSOs it needs?
Comment 4 Philip Chimento 2015-11-02 08:58:54 PST
Or scratch that, I just realized I haven't been building the documentation lately.
Comment 5 Philippe Normand 2015-12-03 08:35:34 PST
So you agree with this change Philip?
Comment 6 Philip Chimento 2015-12-03 20:58:34 PST
I'll try this week and see if there's an easy fix similar to bug https://bugs.webkit.org/show_bug.cgi?id=144785 but if not, then I agree it's best to disable the documentation.
Comment 7 Philip Chimento 2015-12-07 23:39:14 PST
Created attachment 266845 [details]
Patch
Comment 8 Philip Chimento 2015-12-07 23:45:21 PST
This patch got Gtk-doc working for me, although I also had to change the XML_CATALOG_FILES environment variable in my .jhbuildrc to $prefix/share/xml/catalog (was $prefix/etc/xml/catalog).

I didn't mark it for review though, as it's quite arbitrary. What do you think?
Comment 9 Philippe Normand 2015-12-08 00:06:25 PST
I'll try it on my set-up and see how it goes, thanks :)
Comment 10 Philippe Normand 2015-12-09 02:50:47 PST
Doesn't work here:

Generating webkit2gtk-4.0 documentation...
[5745/5811] Generating ../../WebKit2-4.0.gir
FAILED: cd /Users/philn/dev/WebKit/WebKitBuild/Release/Source/WebKit2 && CC=/usr/local/opt/ccache/libexec/cc CFLAGS=-Wno-deprecated-declarations LDFLAGS= LD_LIBRARY_PATH="/Users/philn/dev/WebKit/WebKitBuild/Release/lib:/Users/philn/dev/WebKit/WebKitBuild/DependenciesGTK/Root/lib:/usr/local/lib" /usr/local/Cellar/gobject-introspection/1.46.0/bin/g-ir-scanner --quiet --warn-all --symbol-prefix=webkit --identifier-prefix=WebKit --namespace=WebKit2 --nsversion=4.0 --include=GObject-2.0 --include=Gtk-3.0 --include=Soup-2.4 --include-uninstalled=/Users/philn/dev/WebKit/WebKitBuild/Release/JavaScriptCore-4.0.gir --library=webkit2gtk-4.0 --library=javascriptcoregtk-4.0 -L/Users/philn/dev/WebKit/WebKitBuild/Release/lib -L/Users/philn/dev/WebKit/WebKitBuild/DependenciesGTK/Root/lib -L/usr/local/lib -L/usr/local/lib -L/usr/local/Cellar/openssl/1.0.2c/lib/ -L/usr/local/Cellar/gettext/0.19.6/lib/ --no-libtool --pkg=gobject-2.0 --pkg=gtk+-3.0 --pkg=libsoup-2.4 --pkg-export=webkit2gtk-4.0 --output=/Users/philn/dev/WebKit/WebKitBuild/Release/WebKit2-4.0.gir --c-include="webkit2/webkit2.h" -DBUILDING_WEBKIT -DWEBKIT2_COMPILATION -I/Users/philn/dev/WebKit/Source -I/Users/philn/dev/WebKit/Source/WebKit2 -I/Users/philn/dev/WebKit/Source/JavaScriptCore/ForwardingHeaders -I/Users/philn/dev/WebKit/WebKitBuild/Release/DerivedSources -I/Users/philn/dev/WebKit/WebKitBuild/Release/DerivedSources/webkit2gtk -I/Users/philn/dev/WebKit/WebKitBuild/Release/DerivedSources/ForwardingHeaders/webkit2gtk /Users/philn/dev/WebKit/WebKitBuild/Release/DerivedSources/webkit2gtk/webkit2/WebKitEnumTypes.h /Users/philn/dev/WebKit/WebKitBuild/Release/DerivedSources/webkit2gtk/webkit2/WebKitVersion.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitAuthenticationRequest.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitAutocleanups.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardList.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListItem.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitColorChooserRequest.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitCredential.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenu.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuActions.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItem.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitCookieManager.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitDefines.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitDownload.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitEditingCommands.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitEditorState.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitError.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabase.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitFileChooserRequest.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitFindController.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitFormSubmissionRequest.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitForwardDeclarations.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitJavascriptResult.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitMimeInfo.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitNavigationAction.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitNavigationPolicyDecision.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitNotificationPermissionRequest.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitNotification.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitPermissionRequest.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitPlugin.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitPolicyDecision.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitResponsePolicyDecision.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitScriptDialog.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitSecurityManager.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitURIRequest.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitUserContent.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitUserContentManager.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitUserMediaPermissionRequest.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitWebInspector.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitWebResource.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitWebsiteDataManager.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/WebKitWindowProperties.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/webkit2.h /Users/philn/dev/WebKit/Source/WebKit2/UIProcess/API/gtk/*.cpp
ld: unknown option: -rpath=.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Caught exception: <class 'distutils.errors.LinkError'> LinkError(LinkError(DistutilsExecError("command '/usr/local/opt/ccache/libexec/cc' failed with exit status 1",),),)
> /usr/local/Cellar/gobject-introspection/1.46.0/lib/gobject-introspection/giscanner/dumper.py(289)_link()
-> raise LinkError(e)
(Pdb) 
[5745/5811] Building CXX object Tools/TestWebKitAPI/CMakeFiles/TestWebKit2.dir/Tests/WebKit2/FrameMIMETypePNG.cpp.o
ninja: build stopped: subcommand failed.

(the giscanner starting pdb, seriously?)
Comment 11 Philip Chimento 2015-12-09 08:08:04 PST
Aha, this one I recognize. You need gobject-introspection from Gnome master, because this commit should fix that: https://git.gnome.org/browse/gobject-introspection/commit/?id=4a724ac699f0c34fba2fb452cfadea11540325e8
Comment 12 Philippe Normand 2015-12-30 00:31:54 PST
Committed r194443: <http://trac.webkit.org/changeset/194443>
Comment 13 Jeremy Huddleston Sequoia 2016-03-08 15:24:36 PST
This isn't really a proper fix.  This just disables it.  This should be reverted and fixed properly.