Bug 311525
| Summary: | [GTK][WebRTC] WebKit main fails to build against librice main/v0.4.2 due to RiceTurnConfig C API mismatch | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Jaron <jaron> |
| Component: | WebRTC | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | jaron, philn, youennf |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| URL: | https://github.com/WebKit/WebKit/tree/524b854c9d8aadd91ebba5fa158b9fb46fe5c1a6 | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=311527 | ||
Jaron
On April 5, 2026, I reproduced a build failure when compiling WebKit GTK main against current upstream librice on Linux ARM64.
Environment
- Host: Linux ARM64
- Reproduced on: Ubuntu 24.04 ARM64
- WebKit ref: main at 524b854c9d8aadd91ebba5fa158b9fb46fe5c1a6
- librice ref: main at eed561c77ab69666a65c48545981dc5ae1acd17c
- Note: librice main and tag v0.4.2 currently point to the same commit above
Build configuration
- GTK port
- ENABLE_MEDIA_STREAM=ON
- ENABLE_WEB_RTC=ON
- USE_GSTREAMER_WEBRTC=ON
- USE_LIBRICE=ON
- ENABLE_MINIBROWSER=ON
librice was built from source and installed as C libraries for rice-proto and rice-io into a local prefix, then WebKit was configured with pkg-config / CMake pointing at that prefix.
Observed result
Configuration succeeds and the build gets deep into WebCore compilation, then fails because WebKit is calling a RiceTurnConfig C API that current librice does not expose.
Exact errors
/opt/webkit-builder/source/WebKit/Source/WebCore/platform/rice/GRefPtrRice.h:34:69: error: use of undeclared identifier 'rice_turn_config_unref'
/opt/webkit-builder/source/WebKit/Source/WebCore/Modules/mediastream/gstreamer/GStreamerIceAgent.cpp:265:33: error: no matching function for call to 'rice_turn_config_new'
/opt/webkit-builder/librice-prefix/include/rice/rice-proto.h:788:24: note: candidate function not viable: requires 3 arguments, but 7 were provided
Relevant WebKit use sites
- Source/WebCore/platform/rice/GRefPtrRice.h uses RiceTurnConfig with rice_turn_config_ref / rice_turn_config_unref
- Source/WebCore/Modules/mediastream/gstreamer/GStreamerIceAgent.cpp calls rice_turn_config_new(...) with 7 arguments
Current librice C API
Current librice main / v0.4.2 exposes:
- rice_turn_config_new(transport, addr, credentials)
- rice_turn_config_copy(...)
- rice_turn_config_free(...)
- setter APIs such as:
- rice_turn_config_set_allocation_transport(...)
- rice_turn_config_set_address_family(...)
- rice_turn_config_set_tls_config(...)
It does not expose:
- rice_turn_config_ref(...)
- rice_turn_config_unref(...)
- the 7-argument rice_turn_config_new(...) variant used by WebKit here
Expected result
WebKit main should either:
1. build against current librice main / v0.4.2, or
2. document / enforce a newer minimum librice C API or specific commit if WebKit intentionally depends on unreleased API changes.
Additional note
A local compatibility workaround that changed WebKit to use RiceTurnConfig copy/free semantics and setter-based TURN config construction removed the original RiceTurnConfig API mismatch errors. With that workaround in place, WebKit is able to find librice 0.4.2, complete configuration, and proceed into normal compilation.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Philippe Normand
Hi,
Thanks for the report, I'm aware of this already, there are several ABI/API breaks in librice since version 0.2.1. I would advise to use that version until WebKit has support for 0.4.x and newer.
I have a WIP branch for bug 310005 that aims to fix those build issues, among other things. Is it OK if I close this bug as duplicate of bug 310005 ?
Jaron
(In reply to Philippe Normand from comment #1)
> Hi,
>
> Thanks for the report, I'm aware of this already, there are several ABI/API
> breaks in librice since version 0.2.1. I would advise to use that version
> until WebKit has support for 0.4.x and newer.
>
> I have a WIP branch for bug 310005 that aims to fix those build issues,
> among other things. Is it OK if I close this bug as duplicate of bug 310005 ?
Thanks, I will use 0.2.1! Yes, feel free to close.
Philippe Normand
*** This bug has been marked as a duplicate of bug 310005 ***