<?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>312154</bug_id>
          
          <creation_ts>2026-04-13 06:25:44 -0700</creation_ts>
          <short_desc>qtwpe link failure: undefined reference to `WTF::CString::CString(char const*)&apos;</short_desc>
          <delta_ts>2026-04-15 12:59:52 -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>WPE WebKit</component>
          <version>WebKit Local Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></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>tusooa</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>philn</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2199713</commentid>
    <comment_count>0</comment_count>
    <who name="">tusooa</who>
    <bug_when>2026-04-13 06:25:44 -0700</bug_when>
    <thetext>Configure with:

CC=/usr/lib/ccache/bin/gcc CXX=/usr/lib/ccache/bin/g++ cmake -DPORT=WPE -DCMAKE_INSTALL_PREFIX=/home/user/Install/packages/wpewebkit -DENABLE_WPE_QT_API=ON -DENABLE_JOURNALD_LOG=OFF .. -GNinja -DCMAKE_BUILD_TYPE=Release -DUSE_LIBBACKTRACE=OFF -DENABLE_WPE_PLATFORM=ON -DENABLE_WPE_1_1_API=OFF

(Gentoo GNU/Linux, GCC 15.2.1, cmake 4.2.4)

It gives the following link-time error:

[0/2] Re-checking globbed directories...
[10/26] Linking CXX shared library lib/libqtwpe.so
FAILED: [code=1] lib/libqtwpe.so
: &amp;&amp; /usr/lib/ccache/bin/g++ -fPIC -fdiagnostics-color=always -Wextra -Wall -pipe -fmax-errors=20 -Wno-odr -Wno-stringop-overread -Wno-stringop-overflow -Wno-nonnull -Wno-array-bounds -Wno-expansion-to-defined -Wno-noexcept-type -Wno-subobject-linkage -Wno-psabi -Wno-misleading-indentation -Wno-maybe-uninitialized -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wno-tautological-compare -fasynchronous-unwind-tables -fno-strict-aliasing -fno-exceptions -fno-rtti -fcoroutines -ffunction-sections -fdata-sections -O3 -DNDEBUG  -shared -Wl,--no-undefined  -Wl,--gc-sections -Wl,--disable-new-dtags -Wl,--dependency-file=Source/WebKit/CMakeFiles/qtwpe.dir/link.d -Wl,-soname,libqtwpe.so -o lib/libqtwpe.so Source/WebKit/CMakeFiles/qtwpe.dir/qtwpe_autogen/mocs_compilation.cpp.o Source/WebKit/CMakeFiles/qtwpe.dir/UIProcess/API/wpe/qt6/WPEDisplayQtQuick.cpp.o Source/WebKit/CMakeFiles/qtwpe.dir/UIProcess/API/wpe/qt6/WPEToplevelQtQuick.cpp.o Source/WebKit/CMakeFiles/qtwpe.dir/UIProcess/API/wpe/qt6/WPEViewQtQuick.cpp.o Source/WebKit/CMakeFiles/qtwpe.dir/UIProcess/API/wpe/qt6/WPEQmlExtensionPlugin.cpp.o Source/WebKit/CMakeFiles/qtwpe.dir/UIProcess/API/wpe/qt6/WPEQtView.cpp.o Source/WebKit/CMakeFiles/qtwpe.dir/UIProcess/API/wpe/qt6/WPEQtViewLoadRequest.cpp.o  -Wl,-rpath,/home/user/Code/WebKit/build-rel/lib:  /usr/lib64/libepoxy.so  /usr/lib64/libglib-2.0.so  /usr/lib64/libgobject-2.0.so  lib/libWPEWebKit-2.0.so.1.10.0  lib/libSkia.a  /usr/lib64/libfreetype.so  /usr/lib64/libfontconfig.so  /usr/lib64/libwebpmux.so  /usr/lib64/libwebp.so  /usr/lib64/libexpat.so  /usr/lib64/libharfbuzz.so  /usr/lib64/libjpeg.so  /usr/lib64/libpng.so  /usr/lib64/libz.so  /usr/lib64/libgmodule-2.0.so  /usr/lib64/libglib-2.0.so  /usr/lib64/libsoup-3.0.so  /usr/lib64/libwpe-1.0.so  /usr/lib64/libseccomp.so  /usr/lib64/libgstreamer-1.0.so  /usr/lib64/libQt6Quick.so.6.10.2  /usr/lib64/libQt6OpenGL.so.6.10.2  /usr/lib64/libQt6Gui.so.6.10.2  /usr/lib64/libepoxy.so  /usr/lib64/libxkbcommon.so  /usr/lib64/libQt6QmlMeta.so.6.10.2  /usr/lib64/libQt6QmlModels.so.6.10.2  /usr/lib64/libQt6QmlWorkerScript.so.6.10.2  /usr/lib64/libQt6Qml.so.6.10.2  /usr/lib64/libQt6Network.so.6.10.2  /usr/lib64/libQt6Core.so.6.10.2 &amp;&amp; cd /home/user/Code/WebKit/build-rel/Source/WebKit &amp;&amp; /usr/bin/cmake -E copy /home/user/Code/WebKit/build-rel/lib/libqtwpe.so /home/user/Code/WebKit/build-rel/lib/qt6/qml/org/wpewebkit/qtwpe &amp;&amp; cd /home/user/Code/WebKit/build-rel/Source/WebKit &amp;&amp; /usr/bin/cmake -E copy /home/user/Code/WebKit/Source/WebKit/UIProcess/API/wpe/qt6/qmldir /home/user/Code/WebKit/build-rel/lib/qt6/qml/org/wpewebkit/qtwpe
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: Source/WebKit/CMakeFiles/qtwpe.dir/UIProcess/API/wpe/qt6/WPEDisplayQtQuick.cpp.o: in function `wpeDisplayQtQuickConnect(_WPEDisplay*, _GError**)&apos;:
WPEDisplayQtQuick.cpp:(.text._ZL24wpeDisplayQtQuickConnectP11_WPEDisplayPP7_GError+0xf8): undefined reference to `WTF::CString::CString(char const*)&apos;
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: WPEDisplayQtQuick.cpp:(.text._ZL24wpeDisplayQtQuickConnectP11_WPEDisplayPP7_GError+0x132): undefined reference to `WTF::CString::CString(char const*)&apos;
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: WPEDisplayQtQuick.cpp:(.text._ZL24wpeDisplayQtQuickConnectP11_WPEDisplayPP7_GError+0x234): undefined reference to `WTF::fastFree(void*)&apos;
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: WPEDisplayQtQuick.cpp:(.text._ZL24wpeDisplayQtQuickConnectP11_WPEDisplayPP7_GError+0x264): undefined reference to `WTF::fastFree(void*)&apos;
collect2: error: ld returned 1 exit status
[13/26] Generating documentation: WPEJavaScriptCore
ninja: build stopped: subcommand failed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2200293</commentid>
    <comment_count>1</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2026-04-14 11:58:53 -0700</bug_when>
    <thetext>Maybe that code should be migrated to CStringView.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2200358</commentid>
    <comment_count>2</comment_count>
    <who name="">tusooa</who>
    <bug_when>2026-04-14 14:28:46 -0700</bug_when>
    <thetext>https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_device_query.txt says that the pointer returned from eglQueryDeviceStringEXT points to static data. Is there any reason to use CString to make the wpeDisplayQtQuickConnect function own the data (for just a little bit)? For example, will a subsequent eglQueryDeviceStringEXT overwrite the pointed-to data returned from the first query? If it is the case, I feel that we can replace CString with std::string or similar. Otherwise, CStringView should be usable because relevant functions are all header-only.

The two variables are very soon passed to wpe_drm_device_new, which then uses CString to copy and own the data.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2200709</commentid>
    <comment_count>3</comment_count>
    <who name="">tusooa</who>
    <bug_when>2026-04-15 10:49:09 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/62829</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2200712</commentid>
    <comment_count>4</comment_count>
    <who name="">tusooa</who>
    <bug_when>2026-04-15 10:52:05 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #1)
&gt; Maybe that code should be migrated to CStringView.

I submitted a patch, please let me know if my reasoning in it is sound, thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2200774</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-04-15 12:59:49 -0700</bug_when>
    <thetext>Committed 311311@main (ea9518d268c2): &lt;https://commits.webkit.org/311311@main&gt;

Reviewed commits have been landed. Closing PR #62829 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>