<?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>311525</bug_id>
          
          <creation_ts>2026-04-05 06:24:40 -0700</creation_ts>
          <short_desc>[GTK][WebRTC] WebKit main fails to build against librice main/v0.4.2 due to RiceTurnConfig C API mismatch</short_desc>
          <delta_ts>2026-04-05 09:21:07 -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>WebRTC</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>310005</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=311527</see_also>
          <bug_file_loc>https://github.com/WebKit/WebKit/tree/524b854c9d8aadd91ebba5fa158b9fb46fe5c1a6</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jaron">jaron</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>jaron</cc>
    
    <cc>philn</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2197045</commentid>
    <comment_count>0</comment_count>
    <who name="Jaron">jaron</who>
    <bug_when>2026-04-05 06:24:40 -0700</bug_when>
    <thetext>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 &apos;rice_turn_config_unref&apos;
/opt/webkit-builder/source/WebKit/Source/WebCore/Modules/mediastream/gstreamer/GStreamerIceAgent.cpp:265:33: error: no matching function for call to &apos;rice_turn_config_new&apos;
/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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2197053</commentid>
    <comment_count>1</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2026-04-05 09:15:20 -0700</bug_when>
    <thetext>Hi,

Thanks for the report, I&apos;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 ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2197055</commentid>
    <comment_count>2</comment_count>
    <who name="Jaron">jaron</who>
    <bug_when>2026-04-05 09:20:05 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #1)
&gt; Hi,
&gt; 
&gt; Thanks for the report, I&apos;m aware of this already, there are several ABI/API
&gt; breaks in librice since version 0.2.1. I would advise to use that version
&gt; until WebKit has support for 0.4.x and newer.
&gt; 
&gt; I have a WIP branch for bug 310005 that aims to fix those build issues,
&gt; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2197056</commentid>
    <comment_count>3</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2026-04-05 09:21:07 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 310005 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>