1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-31 13:47:30 +03:00
libxml2/INSTALL.libxml2

72 lines
2.5 KiB
Plaintext
Raw Normal View History

See also the generic INSTALL file for configure options
Compilation
2021-04-25 21:19:59 +02:00
1. What is the process to compile libxml?
As most UNIX libraries libxml follows the "standard":
2021-04-25 21:19:59 +02:00
gunzip -c xxx.tar.gz | tar xvf -
cd libxml-xxxx
2021-04-25 21:19:59 +02:00
./configure --help
to see the options, then the compilation/installation proper
2021-04-25 21:19:59 +02:00
./configure [possible options]
make
make install
At that point you may have to rerun ldconfig or similar utility to
update your list of installed shared libs.
2020-03-08 17:19:42 +01:00
At this point you can check that the library is properly functioning
by running
2021-04-25 21:19:59 +02:00
make check
Please report test failures to the mailing list or bug tracker.
Another option for compiling libxml is using CMake:
cmake -E tar xf libxml2-xxx.tar.gz
cmake -S libxml2-xxx -B libxml2-xxx-build [possible options]
cmake --build libxml2-xxx-build
cmake --install libxml2-xxx-build
Common CMake options include:
-D BUILD_SHARED_LIBS=OFF # build static libraries
-D CMAKE_BUILD_TYPE=Release # specify build type
-D CMAKE_INSTALL_PREFIX=/usr/local # specify the install path
-D LIBXML2_WITH_ICONV=OFF # disable iconv
-D LIBXML2_WITH_LZMA=OFF # disable liblzma
-D LIBXML2_WITH_PYTHON=OFF # disable Python
-D LIBXML2_WITH_ZLIB=OFF # disable libz
You can also open the libxml source directory with its CMakeLists.txt
directly in various IDEs such as CLion, QtCreator, or Visual Studio.
2021-04-25 21:19:59 +02:00
2. What other libraries are needed to compile/install libxml?
2021-04-25 21:19:59 +02:00
Libxml does not require any other libraries. A platform with somewhat
recent POSIX support should be sufficient (please report any violation
to this rule you may find).
2021-04-25 21:19:59 +02:00
However if found at configuration time, libxml will detect and use
the following libs:
2021-04-25 21:19:59 +02:00
libz: a highly portable and widely available compression library
https://zlib.net/
liblzma: another compression library
https://tukaani.org/xz/
iconv: a powerful character encoding conversion library. It's
2021-04-25 21:19:59 +02:00
part of POSIX.1-2001, so it doesn't need to be installed
on modern UNIX-like systems, specifically on Linux.
https://www.gnu.org/software/libiconv/
ICU: Mainly used by Chromium on Windows. Unnecessary on most
systems.
Daniel
veillard@redhat.com