<?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>188862</bug_id>
          
          <creation_ts>2018-08-22 13:53:25 -0700</creation_ts>
          <short_desc>[GTK] [2.22.0] Fails to build in armel</short_desc>
          <delta_ts>2018-11-26 00:54:26 -0800</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>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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 name="Alberto Garcia">berto</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>dominik.infuehr</cc>
    
    <cc>guijemont</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1452798</commentid>
    <comment_count>0</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2018-08-22 13:53:25 -0700</bug_when>
    <thetext>Here&apos;s the error message:

[ 33%] Generating ../../DerivedSources/JavaScriptCore/LLIntAssembly.h
cd webkit2gtk-2.21.91/obj-arm-linux-gnueabi/DerivedSources/JavaScriptCore &amp;&amp; /usr/bin/ruby webkit2gtk-2.21.91/Source/JavaScriptCore/offlineasm/asm.rb -Iwebkit2gtk-2.21.91/obj-arm-linux-gnueabi/DerivedSources/JavaScriptCore/ webkit2gtk-2.21.91/Source/JavaScriptCore/llint/LowLevelInterpreter.asm webkit2gtk-2.21.91/obj-arm-linux-gnueabi/bin/LLIntOffsetsExtractor webkit2gtk-2.21.91/obj-arm-linux-gnueabi/DerivedSources/JavaScriptCore/LLIntAssembly.h
offlineasm: No magic values found. Skipping assembly file generation.
make[2]: *** [Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/build.make:110: DerivedSources/JavaScriptCore/LLIntAssembly.h] Error 1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1456148</commentid>
    <comment_count>1</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2018-09-03 04:36:12 -0700</bug_when>
    <thetext>Still happening with 2.22.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1456289</commentid>
    <comment_count>2</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2018-09-04 04:46:43 -0700</bug_when>
    <thetext>Building with -DENABLE_JIT=OFF works around that problem, but the build ultimately fails when generating the documentation:

gtkdoc-fixxref --module=webkit2gtk-4.0 --module-dir=html/webkit2gtk-4.0 --extra-dir=/usr/share/gtk-doc/html/libsoup-2.4 --extra-dir=/usr/share/gtk-doc/html/gtk3 --extra-dir=/usr/share/gtk-doc/html/gdk3 --extra-dir=/usr/share/gtk-doc/html/gdk-pixbuf --extra-dir=/usr/share/gtk-doc/html/glib --extra-dir=/usr/share/gtk-doc/html/gobject --extra-dir=/usr/share/gtk-doc/html/gio --extra-dir=/home/user/webkit2gtk-2.22.0/obj-arm-linux-gnueabi/Documentation/webkitdomgtk-4.0/html --extra-dir=/home/user/webkit2gtk-2.22.0/obj-arm-linux-gnueabi/Documentation/jsc-glib-4.0/html
Traceback (most recent call last):
  File &quot;/usr/bin/gtkdoc-fixxref&quot;, line 57, in &lt;module&gt;
    fixxref.Run(options)
  File &quot;/usr/share/gtk-doc/python/gtkdoc/fixxref.py&quot;, line 64, in Run
    FixCrossReferences(options.module_dir, options.module, options.src_lang)
  File &quot;/usr/share/gtk-doc/python/gtkdoc/fixxref.py&quot;, line 224, in FixCrossReferences
    FixHTMLFile(src_lang, module, full_entry)
  File &quot;/usr/share/gtk-doc/python/gtkdoc/fixxref.py&quot;, line 247, in FixHTMLFile
    repl_func, content, flags=re.DOTALL)
  File &quot;/usr/lib/python2.7/re.py&quot;, line 155, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File &quot;/usr/share/gtk-doc/python/gtkdoc/fixxref.py&quot;, line 244, in repl_func
    return HighlightSource(src_lang, m.group(1), m.group(2))
  File &quot;/usr/share/gtk-doc/python/gtkdoc/fixxref.py&quot;, line 354, in HighlightSource
    [config.highlight] + shlex.split(highlight_options) + [temp_source_file]).decode(&apos;utf-8&apos;)
  File &quot;/usr/lib/python2.7/subprocess.py&quot;, line 223, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command &apos;[&apos;/usr/bin/highlight&apos;, &apos;--syntax=c&apos;, &apos;--out-format=xhtml&apos;, &apos;-f&apos;, &apos;--class-name=gtkdoc&apos;, &apos;/tmp/tmpjRU4NW.c&apos;]&apos; returned non-zero exit status -4

But this is almost certainly not a webkit bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1481390</commentid>
    <comment_count>3</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2018-11-25 09:47:00 -0800</bug_when>
    <thetext>I tried this again with WebKitGTK+ 2.23.1

I think this fails because OFFLINE_ASM_BACKEND is unset in Source/JavaScriptCore/CMakeLists.txt

There&apos;s no ARMv7 (because the Debian armel port targets older CPUs) and there&apos;s no CLoop because it&apos;s disabled by default on ARM.

I can fix this by passing ENABLE_C_LOOP=ON manually, but should the build system detect this scenario instead?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1481391</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-11-25 09:56:32 -0800</bug_when>
    <thetext>Per https://lists.webkit.org/pipermail/webkit-dev/2018-October/030220.html cloop should be enabled. This architecture check in WebKitFeatures.cmake is insufficient:

    if (WTF_CPU_ARM64 OR WTF_CPU_X86_64)
        set(ENABLE_JIT_DEFAULT ON)
        set(ENABLE_FTL_DEFAULT ON)
        set(USE_SYSTEM_MALLOC_DEFAULT OFF)
        set(ENABLE_C_LOOP_DEFAULT OFF)
        set(ENABLE_SAMPLING_PROFILER_DEFAULT ON)
    elseif (WTF_CPU_ARM AND WTF_OS_LINUX)
        set(ENABLE_JIT_DEFAULT ON)
        set(ENABLE_FTL_DEFAULT OFF)
        set(USE_SYSTEM_MALLOC_DEFAULT OFF)
        set(ENABLE_C_LOOP_DEFAULT OFF)
        set(ENABLE_SAMPLING_PROFILER_DEFAULT ON)
    else ()
        set(ENABLE_JIT_DEFAULT OFF)
        set(ENABLE_FTL_DEFAULT OFF)
        set(USE_SYSTEM_MALLOC_DEFAULT ON)
        set(ENABLE_C_LOOP_DEFAULT ON)
        set(ENABLE_SAMPLING_PROFILER_DEFAULT OFF)
    endif ()

The WTF_CPU_ARM branch enables the JIT stuff, but this is no longer supported on your WTF_CPU_ARM board. So that branch is incorrect. More logic is needed to distinguish between ARMv7 + thumb and older ARM. Should look something like:

elseif (WTF_CPU_ARM AND has thumb2 AND armv7 AND WTF_OS_LINUX)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1481397</commentid>
    <comment_count>5</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2018-11-25 11:48:16 -0800</bug_when>
    <thetext>Yeah, something like that. I can give it a try and try to come up with a patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1481422</commentid>
    <comment_count>6</comment_count>
      <attachid>355607</attachid>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2018-11-25 14:49:45 -0800</bug_when>
    <thetext>Created attachment 355607
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1481423</commentid>
    <comment_count>7</comment_count>
      <attachid>355608</attachid>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2018-11-25 14:50:57 -0800</bug_when>
    <thetext>Created attachment 355608
Patch

This seems to be enough</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1481482</commentid>
    <comment_count>8</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2018-11-26 00:54:26 -0800</bug_when>
    <thetext>Committed r238489: &lt;https://trac.webkit.org/changeset/238489&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>355607</attachid>
            <date>2018-11-25 14:49:45 -0800</date>
            <delta_ts>2018-11-25 14:50:57 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>file_188862.txt</filename>
            <type>text/plain</type>
            <size>24</size>
            <attacher name="Alberto Garcia">berto</attacher>
            
              <data encoding="base64">VGhpcyBzZWVtcyB0byBiZSBlbm91Z2gu
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>355608</attachid>
            <date>2018-11-25 14:50:57 -0800</date>
            <delta_ts>2018-11-25 18:59:57 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>188862.diff</filename>
            <type>text/plain</type>
            <size>1194</size>
            <attacher name="Alberto Garcia">berto</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL0NoYW5nZUxvZyBiL0NoYW5nZUxvZwppbmRleCA0NjhiMjRkOTQ4MC4uZTY0
ZDg5NWRkNjUgMTAwNjQ0Ci0tLSBhL0NoYW5nZUxvZworKysgYi9DaGFuZ2VMb2cKQEAgLTEsMyAr
MSwxNSBAQAorMjAxOC0xMS0yNSAgQWxiZXJ0byBHYXJjaWEgIDxiZXJ0b0BpZ2FsaWEuY29tPgor
CisgICAgICAgIFtHVEtdIFsyLjIyLjBdIEZhaWxzIHRvIGJ1aWxkIGluIGFybWVsCisgICAgICAg
IGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xODg4NjIKKworICAg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AgICAg
ICAgc2V0KEVOQUJMRV9KSVRfREVGQVVMVCBPTikKICAgICAgICAgc2V0KEVOQUJMRV9GVExfREVG
QVVMVCBPRkYpCiAgICAgICAgIHNldChVU0VfU1lTVEVNX01BTExPQ19ERUZBVUxUIE9GRikK
</data>
<flag name="review"
          id="372679"
          type_id="1"
          status="+"
          setter="mcatanzaro"
    />
          </attachment>
      

    </bug>

</bugzilla>