xmllibxml2gnomewebkitgtkubuntu-24.04

/usr/local/bin/xmllint: 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?


Solution

  • Ubuntu libxml2-utils package installs xmllint on /usr/bin/ as shown by
    dpkg -L libxml2-utils | grep 'xmllint' but build is picking it from /usr/local/bin.

    May be there's a version mismatch. See /usr/local/bin/xmllint --version