Help needed configuring postgreSQL with xml support

Started by Khanna, Sachin 000over 5 years ago4 messages
#1Khanna, Sachin 000
Sachin.Khanna@sysco.com

I am getting following error in configuration.log of installation . Please help

Is there any pkg-config path that needs to be configured/set in environment for this to work.

configure:8172: checking for libxml-2.0 >= 2.6.23
configure:8179: $PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23"
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml-2.0' found
configure:8182: $? = 1
configure:8196: $PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23"
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml-2.0' found
configure:8199: $? = 1
configure:8213: result: no
No package 'libxml-2.0' found

I later tried setting the some environment variables like

export XML2_CFLAGS='/usr/lib64/'
export XML2_CONFIG='/usr/lib64/'
export XML2_LIBS='/usr/lib64/libxml2

Created soft link as well libxml2.so -> /usr/lib64/libxml2.so.2.9.1 but now I getting the below error .

configure: error: header file <libxml/parser.h> is required for XML support

From config.log

configure:13266: checking libxml/parser.h usability
configure:13266: gcc -std=gnu99 -c -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -D_GNU_SOURCE conftest.c >&5
conftest.c:96:27: fatal error: libxml/parser.h: No such file or directory
#include <libxml/parser.h>
^
compilation terminated.
configure:13266: $? = 1
configure: failed program was:

Thanks and Regards,
SACHIN KHANNA
212 Basis Offshore DBA
Office : 204058624
Cell : 9049522511
Email: khanna.sachin@corp.sysco.com<mailto:khanna.sachin@corp.sysco.com>

ITIL V3 (F), AWS Certified Solution Archtect
Infosys Technologies Limited (r) | PUNE

#2Thomas Munro
thomas.munro@gmail.com
In reply to: Khanna, Sachin 000 (#1)
Re: Help needed configuring postgreSQL with xml support

On Thu, Aug 27, 2020 at 8:17 PM Khanna, Sachin 000
<Sachin.Khanna@sysco.com> wrote:

I am getting following error in configuration.log of installation . Please help

You didn't mention what operating system this is, but, for example, if
it's Debian, Ubuntu or similar you might need to install libxml2-dev
and pkg-config for --with-libxml to work.

#3Ashutosh Sharma
ashu.coek88@gmail.com
In reply to: Thomas Munro (#2)
Re: Help needed configuring postgreSQL with xml support

In addition to what Thomas said, I would also recommend you to refer
to the description of --with-libxml command line option provided in
the postgres installation-procedure page - [1]https://www.postgresql.org/docs/12/install-procedure.html.

[1]: https://www.postgresql.org/docs/12/install-procedure.html

--
With Regards,
Ashutosh Sharma
EnterpriseDB:http://www.enterprisedb.com

Show quoted text

On Thu, Aug 27, 2020 at 1:56 PM Thomas Munro <thomas.munro@gmail.com> wrote:

On Thu, Aug 27, 2020 at 8:17 PM Khanna, Sachin 000
<Sachin.Khanna@sysco.com> wrote:

I am getting following error in configuration.log of installation . Please help

You didn't mention what operating system this is, but, for example, if
it's Debian, Ubuntu or similar you might need to install libxml2-dev
and pkg-config for --with-libxml to work.

#4Sachin Khanna
Sachin_Khanna@infosys.com
In reply to: Ashutosh Sharma (#3)
RE: Help needed configuring postgreSQL with xml support

Thanks for the quick response. I am using RED HAT linux ( ppc64-le ).

Operating System: Red Hat Enterprise Linux Server 7.9 Beta (Maipo)
CPE OS Name: cpe:/o:redhat:enterprise_linux:7.9:beta:server
Kernel: Linux 3.10.0-1136.el7.ppc64le
Architecture: ppc64-le
You have new mail in /var/spool/mail/root

I have gone into the details given for xml support and have installed the required rpm and tried to setup the env variables as well like

export XML2_CFLAGS='/usr/lib64/'
export XML2_CONFIG='/usr/lib64/'
export XML2_LIBS='/usr/lib64/libxml2.so.2.9.1'

rpm -qi libxml2-2.9.1-6.el7.4.ppc64le
Name : libxml2
Version : 2.9.1
Release : 6.el7.4
Architecture: ppc64le
Install Date: Thu 09 Jul 2020 02:55:33 PM CDT
Group : Development/Libraries
Size : 2594518

yum list installed |grep xml
libxml2.ppc64le 2.9.1-6.el7.4 @anaconda/7.9
libxml2-python.ppc64le 2.9.1-6.el7.4 @anaconda/7.9
python-lxml.ppc64le 3.2.1-4.el7 @anaconda/7.9
xml-common.noarch 0.6.3-39.el7 @anaconda/7.9
xml2.ppc64le 0.5-7.el7 @epel
xmlrpc-c.ppc64le 1.32.5-1905.svn2451.el7 @anaconda/7.9
xmlrpc-c-client.ppc64le 1.32.5-1905.svn2451.el7 @anaconda/7.9

--with-libxml
Build with libxml2, enabling SQL/XML support. Libxml2 version 2.6.23 or later is required for this feature.

To detect the required compiler and linker options, PostgreSQL will query pkg-config, if that is installed and knows about libxml2. Otherwise the program xml2-config, which is installed by libxml2, will be used if it is found. Use of pkg-config is preferred, because it can deal with multi-architecture installations better.

To use a libxml2 installation that is in an unusual location, you can set pkg-config-related environment variables (see its documentation), or set the environment variable XML2_CONFIG to point to the xml2-config program belonging to the libxml2 installation, or set the variables XML2_CFLAGS and XML2_LIBS. (If pkg-config is installed, then to override its idea of where libxml2 is you must either set XML2_CONFIG or set both XML2_CFLAGS and XML2_LIBS to nonempty strings.)

Thanks and Regards,
SACHIN KHANNA
212 BASIS DBA TEAM OFFSHORE
Office : 204058624
Cell : 9049522511

-----Original Message-----
From: Ashutosh Sharma <ashu.coek88@gmail.com>
Sent: Thursday, August 27, 2020 2:12 PM
To: Khanna, Sachin 000 <Sachin.Khanna@sysco.com>
Cc: pgsql-hackers@postgresql.org; Thomas Munro <thomas.munro@gmail.com>
Subject: Re: Help needed configuring postgreSQL with xml support

EXTERNAL EMAIL: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe

In addition to what Thomas said, I would also recommend you to refer to the description of --with-libxml command line option provided in the postgres installation-procedure page - [1]https://urldefense.proofpoint.com/v2/url?u=https-3A__www.postgresql.org_docs_12_install-2Dprocedure.html&amp;d=DwIBaQ&amp;c=Iej4I5bEYPmgv5l2sS6i8A&amp;r=RbbcFo0QGVsZI41vIxHdvJHDEomAuf-kGUMMC7Yn2sE&amp;m=D5QMYkp-FOKiI-htZxXqsxkhULT3OKhPaZbElnB9CWY&amp;s=oDlVjDkRb48Sqx0fUgv6hoehucADn74yxrut4uiL50E&amp;e=.

[1]: https://urldefense.proofpoint.com/v2/url?u=https-3A__www.postgresql.org_docs_12_install-2Dprocedure.html&amp;d=DwIBaQ&amp;c=Iej4I5bEYPmgv5l2sS6i8A&amp;r=RbbcFo0QGVsZI41vIxHdvJHDEomAuf-kGUMMC7Yn2sE&amp;m=D5QMYkp-FOKiI-htZxXqsxkhULT3OKhPaZbElnB9CWY&amp;s=oDlVjDkRb48Sqx0fUgv6hoehucADn74yxrut4uiL50E&amp;e=

--
With Regards,
Ashutosh Sharma
EnterpriseDB:https://urldefense.proofpoint.com/v2/url?u=http-3A__www.enterprisedb.com&amp;d=DwIBaQ&amp;c=Iej4I5bEYPmgv5l2sS6i8A&amp;r=RbbcFo0QGVsZI41vIxHdvJHDEomAuf-kGUMMC7Yn2sE&amp;m=D5QMYkp-FOKiI-htZxXqsxkhULT3OKhPaZbElnB9CWY&amp;s=vhT8MXXxy_b8UWkK9HhFKfoRwA8BRWxLEk0s0QcCk_I&amp;e=

Show quoted text

On Thu, Aug 27, 2020 at 1:56 PM Thomas Munro <thomas.munro@gmail.com> wrote:

On Thu, Aug 27, 2020 at 8:17 PM Khanna, Sachin 000
<Sachin.Khanna@sysco.com> wrote:

I am getting following error in configuration.log of installation .
Please help

You didn't mention what operating system this is, but, for example, if
it's Debian, Ubuntu or similar you might need to install libxml2-dev
and pkg-config for --with-libxml to work.