<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>187329</bug_id>
          
          <creation_ts>2018-07-04 12:37:03 -0700</creation_ts>
          <short_desc>[GTK][BUILD] gtkdoc-scanobj produced a non-zero return code 252</short_desc>
          <delta_ts>2018-07-11 02:17:20 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Local Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>karogyoker2+webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>calvaris</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1439259</commentid>
    <comment_count>0</comment_count>
    <who name="">karogyoker2+webkit</who>
    <bug_when>2018-07-04 12:37:03 -0700</bug_when>
    <thetext>Hello,

I cannot build WebKit.
This is what I&apos;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=&quot;-j1&quot;
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 &amp;&amp; /usr/bin/cmake -E env CC=/usr/bin/cc &quot;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&quot; /home/oldboi/Downloads/webkit/Tools/gtk/generate-gtkdoc --skip-html &amp;&amp; touch docs-build-no-html.stamp
WARNING:root:Running scanner failed: -4, command: ./webkitdomgtk-4.0-scan
Traceback (most recent call last):
  File &quot;/home/oldboi/Downloads/webkit/Tools/gtk/generate-gtkdoc&quot;, line 211, in &lt;module&gt;
    saw_warnings = generate_documentation(webkitdom_generator)
  File &quot;/home/oldboi/Downloads/webkit/Tools/gtk/generate-gtkdoc&quot;, line 151, in generate_documentation
    return generate_doc(generator, arguments.skip_html)
  File &quot;/home/oldboi/Downloads/webkit/Tools/gtk/generate-gtkdoc&quot;, line 138, in generate_doc
    generator.generate(not skip_html)
  File &quot;/home/oldboi/Downloads/webkit/Tools/gtk/gtkdoc.py&quot;, line 144, in generate
    self._run_gtkdoc_scangobj()
  File &quot;/home/oldboi/Downloads/webkit/Tools/gtk/gtkdoc.py&quot;, line 326, in _run_gtkdoc_scangobj
    env=env, cwd=self.output_dir)
  File &quot;/home/oldboi/Downloads/webkit/Tools/gtk/gtkdoc.py&quot;, 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&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1439261</commentid>
    <comment_count>1</comment_count>
    <who name="">karogyoker2+webkit</who>
    <bug_when>2018-07-04 12:41:47 -0700</bug_when>
    <thetext>Sorry, I got the snapshot on June 30 (or 29). Not May.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440377</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-07-09 07:40:31 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440442</commentid>
    <comment_count>3</comment_count>
    <who name="">karogyoker2+webkit</who>
    <bug_when>2018-07-09 10:31:32 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #2)
&gt; I think the only way to make progress on this would be to add a bunch of
&gt; 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&apos;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 &quot;Running&quot; 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&apos;s it. Still WTF is this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440445</commentid>
    <comment_count>4</comment_count>
    <who name="">karogyoker2+webkit</who>
    <bug_when>2018-07-09 10:38:25 -0700</bug_when>
    <thetext>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=&quot;-j1&quot; --do-not-generate-docs or something?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440457</commentid>
    <comment_count>5</comment_count>
    <who name="">karogyoker2+webkit</who>
    <bug_when>2018-07-09 10:58:25 -0700</bug_when>
    <thetext>Having a second look I don&apos;t understand how can e.returncode being 252 but one line above it is -4.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440459</commentid>
    <comment_count>6</comment_count>
    <who name="">karogyoker2+webkit</who>
    <bug_when>2018-07-09 10:59:52 -0700</bug_when>
    <thetext>(In reply to karogyoker2+webkit from comment #5)
&gt; Having a second look I don&apos;t understand how can e.returncode being 252 but
&gt; one line above it is -4.

Ah, I got it now, it under-flowed, -4 == 252.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440796</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-07-10 03:14:11 -0700</bug_when>
    <thetext>So the challenge here is figuring out why the scanner is failing.

(In reply to karogyoker2+webkit from comment #4)
&gt; Maybe it is something with docs-build-no-html.stamp?
&gt; 
&gt; Can I just skip generating the documentation with some parameters?
&gt; Something like:
&gt; build-webkit --gtk --makeargs=&quot;-j1&quot; --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&apos;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.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440897</commentid>
    <comment_count>8</comment_count>
    <who name="">karogyoker2+webkit</who>
    <bug_when>2018-07-10 10:18:17 -0700</bug_when>
    <thetext>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&apos;m not really experienced compiling stuff on Linux.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1441141</commentid>
    <comment_count>9</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-07-11 02:17:20 -0700</bug_when>
    <thetext>E.g. to do a release build:

cd WebKitBuild
cmake .. -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_FLAGS=&quot;-Os -march=native&quot; -DCMAKE_CXX_FLAGS=&quot;-Os -march=native&quot;
ninja -j1

There won&apos;t be any documentation generation because you won&apos;t be using ENABLE_DEVELOPER_MODE.

I&apos;m going to close this as WONTFIX because we don&apos;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&apos;ll be content with skipping the doc generation.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>