Skip to content

Fix build with libxml2 2.12

Michael Cho requested to merge cho-m/gdl:fix-libxml2.12 into master

Fixes build failure seen in Homebrew. Caused by libxml2 2.12 changes where some headers (e.g. libxml/globals.h) are no longer indirectly included. xmlIndentTreeOutput was moved to libxml/xmlsave.h so just directly including that header given libxml/globals.h is considered deprecated.

  /bin/sh ../libtool  --tag=CC   --mode=compile clang -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"Gdl\" -DGNOMELOCALEDIR=\"/opt/homebrew/Cellar/gdl/3.40.0_1/share/locale\" -DGDL_UIDIR=\"""\" -I/opt/homebrew/Cellar/gdl/3.40.0_1/include -I..   -I/opt/homebrew/Cellar/pcre2/10.42/include -I/opt/homebrew/Cellar/glib/2.78.1/include/gio-unix-2.0 -I/opt/homebrew/Cellar/glib/2.78.1/include -I/opt/homebrew/Cellar/glib/2.78.1/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.78.1/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/Cellar/libxau/1.0.11/include -I/opt/homebrew/Cellar/libxdmcp/1.1.4/include -I/opt/homebrew/Cellar/libxcb/1.16/include -I/opt/homebrew/Cellar/libx11/1.8.7/include -I/opt/homebrew/Cellar/libxext/1.3.5/include -I/opt/homebrew/Cellar/at-spi2-core/2.50.0/include/atk-1.0 -I/opt/homebrew/Cellar/jpeg-turbo/3.0.0/include -I/opt/homebrew/opt/libpng/include/libpng16 -I/opt/homebrew/Cellar/xz/5.4.5/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/libtiff/4.6.0/include -I/opt/homebrew/Cellar/gdk-pixbuf/2.42.10_1/include/gdk-pixbuf-2.0 -I/opt/homebrew/Cellar/libepoxy/1.5.10/include -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/Cellar/fontconfig/2.14.2/include -I/opt/homebrew/Cellar/libxrender/0.9.11/include -I/opt/homebrew/Cellar/pixman/0.42.2/include/pixman-1 -I/opt/homebrew/Cellar/cairo/1.18.0/include -I/opt/homebrew/Cellar/cairo/1.18.0/include/cairo -I/opt/homebrew/Cellar/fribidi/1.0.13/include/fribidi -I/opt/homebrew/Cellar/graphite2/1.3.14/include -I/opt/homebrew/Cellar/harfbuzz/8.3.0/include/harfbuzz -I/opt/homebrew/Cellar/pango/1.50.14/include/pango-1.0 -I/opt/homebrew/Cellar/gtk+3/3.24.38_1/include/gtk-3.0 -I/opt/homebrew/Cellar/xorgproto/2023.2/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/ffi -I/opt/homebrew/Cellar/libxml2/2.12.0/include/libxml2     -g -O2 -c -o gdl-switcher.lo gdl-switcher.c
  gdl-dock-layout.c:226:5: error: use of undeclared identifier 'xmlIndentTreeOutput'
      xmlIndentTreeOutput = TRUE;
      ^

Merge request reports