<?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>237606</bug_id>
          
          <creation_ts>2022-03-08 08:17:14 -0800</creation_ts>
          <short_desc>REGRESSION(r290506): [GTK] GBM dependency breaks build</short_desc>
          <delta_ts>2022-10-20 09:55:55 -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>Unspecified</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=237886</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=246812</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>
          
          <blocked>237649</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Jim Mason">jmason</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>alex</cc>
    
    <cc>aperez</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>fujii</cc>
    
    <cc>zan</cc>
    
    <cc>zdobersek</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1849271</commentid>
    <comment_count>0</comment_count>
    <who name="Jim Mason">jmason</who>
    <bug_when>2022-03-08 08:17:14 -0800</bug_when>
    <thetext>Building on X11/nVIDIA, USE_ANGLE_WEBGL=OFF

I don&apos;t have libgbm, and building webkit for me has always succeeded without it.  GL seems to work fine; for example, I can run the tanks demo.  Now my build fails because GBM does not exist on my system.

After removing the GBM dependency introduced by r290506, webkit still builds and runs fine.

Is this going to be a hard dependency going forward, because (older) nVIDIA drivers maybe don&apos;t have it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1849406</commentid>
    <comment_count>1</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-03-08 14:21:33 -0800</bug_when>
    <thetext>(In reply to Jim Mason from comment #0)
&gt; Building on X11/nVIDIA, USE_ANGLE_WEBGL=OFF
&gt; 
&gt; I don&apos;t have libgbm, and building webkit for me has always succeeded without
&gt; it.  GL seems to work fine; for example, I can run the tanks demo.  Now my
&gt; build fails because GBM does not exist on my system.
&gt; 
&gt; After removing the GBM dependency introduced by r290506, webkit still builds
&gt; and runs fine.
&gt; 
&gt; Is this going to be a hard dependency going forward, because (older) nVIDIA
&gt; drivers maybe don&apos;t have it.

There has been some talk internally about making GBM unneeded at build
time, and relying on dlopening() it where needed/available at runtime.

I wonder if we could make the GBM dependency optional with USE_ANGLE_WEBGL
disabled in the meantime, though 🤔️</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1849545</commentid>
    <comment_count>2</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2022-03-08 22:41:32 -0800</bug_when>
    <thetext>No, because it will be used outside of ANGLE too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1849554</commentid>
    <comment_count>3</comment_count>
    <who name="Alejandro G. Castro">alex</who>
    <bug_when>2022-03-09 00:01:39 -0800</bug_when>
    <thetext>Thanks for the report!

In the patch we forgot to add the ` if (USE_ANGLE_WEBGL) ` around the find_package option, but the compilation is correctly guarded. That is why it stops when the library is not found in the system but it compiles and works correctly if you remove the find_package manually, the not ANGLE solution does not require gbm. This was fixed in a commit later here:

https://trac.webkit.org/changeset/289575/webkit

Just try to update to that commit and it should work.

Anyway, As Zan is explaining we are planning to make ANGLE/GBM solution the default one in the near future and focus on working/supporting just that technology for the future. We will maintain the old solution for some time though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1849557</commentid>
    <comment_count>4</comment_count>
    <who name="Alejandro G. Castro">alex</who>
    <bug_when>2022-03-09 00:08:34 -0800</bug_when>
    <thetext>(In reply to Alejandro G. Castro from comment #3)
&gt; Thanks for the report!
&gt; 
&gt; In the patch we forgot to add the ` if (USE_ANGLE_WEBGL) ` around the
&gt; find_package option, but the compilation is correctly guarded. That is why
&gt; it stops when the library is not found in the system but it compiles and
&gt; works correctly if you remove the find_package manually, the not ANGLE
&gt; solution does not require gbm. This was fixed in a commit later here:
&gt; 
&gt; https://trac.webkit.org/changeset/289575/webkit
&gt; 

Oops sorry, this commit was previous to that one :-), so yep, you have to move back to the previous commit because we are already moving to use the technology outside ANGLE.

Sorry again for the confusion. I&apos;m keeping the bug open to check more comments about the situation in your configuration for the new solutions.

Thanks again!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1849637</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2022-03-09 04:48:44 -0800</bug_when>
    <thetext>We can&apos;t add required packages like r290506. New dependencies should be optional.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1849649</commentid>
    <comment_count>6</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2022-03-09 05:25:20 -0800</bug_when>
    <thetext>Even if it makes video playback and WebGL optional down the line?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1849660</commentid>
    <comment_count>7</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2022-03-09 05:44:57 -0800</bug_when>
    <thetext>(In reply to Adrian Perez from comment #1)
&gt; (In reply to Jim Mason from comment #0)
&gt; &gt; Building on X11/nVIDIA, USE_ANGLE_WEBGL=OFF
&gt; &gt; 
&gt; &gt; I don&apos;t have libgbm, and building webkit for me has always succeeded without
&gt; &gt; it.  GL seems to work fine; for example, I can run the tanks demo.  Now my
&gt; &gt; build fails because GBM does not exist on my system.
&gt; &gt; 
&gt; &gt; After removing the GBM dependency introduced by r290506, webkit still builds
&gt; &gt; and runs fine.
&gt; &gt; 
&gt; &gt; Is this going to be a hard dependency going forward, because (older) nVIDIA
&gt; &gt; drivers maybe don&apos;t have it.
&gt; 
&gt; There has been some talk internally about making GBM unneeded at build
&gt; time, and relying on dlopening() it where needed/available at runtime.
&gt; 

This is the end goal but hasn&apos;t been started yet. The two libraries were added as deps to not block the ongoing work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1849663</commentid>
    <comment_count>8</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2022-03-09 05:45:48 -0800</bug_when>
    <thetext>(In reply to Zan Dobersek from comment #6)
&gt; Even if it makes video playback and WebGL optional down the line?

With dlopen()-y solution these two would end up being optional at runtime.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1849664</commentid>
    <comment_count>9</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2022-03-09 05:48:20 -0800</bug_when>
    <thetext>(In reply to Zan Dobersek from comment #6)
&gt; Even if it makes video playback and WebGL optional down the line?

No, that would be a regression.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1851412</commentid>
    <comment_count>10</comment_count>
    <who name="Alejandro G. Castro">alex</who>
    <bug_when>2022-03-15 11:45:30 -0700</bug_when>
    <thetext>I&apos;ve commented in the other bug but I&apos;ll add it here too to make sure everyone is updated, this week we discussed the way to move forward with the new buffer sharing architecture and we are going to add a new define to guard the gbm code. This will allow to compile without it using the current architecture.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1854088</commentid>
    <comment_count>11</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2022-03-23 02:42:18 -0700</bug_when>
    <thetext>Resolved with changes in bug #237974.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1854152</commentid>
    <comment_count>12</comment_count>
    <who name="Jim Mason">jmason</who>
    <bug_when>2022-03-23 07:01:58 -0700</bug_when>
    <thetext>(In reply to Zan Dobersek from comment #11)
&gt; Resolved with changes in bug #237974.

Confirmed, thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1904428</commentid>
    <comment_count>13</comment_count>
    <who name="Jim Mason">jmason</who>
    <bug_when>2022-10-10 01:46:59 -0700</bug_when>
    <thetext>This has returned because of this commit:

https://commits.webkit.org/254947@main</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1907003</commentid>
    <comment_count>14</comment_count>
    <who name="Alejandro G. Castro">alex</who>
    <bug_when>2022-10-20 02:17:47 -0700</bug_when>
    <thetext>(In reply to Jim Mason from comment #13)
&gt; This has returned because of this commit:
&gt; 
&gt; https://commits.webkit.org/254947@main

Thanks for reporting! Would you mind creating a different bug and closing this one, it is better for us to handle it that way because it is a different problem added later.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1907083</commentid>
    <comment_count>15</comment_count>
    <who name="Jim Mason">jmason</who>
    <bug_when>2022-10-20 09:55:55 -0700</bug_when>
    <thetext>Reopening in new issue as requested.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>