Bug 263634

Summary: [GTK] Build error in Debian stable after 269634@main
Product: WebKit Reporter: Diego Pino <dpino>
Component: New BugsAssignee: Diego Pino <dpino>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, cgarcia, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Diego Pino 2023-10-24 22:59:30 PDT
GTK-Linux-64-bit-Release-Debian-Stable-Build is failing with the following build error:

```
../../Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp: In static member function ‘static std::unique_ptr<WebKit::AcceleratedSurfaceDMABuf::RenderTarget> WebKit::AcceleratedSurfaceDMABuf::RenderTargetEGLImage::create(uint64_t, const WebCore::IntSize&, const WebKit::DMABufRendererBufferFormat&)’:
../../Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:173:37: error: ‘gbm_bo_get_fd_for_plane’ was not declared in this scope; did you mean ‘gbm_bo_get_handle_for_plane’?
  173 |     fds.append(UnixFileDescriptor { gbm_bo_get_fd_for_plane(bo, planeIndex), UnixFileDescriptor::Adopt }); \
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~
```

It seems `gbm_bo_get_fd_for_plane` is only available since Mesa 21 onwards and Debian Stable (Debian 11) only features Mesa 20. Debian 11 has support until 10th June 2024.

Perhaps is possible to work around this function, in case not it would be needed to install Mesa 21 in Debian 11 via system libraries (Debian and Ubuntu bots build with --no-experimental-features, thus using only system libraries). In case none of these solutions would be possible, then use flag USE_GBM=OFF in Debian.
Comment 1 Carlos Garcia Campos 2023-10-25 02:48:18 PDT
Pull request: https://github.com/WebKit/WebKit/pull/19528
Comment 2 EWS 2023-10-25 07:35:17 PDT
Committed 269760@main (e5ec96108a23): <https://commits.webkit.org/269760@main>

Reviewed commits have been landed. Closing PR #19528 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-10-25 07:36:15 PDT
<rdar://problem/117474092>
Comment 4 Diego Pino 2023-10-30 05:23:50 PDT
The build for Debian is still failing with error:

```
<CXX> -DBUILDING_GTK__=1 -DBUILDING_WEBKIT=1 -DBUILDING_WITH_CMAKE=1 -DBUILDING_WebKit -DDATADIR=\"/usr/local/share\" -DGETTEXT_PACKAGE=\"WebKitGTK-4.1\" -DHAVE_CONFIG_H=1 -DJSC_GLIB_API_ENABLED -DLIBDIR=\"/usr/local/lib\" -DLOCALEDIR=\"/usr/local/share/locale\" -DPAS_BMALLO
../../../Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:188:9: error: use of undeclared identifier 'gbm_bo_get_fd_for_plane'; did you mean 'gbm_bo_get_fd_for_plane2'?
        ADD_PLANE_ATTRIBUTES(0);
        ^
```
Comment 5 Diego Pino 2023-10-30 05:24:53 PDT
Re-opening for pull request https://github.com/webkit/webkit/pull/19713
Comment 6 EWS 2023-10-30 09:38:35 PDT
Committed 269949@main (97784c574981): <https://commits.webkit.org/269949@main>

Reviewed commits have been landed. Closing PR #19713 and removing active labels.