Bug 237606

Summary: REGRESSION(r290506): [GTK] GBM dependency breaks build
Product: WebKit Reporter: Jim Mason <jmason>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: alex, aperez, bugs-noreply, cgarcia, Hironori.Fujii, zan, zdobersek
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=237886
https://bugs.webkit.org/show_bug.cgi?id=246812
Bug Depends on:    
Bug Blocks: 237649    

Jim Mason
Reported 2022-03-08 08:17:14 PST
Building on X11/nVIDIA, USE_ANGLE_WEBGL=OFF I don'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't have it.
Attachments
Adrian Perez
Comment 1 2022-03-08 14:21:33 PST
(In reply to Jim Mason from comment #0) > Building on X11/nVIDIA, USE_ANGLE_WEBGL=OFF > > I don'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'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 🤔️
Zan Dobersek
Comment 2 2022-03-08 22:41:32 PST
No, because it will be used outside of ANGLE too.
Alejandro G. Castro
Comment 3 2022-03-09 00:01:39 PST
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.
Alejandro G. Castro
Comment 4 2022-03-09 00:08:34 PST
(In reply to Alejandro G. Castro from comment #3) > 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 > 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'm keeping the bug open to check more comments about the situation in your configuration for the new solutions. Thanks again!
Carlos Garcia Campos
Comment 5 2022-03-09 04:48:44 PST
We can't add required packages like r290506. New dependencies should be optional.
Zan Dobersek
Comment 6 2022-03-09 05:25:20 PST
Even if it makes video playback and WebGL optional down the line?
Zan Dobersek
Comment 7 2022-03-09 05:44:57 PST
(In reply to Adrian Perez from comment #1) > (In reply to Jim Mason from comment #0) > > Building on X11/nVIDIA, USE_ANGLE_WEBGL=OFF > > > > I don'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'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. > This is the end goal but hasn't been started yet. The two libraries were added as deps to not block the ongoing work.
Zan Dobersek
Comment 8 2022-03-09 05:45:48 PST
(In reply to Zan Dobersek from comment #6) > 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.
Carlos Garcia Campos
Comment 9 2022-03-09 05:48:20 PST
(In reply to Zan Dobersek from comment #6) > Even if it makes video playback and WebGL optional down the line? No, that would be a regression.
Alejandro G. Castro
Comment 10 2022-03-15 11:45:30 PDT
I've commented in the other bug but I'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.
Zan Dobersek
Comment 11 2022-03-23 02:42:18 PDT
Resolved with changes in bug #237974.
Jim Mason
Comment 12 2022-03-23 07:01:58 PDT
(In reply to Zan Dobersek from comment #11) > Resolved with changes in bug #237974. Confirmed, thanks!
Jim Mason
Comment 13 2022-10-10 01:46:59 PDT
This has returned because of this commit: https://commits.webkit.org/254947@main
Alejandro G. Castro
Comment 14 2022-10-20 02:17:47 PDT
(In reply to Jim Mason from comment #13) > This has returned because of this commit: > > 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.
Jim Mason
Comment 15 2022-10-20 09:55:55 PDT
Reopening in new issue as requested.
Note You need to log in before you can comment on or make changes to this bug.