<?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>249368</bug_id>
          
          <creation_ts>2022-12-14 19:49:58 -0800</creation_ts>
          <short_desc>REGRESSION(257515@main): breaks build with -flto=auto</short_desc>
          <delta_ts>2023-03-16 01:16:10 -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 Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=241002</see_also>
    
    <see_also>https://bugzilla.redhat.com/show_bug.cgi?id=2159783</see_also>
          <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="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Adrian Perez">aperez</assigned_to>
          <cc>aperez</cc>
    
    <cc>ap</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>fabiscafe</cc>
    
    <cc>fujii</cc>
    
    <cc>kloczko.tomasz</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>olivier.blin</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1919446</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-12-14 19:49:58 -0800</bug_when>
    <thetext>WebKitGTK 2.39.3 fails to link lib/libwebkitgtk-6.0.so.0.0.0 with -flto=auto. The rror message is:

lto1: fatal error: missing resolution data for _ZTVN7WebCore17SpeechRecognitionE

I had no clue what this error message meant, and there seem to be zero relevant search results on the internet, and also zero changes to Speech Recognition code between 2.39.2 and 2.39.3. So I bisected it and found the first bad commit is 257515@main &quot;[JSC] Clean up Structure transition watchpoint firing to pave a way to faster / cheap adaptive watchpoint&quot; which makes no sense.

This result is so weird that I will double check the results of my bisect tomorrow, just to be certain. My checkout is on 257514@main right now and it builds fine, so I will test 257515@main again.

I wonder if there might be a toolchain bug here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1919541</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-12-15 07:25:54 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #0)
&gt; This result is so weird that I will double check the results of my bisect
&gt; tomorrow, just to be certain.

It&apos;s true. This is definitely somehow caused by 257515@main &quot;[JSC] Clean up Structure transition watchpoint firing to pave a way to faster / cheap adaptive watchpoint&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1919707</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-12-15 13:52:15 -0800</bug_when>
    <thetext>I decided to just disable LTO and move on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1922506</commentid>
    <comment_count>3</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-01-02 04:11:22 -0800</bug_when>
    <thetext>*** Bug 249983 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1924500</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-01-10 09:57:37 -0800</bug_when>
    <thetext>GCC bug report: https://bugzilla.redhat.com/show_bug.cgi?id=2159783</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1925954</commentid>
    <comment_count>5</comment_count>
    <who name="Fabian Bornschein">fabiscafe</who>
    <bug_when>2023-01-17 02:02:16 -0800</bug_when>
    <thetext>For WebKitGTK 2.39.4 I was able to build with LTO, by using mold as linker.

Toolchain in use: (Arch Linux)
linux-api-headers 5.18.15
binutils 2.39
gcc 12.2.0
glibc 2.36</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1941345</commentid>
    <comment_count>6</comment_count>
      <attachid>465438</attachid>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2023-03-14 14:45:07 -0700</bug_when>
    <thetext>Created attachment 465438
Suspicious, ugly patch

I have been able to get a build of 2.39.91 with LTO using the BFD linker
applying this patch; I have to try and see if I can shuffle things around
to 1.) make it palatable for review, and 2.) keep the linker happy.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1941508</commentid>
    <comment_count>7</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2023-03-15 03:12:34 -0700</bug_when>
    <thetext>More fun... I cannot easily reproduce the build failure on my build box
with the following CMake incantation:

  CC=gcc CXX=g++ \
  LDFLAGS=&apos;-flto=auto -fuse-ld=bfd&apos;
  CFLAGS=&apos;-flto=auto&apos; CXXFLAGS=&apos;-flto=auto&apos; \
    cmake -S. -Bbuild-lto -DPORT=WPE -DCMAKE_BUILD_TYPE=Release -GNinja

That is using GCC 12.2.1 and Binutils 2.40; OTOH, it&apos;s 100% reproducible
doing Yocto from ToT, which has 11.3.0 and Binutils 2.38. Probably this
got fixed in the newer versions, but we need to support the ones from
Yocto because supported distros may have them as well.

It will be slower to try and make a proper fix having to do cross builds 🥴️</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1941592</commentid>
    <comment_count>8</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2023-03-15 10:33:07 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/11562</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1941727</commentid>
    <comment_count>9</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-03-15 18:06:34 -0700</bug_when>
    <thetext>Committed 261724@main (ee58c2ab8371): &lt;https://commits.webkit.org/261724@main&gt;

Reviewed commits have been landed. Closing PR #11562 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1941803</commentid>
    <comment_count>10</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2023-03-16 01:16:10 -0700</bug_when>
    <thetext>(In reply to EWS from comment #9)
&gt; Committed 261724@main (ee58c2ab8371):
&gt; &lt;https://commits.webkit.org/261724@main&gt;
&gt; 
&gt; Reviewed commits have been landed. Closing PR #11562 and removing active
&gt; labels.

Also: backported into the 2.38 and 2.40 release branches 👍️</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>465438</attachid>
            <date>2023-03-14 14:45:07 -0700</date>
            <delta_ts>2023-03-14 14:45:07 -0700</delta_ts>
            <desc>Suspicious, ugly patch</desc>
            <filename>0004-missing-SpeechRecognition-vtable.patch</filename>
            <type>text/plain</type>
            <size>1669</size>
            <attacher name="Adrian Perez">aperez</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL01vZHVsZXMvc3BlZWNoL1NwZWVjaFJlY29nbml0
aW9uLmNwcCBiL1NvdXJjZS9XZWJDb3JlL01vZHVsZXMvc3BlZWNoL1NwZWVjaFJlY29nbml0aW9u
LmNwcAppbmRleCA1ZGRjNjU5NWIxMGIuLjc5ODk0MmI5MTRiZiAxMDA2NDQKLS0tIGEvU291cmNl
L1dlYkNvcmUvTW9kdWxlcy9zcGVlY2gvU3BlZWNoUmVjb2duaXRpb24uY3BwCisrKyBiL1NvdXJj
ZS9XZWJDb3JlL01vZHVsZXMvc3BlZWNoL1NwZWVjaFJlY29nbml0aW9uLmNwcApAQCAtMjA2LDQg
KzIwNiwxMyBAQCB2b2lkIFNwZWVjaFJlY29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