Undefined symbol: xmlMemSize when compiling webkitgtk-2.46.3

During compilation of the latest stable release webkitgtk-2.46.3 I’m getting this error:

raphy@raohy:~/Downloads/webkitgtk-2.46.3$ cmake --build builddir/

[ 92%] Built target WebCore_CopyPrivateHeaders
[ 92%] Built target WebKit-forwarding-headers
[ 92%] Generating ../../WebKitGTK/DerivedSources   
/ModernMediaControlsGResourceBundle.c,     ../../WebKitGTK/DerivedSources 
/ModernMediaControlsGResourceBundle.c.deps
 /usr/local/bin/xmllint: symbol lookup error: /usr/local/bin/xmllint: undefined symbol: xmlMemSize
/home/raphy/Downloads/webkitgtk-2.46.3/builddir/WebKitGTK/DerivedSources    /ModernMediaControlsGResourceBundle.xml: Child process exited with code 127.

But a suitable xml2 library was detected:

raphy@raohy:~/Downloads$ tar -xf webkitgtk-2.46.3.tar.xz
raphy@raohy:~/Downloads$ cd webkitgtk-2.46.3/
raphy@raohy:~/Downloads/webkitgtk-2.46.3$

raphy@raohy:~/Downloads/webkitgtk-2.46.3$ cmake -B builddir -DPORT=GTK    
-DUSE_GSTREAMER_WEBRTC=TRUE -DENABLE_WEB_RTC=ON -DUSE_GTK4=OFF
-- The C compiler identification is GNU 12.3.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
 CMake Warning at Source/cmake/WebKitCommon.cmake:10 (message):
  No CMAKE_BUILD_TYPE value specified, defaulting to RelWithDebInfo.
Call Stack (most recent call first):
  CMakeLists.txt:16 (include)

-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found suitable version "2.9.14", minimum  required is "2.8.0")   // <---------------------------------------------------------

libxml2 libxml2-dev libxml2-utils installed are already the newest version :

raphy@raohy:~$ sudo apt-get install libxml2 libxml2-dev libxml2-utils
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libxml2 is already the newest version (2.9.14+dfsg-1.3ubuntu3).
libxml2-dev is already the newest version (2.9.14+dfsg-1.3ubuntu3).
libxml2-utils is already the newest version (2.9.14+dfsg-1.3ubuntu3).

OS: Ubuntu 24.04

What am I missing ? How to make it work?

xmlMemSize was introduce in d7daf9fd which is available from libxml2 version 2.11.0.

Ubuntu 24.04 still uses an older 2.9.14 version.

So, it appears you’ve built and installed a much recent xmllint in a non-standard path, which tries to use the system libxml2, which is still at 2.9.14. Hence the failure. Use system libxmllint or update LD_LIBRARY_PATH if you want the custom built xmllint.

Also, you’ve posted the same question in multiple places in the past hour (which I think is not good practice).

1 Like

Thank you for your kind answer

About posting in several places, I’m sorry for you …

1 Like

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.