Bug 187329

Summary: [GTK][BUILD] gtkdoc-scanobj produced a non-zero return code 252
Product: WebKit Reporter: karogyoker2+webkit
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: bugs-noreply, calvaris, mcatanzaro
Priority: P2    
Version: WebKit Local Build   
Hardware: PC   
OS: Linux   

karogyoker2+webkit
Reported 2018-07-04 12:37:03 PDT
Hello, I cannot build WebKit. This is what I've done: 1. I got a snapshot on May 30 (or 29) from the link mentioned here: https://webkit.org/getting-the-code/ 2. tar jxvf WebKit-SVN-source.tar.bz2 3. cd webkit 4. $ Tools/gtk/install-dependencies 5. $ Tools/Scripts/update-webkitgtk-libs 6. $ Tools/Scripts/build-webkit --gtk --makeargs="-j1" 7. About 30 (thirty) hours passed, and I got this: + /home/oldboi/Downloads/webkit/Tools/jhbuild/jhbuild-wrapper --gtk run cmake --build /home/oldboi/Downloads/webkit/WebKitBuild/Release --config Release -- -j1 [7/451] Generating ../docs-build-no-html.stamp FAILED: docs-build-no-html.stamp cd /home/oldboi/Downloads/webkit/WebKitBuild/Release && /usr/bin/cmake -E env CC=/usr/bin/cc "CFLAGS=-fdiagnostics-color=always -Wno-expansion-to-defined -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wextra -Wall -fno-strict-aliasing -fno-exceptions -Wno-unused-parameter" /home/oldboi/Downloads/webkit/Tools/gtk/generate-gtkdoc --skip-html && touch docs-build-no-html.stamp WARNING:root:Running scanner failed: -4, command: ./webkitdomgtk-4.0-scan Traceback (most recent call last): File "/home/oldboi/Downloads/webkit/Tools/gtk/generate-gtkdoc", line 211, in <module> saw_warnings = generate_documentation(webkitdom_generator) File "/home/oldboi/Downloads/webkit/Tools/gtk/generate-gtkdoc", line 151, in generate_documentation return generate_doc(generator, arguments.skip_html) File "/home/oldboi/Downloads/webkit/Tools/gtk/generate-gtkdoc", line 138, in generate_doc generator.generate(not skip_html) File "/home/oldboi/Downloads/webkit/Tools/gtk/gtkdoc.py", line 144, in generate self._run_gtkdoc_scangobj() File "/home/oldboi/Downloads/webkit/Tools/gtk/gtkdoc.py", line 326, in _run_gtkdoc_scangobj env=env, cwd=self.output_dir) File "/home/oldboi/Downloads/webkit/Tools/gtk/gtkdoc.py", line 210, in _run_command % (args[0], process.returncode)) Exception: gtkdoc-scangobj produced a non-zero return code 252 ninja: build stopped: subcommand failed. Some info about the environment: 1GB RAM Athlon XP 2600+ (32 bit, no SSE2) Linux oldboi-A7N8X2-0 4.15.0-24-generic #26-Ubuntu SMP Wed Jun 13 08:44:45 UTC 2018 i686 athlon i686 GNU/Linux My goal would be to recompile WebKit to have a version which doesn't require SSE2. Then I would like to use my own compiled WebKit with Epiphany-Browser (Web) because currently it is crashing because the WebKit it is using contains SSE2 instructions. Thanks, oldboi
Attachments
karogyoker2+webkit
Comment 1 2018-07-04 12:41:47 PDT
Sorry, I got the snapshot on June 30 (or 29). Not May.
Michael Catanzaro
Comment 2 2018-07-09 07:40:31 PDT
I think the only way to make progress on this would be to add a bunch of debug prints to gtkdoc-scangobj to try to figure out what is going on.
karogyoker2+webkit
Comment 3 2018-07-09 10:31:32 PDT
(In reply to Michael Catanzaro from comment #2) > I think the only way to make progress on this would be to add a bunch of > debug prints to gtkdoc-scangobj to try to figure out what is going on. No need of that. This line returns 252. https://github.com/GNOME/gtk-doc/blob/688f2190b1eb1c1aa09ef94a3e33e8eedaffb510/gtkdoc-scangobj.in#L71 So let's see what does this scanobj.run do: https://github.com/GNOME/gtk-doc/blob/688f2190b1eb1c1aa09ef94a3e33e8eedaffb510/gtkdoc/scangobj.py#L1295 It returns 252 here because we can see "Running" in the log. What is logged exactly here: https://github.com/GNOME/gtk-doc/blob/688f2190b1eb1c1aa09ef94a3e33e8eedaffb510/gtkdoc/scangobj.py#L1195 Then on the next line e.returncode must be 252. This is the logged line what we can see in our log too: WARNING:root:Running scanner failed: -4, command: ./webkitdomgtk-4.0-scan And that's it. Still WTF is this.
karogyoker2+webkit
Comment 4 2018-07-09 10:38:25 PDT
Maybe it is something with docs-build-no-html.stamp? Can I just skip generating the documentation with some parameters? Something like: build-webkit --gtk --makeargs="-j1" --do-not-generate-docs or something?
karogyoker2+webkit
Comment 5 2018-07-09 10:58:25 PDT
Having a second look I don't understand how can e.returncode being 252 but one line above it is -4.
karogyoker2+webkit
Comment 6 2018-07-09 10:59:52 PDT
(In reply to karogyoker2+webkit from comment #5) > Having a second look I don't understand how can e.returncode being 252 but > one line above it is -4. Ah, I got it now, it under-flowed, -4 == 252.
Michael Catanzaro
Comment 7 2018-07-10 03:14:11 PDT
So the challenge here is figuring out why the scanner is failing. (In reply to karogyoker2+webkit from comment #4) > Maybe it is something with docs-build-no-html.stamp? > > Can I just skip generating the documentation with some parameters? > Something like: > build-webkit --gtk --makeargs="-j1" --do-not-generate-docs or something? No, ENABLE_GTKDOC is already off by default, but build-webkit is a developer script, so it enables ENABLE_DEVELOPER_MODE, and that adds a test build step to make sure the docs are not broken. In developer mode, it makes sense that you are responsible for fixing any docs failures. If you're trying to do a production build or not planning to hack on WebKit, then just use CMake directly rather than build-webkit. (Remember that build-webkit is not safe to use with untrusted input since the JHBuild moduleset does not receive security support.)
karogyoker2+webkit
Comment 8 2018-07-10 10:18:17 PDT
I only found this build-webkit way of building (here: https://webkit.org/building-webkit/). Could you please show me somewhere the steps for CMake? I would also need to set -j1 and -Os and -march=native. Also skip the documentation generating steps of course. Sorry, I'm not really experienced compiling stuff on Linux.
Michael Catanzaro
Comment 9 2018-07-11 02:17:20 PDT
E.g. to do a release build: cd WebKitBuild cmake .. -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_FLAGS="-Os -march=native" -DCMAKE_CXX_FLAGS="-Os -march=native" ninja -j1 There won't be any documentation generation because you won't be using ENABLE_DEVELOPER_MODE. I'm going to close this as WONTFIX because we don't have enough information to figure out what is going wrong with the scanner. If you want to dive in and figure it out, then you can reopen, but I guess you'll be content with skipping the doc generation.
Note You need to log in before you can comment on or make changes to this bug.