Bug 250573 - [GTK] REGRESSION(258448@main): Missing header with libwebrtc (USE_GSTREAMER_WEBRTC=FALSE)
Summary: [GTK] REGRESSION(258448@main): Missing header with libwebrtc (USE_GSTREAMER_W...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-01-13 07:22 PST by Manuel A. Fernandez Montecelo
Modified: 2023-01-13 14:36 PST (History)
3 users (show)

See Also:


Attachments
Patch that fixes the issue (704 bytes, patch)
2023-01-13 08:00 PST, Manuel A. Fernandez Montecelo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel A. Fernandez Montecelo 2023-01-13 07:22:49 PST
When issuing USE_GSTREAMER_WEBRTC=FALSE, there's an error:

---------
In file included from /home/build/WebKit/Source/WebKit/UIProcess/WebPreferences.h:33,
                 from /home/build/WebKit/Source/WebKit/UIProcess/API/glib/WebKitSettingsPrivate.h:31,
                 from /home/build/WebKit/Tools/TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:23:
/home/build/WebKit/WebKitBuild/Release/WebCore/PrivateHeaders/WebCore/LibWebRTCProvider.h:37:10: fatal error: webrtc/api/peer_connection_interface.h: No such file or directory
   37 | #include <webrtc/api/peer_connection_interface.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
----------

This happens since commit 9def6e6f0258ddd9171d32bec2fffb684dbc7b8b.
Comment 1 Manuel A. Fernandez Montecelo 2023-01-13 07:31:31 PST
CCing author of commit
Comment 2 Manuel A. Fernandez Montecelo 2023-01-13 08:00:17 PST
Created attachment 464486 [details]
Patch that fixes the issue

I attach a patch that solves the issue.  I was hoping to use something a bit simpler/abstract like using webrtc_INCLUDE_DIRECTORIES but it doesn't seem to work.

The generated file ./WebKitBuild/Release/DerivedSources/WebKit/WebPreferencesDefinitions.h contains the following:
---------
#if ENABLE(WEB_RTC)
#if USE(LIBWEBRTC)
#define DEFAULT_VALUE_FOR_PeerConnectionEnabled WebCore::LibWebRTCProvider::webRTCAvailable()
#elif USE(GSTREAMER_WEBRTC)
#define DEFAULT_VALUE_FOR_PeerConnectionEnabled true
#else
#define DEFAULT_VALUE_FOR_PeerConnectionEnabled false
#endif
#endif
---------

so building this file, when using libwebrtc (instead of the default gstreamer-webrtc) the compiler needs to know about WebCore::LibWebRTCProvider, that's why in commit 9def6e6f0258ddd9171d32bec2fffb684dbc7b8b the line "+#include <WebCore/LibWebRTCProvider.h>" was added to Source/WebKit/UIProcess/WebPreferences.h.

However, when building, WebCore/LibWebRTCProvider.h includes webrtc/api/peer_connection_interface.h and it cannot be found at that point.

(After adding a directory for that, it fails due to missing headers in the abseil-cpp subdir within libwebrtc).
Comment 3 Manuel A. Fernandez Montecelo 2023-01-13 13:18:33 PST
Pull request: https://github.com/WebKit/WebKit/pull/8628
Comment 4 EWS 2023-01-13 14:35:45 PST
Committed 258892@main (ee71929690ce): <https://commits.webkit.org/258892@main>

Reviewed commits have been landed. Closing PR #8628 and removing active labels.
Comment 5 Radar WebKit Bug Importer 2023-01-13 14:36:17 PST
<rdar://problem/104240432>