Introduction to libxml2
The libxml2 package contains libraries and utilities used for
parsing XML files.
Important
Updating this package is known to break ABI.
Important
For the lib32 installation instructions, they require new Meson
cross files from
MLFS, as --libdir=/usr/lib32 has been moved
to the cross files and no longer appear in the instructions.
Install the new cross files so that 32-bit libraries don't get
installed in /usr/lib.
libxml2 Dependencies
Recommended
ICU-78.2
Installation of libxml2
First, remove an unnecessary call to git in meson.build:
sed -i "/'git'/,+3d" meson.build
Install libxml2 by running the following commands:
mkdir build &&
cd build &&
meson setup --prefix=/usr \
--buildtype=release \
-D history=enabled \
-D icu=enabled &&
ninja
Now, as the root user:
ninja install &&
sed 's/--static/--shared/' -i /usr/bin/xml2-config
lib32 Installation of libxml2
Install lib32-libxml2 by running the following commands:
rm -rf * &&
meson setup --prefix=/usr \
--buildtype=release \
--cross-file=lib32 \
-D history=enabled \
-D icu=enabled &&
ninja
Now, as the root user:
DESTDIR=$PWD/DESTDIR ninja install &&
cp -Rv DESTDIR/usr/lib32/* /usr/lib32 &&
rm -rf DESTDIR &&
ldconfig
Command Explanations
Note
Inspect meson_options.txt or
meson.options for a full list of
options.
-D history=enabled: This
switch enables Readline support when running xmlcatalog or xmllint in shell mode.
-D icu=enabled: This switch
enables support for ICU, which provides additional Unicode support.
This is needed for some packages outside of GLFS, such as for
QtWebEngine.
Contents
Installed Programs:
xml2-config, xmlcatalog, and
xmllint
Installed Libraries:
libxml2
Installed Directories:
/usr/include/libxml2,
/usr/lib/cmake/libxml2, /usr/share/doc/libxml2-2.15.1, and
/usr/share/gtk-doc/html/libxml2
Short Descriptions
|
xml2-config
|
determines the compile and linker flags that should be
used to compile and link programs that use libxml2
|
|
xmlcatalog
|
is used to monitor and manipulate XML and SGML catalogs
|
|
xmllint
|
parses XML files and outputs reports (based upon options)
to detect errors in XML coding
|
|
libxml2
|
provides functions for programs to parse files that use
the XML format
|