<?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>254553</bug_id>
          
          <creation_ts>2023-03-27 16:09:58 -0700</creation_ts>
          <short_desc>Webassembly enabled build failed for RISCV64</short_desc>
          <delta_ts>2023-05-05 10:35:36 -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>WebAssembly</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Khem Raj">raj.khem</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
    
    <cc>zdobersek</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1944408</commentid>
    <comment_count>0</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2023-03-27 16:09:58 -0700</bug_when>
    <thetext>Starting Webkit 2.40 it does not build for RISCV64 as the build fails in Wasm support. It worked ok with 2.38

../webkitgtk-2.40.0/Source/JavaScriptCore/wasm/WasmCallee.h:95:47: error: member access into incomplete type &apos;JSC::Co         mpilation&apos;                                                                                                                         void* start = m_entrypoint.compilation-&gt;codeRef().executableMemory()-&gt;start().untaggedPtr();                    66428 |                                               ^                                                                          ../webkitgtk-2.40.0/Source/JavaScriptCore/wasm/WasmFormat.h:49:7: note: forward declaration of &apos;JSC::Compilation&apos;       66430 | class Compilation;                                                                                                             ^                                                                                                                 66432 | In file included from ../webkitgtk-2.40.0/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:57:                     66433 | In file included from ../webkitgtk-2.40.0/Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.h:31:                     66434 | In file included from ../webkitgtk-2.40.0/Source/JavaScriptCore/wasm/js/JSWebAssemblyGlobal.h:33:                       66435 | In file included from ../webkitgtk-2.40.0/Source/JavaScriptCore/wasm/js/WebAssemblyFunction.h:32:                       66436 | ../webkitgtk-2.40.0/Source/JavaScriptCore/wasm/WasmCallee.h:96:45: error: member access into incomplete type &apos;JSC::Co         mpilation&apos;                                                                                                                         void* end = m_entrypoint.compilation-&gt;codeRef().executableMemory()-&gt;end().untaggedPtr();                        66438 |                                             ^                                                                            ../webkitgtk-2.40.0/Source/JavaScriptCore/wasm/WasmFormat.h:49:7: note: forward declaration of &apos;JSC::Compilation&apos;       66440 | class Compilation;                                                                                                             ^                                                                                                                 66442 | In file included from ../webkitgtk-2.40.0/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:57:                     66443 | In file included from ../webkitgtk-2.40.0/Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.h:31:                     66444 | In file included from ../webkitgtk-2.40.0/Source/JavaScriptCore/wasm/js/JSWebAssemblyGlobal.h:33:                       66445 | In file included from ../webkitgtk-2.40.0/Source/JavaScriptCore/wasm/js/WebAssemblyFunction.h:32:                       66446 | ../webkitgtk-2.40.0/Source/JavaScriptCore/wasm/WasmCallee.h:100:86: error: member access into incomplete type &apos;JSC::C         ompilation&apos;                                                                                                                    CodePtr&lt;WasmEntryPtrTag&gt; entrypointImpl() const { return m_entrypoint.compilation-&gt;code().retagged&lt;WasmEntryPtrTa         g&gt;(); }                                                                                                                                                                                                         ^</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1944409</commentid>
    <comment_count>1</comment_count>
      <attachid>465620</attachid>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2023-03-27 16:13:03 -0700</bug_when>
    <thetext>Created attachment 465620
Workaround patch

This patch adds a way to disable wasm on RV64, which was always enabled</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1946341</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-04-03 16:10:15 -0700</bug_when>
    <thetext>&lt;rdar://problem/107582046&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>465620</attachid>
            <date>2023-03-27 16:13:03 -0700</date>
            <delta_ts>2023-03-27 16:13:03 -0700</delta_ts>
            <desc>Workaround patch</desc>
            <filename>disable_wasm_riscv64.patch</filename>
            <type>text/plain</type>
            <size>550</size>
            <attacher name="Khem Raj">raj.khem</attacher>
            
              <data encoding="base64">UHJvdmlkZSBhIHdheSB0byBvdmVycmlkZSBlbmFibGluZyB3YXNtIGZyb20gQ01ha2UKYnkgc2V0
dGluZyAtREVOQUJMRV9XRUJBU1NFTUJMWT1PRkYgZm9yIFJJU0NWNjQKCi0tLSBhL1NvdXJjZS9X
VEYvd3RmL1BsYXRmb3JtRW5hYmxlLmgKKysrIGIvU291cmNlL1dURi93dGYvUGxhdGZvcm1FbmFi
bGUuaApAQCAtNjEzLDEzICs2MTMsMTQgQEAKICNlbmRpZgogCiAjaWYgQ1BVKFJJU0NWNjQpCi0j
dW5kZWYgRU5BQkxFX1dFQkFTU0VNQkxZCisjaWYgIWRlZmluZWQoRU5BQkxFX1dFQkFTU0VNQkxZ
KQogI2RlZmluZSBFTkFCTEVfV0VCQVNTRU1CTFkgMQogI3VuZGVmIEVOQUJMRV9XRUJBU1NFTUJM
WV9CM0pJVAogI2RlZmluZSBFTkFCTEVfV0VCQVNTRU1CTFlfQjNKSVQgMAogI3VuZGVmIEVOQUJM
RV9XRUJBU1NFTUJMWV9CQlFKSVQKICNkZWZpbmUgRU5BQkxFX1dFQkFTU0VNQkxZX0JCUUpJVCAw
CiAjZW5kaWYKKyNlbmRpZgogCiAjaWYgIWRlZmluZWQoRU5BQkxFX0NfTE9PUCkKICNpZiBFTkFC
TEUoSklUKSB8fCBDUFUoWDg2XzY0KSB8fCBDUFUoQVJNNjQpCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>