libxml2-2.10.0

Introduction to libxml2

The libxml2 package contains libraries and utilities used for parsing XML files.

This package is known to build and work properly using an LFS-11.2 platform.

Package Information

Additional Downloads

libxml2 Dependencies

Optional

ICU-71.1 (see below) and Valgrind-3.19.0 (may be used in the tests)

[Note]

Note

The old Python2 module can be built after libxml2.so has been installed, see Python2 libxml2-2.10.0 module.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libxml2

Installation of libxml2

First, fix a problem recognizing Python-3.10:

autoreconf -fiv

Install libxml2 by running the following commands:

./configure --prefix=/usr           \
            --sysconfdir=/etc       \
            --disable-static        \
            --with-history          \
            PYTHON=/usr/bin/python3 \
            --docdir=/usr/share/doc/libxml2-2.10.0 &&
make

If you downloaded the testsuite, issue the following command:

tar xf ../xmlts20130923.tar.gz

To test the results, issue: make check > check.log. A summary of the results can be obtained with grep -E '^Total|expected' check.log. If Valgrind-3.19.0 is installed and you want to check for memory leaks, replace check with check-valgrind.

[Note]

Note

The tests use http://localhost/ to test parsing of external entities. If the machine where you run the tests serves as a web site, the tests may hang, depending on the content of the file served. It is therefore recommended to shut down the server during the tests, as the root user:

/etc/init.d/httpd stop

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--with-history: This switch enables Readline support when running xmlcatalog or xmllint in shell mode.

PYTHON=/usr/bin/python3: Allows building the libxml2 module with Python3 instead of Python2.

--with-icu: Add this switch if you have built ICU-71.1, for better unicode support.

Contents

Installed Programs: xml2-config, xmlcatalog, and xmllint
Installed Libraries: libxml2.so and libxml2mod.so (Python3 module)
Installed Directories: /usr/include/libxml2, /usr/lib/cmake/libxml2, /usr/share/doc/libxml2-2.10.0, /usr/share/doc/libxml2-python-2.10.0, 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.so

provides functions for programs to parse files that use the XML format

libxml2mod.so

is the interface for Python3 to use libxml2.so