Libxml2 so 2 linux

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

GNOME/libxml2

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

libxml2 is an XML toolkit implemented in C, originally developed for the GNOME Project.

The git repository is hosted on GNOME’s GitLab server: https://gitlab.gnome.org/GNOME/libxml2

This code is released under the MIT License, see the Copyright file.

libxml2 can be built with GNU Autotools, CMake, or several other build systems in platform-specific subdirectories.

Autotools (for POSIX systems like Linux, BSD, macOS)

If you build from a Git tree, you have to install Autotools and start by generating the configuration files with:

If you build from a source tarball, extract the archive with:

tar xf libxml2-xxx.tar.gz cd libxml2-xxx 

To see a list of build options:

Also see the INSTALL file for additional instructions. Then you can configure and build the library:

./configure [possible options] make 

Note that by default, no optimization options are used. You have to enable them manually, for example with:

CFLAGS='-O2 -fno-semantic-interposition' ./configure 

Now you can run the test suite with:

Please report test failures to the mailing list or bug tracker.

Then you can install the library:

At that point you may have to rerun ldconfig or a similar utility to update your list of installed shared libs.

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.

Читайте также:  Comodo antivirus для linux установка

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).

However, if found at configuration time, libxml will detect and use the following libraries:

  • libz, a highly portable and widely available compression library.
  • liblzma, another compression library.
  • libiconv, a character encoding conversion library. The iconv function is part of POSIX.1-2001, so libiconv isn’t required on modern UNIX-like systems like Linux, BSD or macOS.
  • ICU, a Unicode library. Mainly useful as an alternative to iconv on Windows. Unnecessary on most other systems.

The current version of the code can be found in GNOME’s GitLab at at https://gitlab.gnome.org/GNOME/libxml2. The best way to get involved is by creating issues and merge requests on GitLab. Alternatively, you can start discussions and send patches to the mailing list. If you want to work with patches, please format them with git-format-patch and use plain text attachments.

All code must conform to C89 and pass the GitLab CI tests. Add regression tests if possible.

  • Daniel Veillard
  • Bjorn Reese
  • William Brack
  • Igor Zlatkovic for the Windows port
  • Aleksey Sanin
  • Nick Wellnhofer

Источник

How to install libxml2 in unix

can anybody tell me how to install libxml2 in Unix? I am using windows for browsing net and Unix for writing my C programs. I also dont know whether it is already installed. Please tell me guys how to install libxml2 and use it for parsing.

WHAT unix system? Are you running Linux, solaris, HPUX, SCO? which system? Once you share that we can probably help. You can do an ls to see if libxml2 is installed by checking to see if you have libxml2.a file in /usr/lib /usr/local/lib or /opt/lib or something like that the path will heavily depend on

2 Answers 2

Here’s a way to install from source — given by good folks at Cypress project.

—- for easy reading: copied from above URL —-

 cd /tmp wget ftp://xmlsoft.org/libxml2/libxml2-2.8.0.tar.gz tar xzf libxml2-2.8.0.tar.gz cd libxml2-2.8.0/ ./configure make sudo make install cd 

Read the installation instructions that come with libxml2 in the file INSTALL . If you find any file or directory with the substring libxml2 in /usr/local/include or /usr/local/lib (such as /usr/local/lib/libxml2.so ) then it is already installed.

Depending on the particular Unix brand (which you did not tell us), you might need to look in other directories as well.

Hi i am using solaris.. Go global for Unix.. client version 2.2.13.1093 220.. also i m using gnome and cde.. Also I am using windows for browsing.. so my downloaded file will be in windows.. can I copy it to unix? my internet does not seem to work in unix..

Читайте также:  Drivers touchpad asus linux

Hi guys I have checked in /usr/include and I found libxml2.. So what should be the syntax in the header file. Is ir #include ? Please help guys

You should instruct your compiler to search the proper directory, e.g. with cc -I/usr/include/libxml2/libxml . and then use, e.g., #include if that is the header you want. How new are you to C programming? If you just started, what you are trying is a major task and you should ask a local C guru.

These header concepts are kinda new for me.. thanks for the reply.. one more doubt.. I used gcc -I/usr/include/libxml2 -lxml2 xxx.c copied it from somewhere.. why should i write that lxml2? can you please tell me? without writing that i am getting errors

A header contains just declarations. A library contains the actual compiled code. The -I tells gcc where to look for headers, and -l tells it to link with a library. -lFOO will make a compiler search for a file named libFOO.a along some set of directories (to which you can add with -L/some/directory . Without -lxml2 gcc will not link in libxml2.a which leads to unresolved symbols. By default, gcc will only link in libc.a , that’s why you need -lxml2 . You should read the C FAQ, at c-faq.com with lots of answers for common questions.

Источник

libxml2-2.10.4

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

[Note]

Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

Package Information

  • Download (HTTP): https://download.gnome.org/sources/libxml2/2.10/libxml2-2.10.4.tar.xz
  • Download MD5 sum: 76808c467a58c31e2dbd511e71d5fd13
  • Download size: 2.5 MB
  • Estimated disk space required: 106 MB (with tests)
  • Estimated build time: 0.4 SBU (Using parallelism=4; with tests)

Additional Downloads

libxml2 Dependencies

Optional

ICU-73.2 (see below) and Valgrind-3.21.0 (may be used in the tests)

[Note]

Note

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

Installation of libxml2

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.4 && make

If you downloaded the test suite, 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.21.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:

Command Explanations

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

Читайте также:  Ssh client kali linux

—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-73.2, for better unicode support.

[Note]

Note

If the —with-icu switch is used, the BLFS editors recommend removing unneeded references to the ICU libraries. This will prevent many packages that use libxml2 from unnecessarily linking to the ICU libraries. This, in turn, will prevent the need for rebuilding many packages when upgrading ICU to a new major version. After installing libxml2, as the root user, issue:

rm -vf /usr/lib/libxml2.la && sed '/libs=/s/xml2.*/xml2"/' -i /usr/bin/xml2-config

Contents

Installed Directories: /usr/include/libxml2, /usr/lib/cmake/libxml2, /usr/share/doc/libxml2-2.10.4, and /usr/share/gtk-doc/html/libxml2

Short Descriptions

determines the compile and linker flags that should be used to compile and link programs that use libxml2

is used to monitor and manipulate XML and SGML catalogs

parses XML files and outputs reports (based upon options) to detect errors in XML coding

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

Источник

libxml2-2.9.4

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

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

Package Information

  • Download (HTTP): http://xmlsoft.org/sources/libxml2-2.9.4.tar.gz
  • Download (FTP): ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz
  • Download MD5 sum: ae249165c173b1ff386ee8ad676815f5
  • Download size: 5.1 MB
  • Estimated disk space required: 95 MB (additional 20 MB for tests)
  • Estimated build time: 0.6 SBU (additional 0.2 SBU for tests)

Additional Downloads

libxml2 Dependencies

Python-2.7.13 or Python-3.6.0 (to build and install a Python library module, additionally it is required to run the full suite of tests)

[Note]

Note

Some packages which utilize libxml2 (such as GNOME Doc Utils ) need the Python module installed to function properly and some packages will not build properly if the Python module is not available.

Installation of libxml2

Install libxml2 by running the following commands:

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.12.0 is installed and you want to check memory leaks, replace check with check-valgrind .

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.

—with-python=/usr/bin/python3 : Add this switch if you want libxml2 to use Python3 instead of Python2.

Contents

Installed Directories: /usr/include/libxml2, /usr/lib/cmake/libxml2, /usr/share/doc/libxml2-2.9.4, /usr/share/doc/libxml2-python-2.9.4, and /usr/share/gtk-doc/html/libxml2

Short Descriptions

determines the compile and linker flags that should be used to compile and link programs that use libxml2 .

is used to monitor and manipulate XML and SGML catalogs.

parses XML files and outputs reports (based upon options) to detect errors in XML coding.

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

Last updated on 2017-02-14 16:20:11 -0800

Источник

Оцените статью
Adblock
detector