Please help for error ( file <libxml/parser.h> is required for XML support )

Started by Sachin Khannaover 5 years ago7 messages
#1Sachin Khanna
Sachin_Khanna@infosys.com

Hi

I am new to postgreSQL , I am trying to install the same with XML support but it is giving below error on configuration.

./configure --prefix=/opt/postgresql-12.3/pqsql --with-libxml --datadir=/home/postgres/ --with-includes=/usr/lib64/

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

I am using below RHEL flavor and have installed below xml package for support

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

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
License : MIT
Signature : RSA/SHA256, Tue 26 Nov 2019 08:05:06 AM CST, Key ID 199e2f91fd431d51
Source RPM : libxml2-2.9.1-6.el7.4.src.rpm
Build Date : Tue 26 Nov 2019 07:21:34 AM CST
Build Host : ppc-029.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla&gt;
Vendor : Red Hat, Inc.
URL : http://xmlsoft.org/
Summary : Library providing XML and HTML support
Description :
This library allows to manipulate XML files. It includes support
to read, modify and write XML and HTML files. There is DTDs support
this includes parsing and validation even with complex DtDs, either
at parse time or later once the document has been modified. The output
can be a simple SAX stream or and in-memory DOM like representations.
In this case one can use the built-in XPath and XPointer implementation
to select sub nodes or ranges. A flexible Input/Output mechanism is
available, with existing HTTP and FTP modules and combined to an
URI library.

ls -ltr /usr/lib64/ | grep -i xml
-rwxr-xr-x. 1 root root 68528 May 19 2015 libxmlrpc_util.so.3.32
-rwxr-xr-x. 1 root root 136488 May 19 2015 libxmlrpc.so.3.32
-rwxr-xr-x. 1 root root 68488 May 19 2015 libxmlrpc_server.so.3.32
-rwxr-xr-x. 1 root root 68336 May 19 2015 libxmlrpc_server_cgi.so.3.32
-rwxr-xr-x. 1 root root 68416 May 19 2015 libxmlrpc_server_abyss.so.3.32
-rwxr-xr-x. 1 root root 69720 May 19 2015 libxmlrpc_client.so.3.32
-rwxr-xr-x. 1 root root 138240 May 19 2015 libxmlrpc_abyss.so.3.32
-rwxr-xr-x. 1 root root 2271136 Nov 26 2019 libxml2.so.2.9.1
-rwxr-xr-x. 1 root root 403952 Dec 6 2019 libQtXml.so.4.8.7
-rwxr-xr-x. 1 root root 5621696 Dec 6 2019 libQtXmlPatterns.so.4.8.7
-rwxr-xr-x. 1 root root 336816 Feb 19 2020 libQt5Xml.so.5.9.7
lrwxrwxrwx. 1 root root 16 Jul 9 14:55 libxml2.so.2 -> libxml2.so.2.9.1
lrwxrwxrwx. 1 root root 17 Jul 9 14:55 libxmlrpc.so.3 -> libxmlrpc.so.3.32
lrwxrwxrwx. 1 root root 23 Jul 9 14:55 libxmlrpc_abyss.so.3 -> libxmlrpc_abyss.so.3.32
lrwxrwxrwx. 1 root root 22 Jul 9 14:55 libxmlrpc_util.so.3 -> libxmlrpc_util.so.3.32
lrwxrwxrwx. 1 root root 24 Jul 9 14:55 libxmlrpc_server.so.3 -> libxmlrpc_server.so.3.32
lrwxrwxrwx. 1 root root 28 Jul 9 14:55 libxmlrpc_server_cgi.so.3 -> libxmlrpc_server_cgi.so.3.32
lrwxrwxrwx. 1 root root 30 Jul 9 14:55 libxmlrpc_server_abyss.so.3 -> libxmlrpc_server_abyss.so.3.32
lrwxrwxrwx. 1 root root 24 Jul 9 14:56 libxmlrpc_client.so.3 -> libxmlrpc_client.so.3.32
lrwxrwxrwx. 1 root root 18 Jul 9 14:56 libQt5Xml.so.5.9 -> libQt5Xml.so.5.9.7
lrwxrwxrwx. 1 root root 18 Jul 9 14:56 libQt5Xml.so.5 -> libQt5Xml.so.5.9.7
lrwxrwxrwx. 1 root root 17 Jul 21 15:51 libQtXml.so.4.8 -> libQtXml.so.4.8.7
lrwxrwxrwx. 1 root root 17 Jul 21 15:51 libQtXml.so.4 -> libQtXml.so.4.8.7
lrwxrwxrwx. 1 root root 25 Jul 21 15:51 libQtXmlPatterns.so.4.8 -> libQtXmlPatterns.so.4.8.7
lrwxrwxrwx. 1 root root 25 Jul 21 15:51 libQtXmlPatterns.so.4 -> libQtXmlPatterns.so.4.8.7
lrwxrwxrwx. 1 root root 27 Aug 27 02:52 libxml2.so -> /usr/lib64/libxml2.so.2.9.1

Thanks and Regards,
SACHIN KHANNA
212 BASIS DBA TEAM OFFSHORE
Office : 204058624
Cell : 9049522511
Email: sachin.khanna@sysco.com<mailto:sachin.khanna@sysco.com>
Infosys Technologies Limited (r) | PUNE

#2Ranier Vilela
ranier.vf@gmail.com
In reply to: Sachin Khanna (#1)
re: Please help for error ( file <libxml/parser.h> is required for XML support )

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

sudo yum install libxml2-devel

You need to install the development package before ./configure.

regards,
Ranier Vilela

#3Ashutosh Sharma
ashu.coek88@gmail.com
In reply to: Sachin Khanna (#1)
Re: Please help for error ( file <libxml/parser.h> is required for XML support )

On Thu, Aug 27, 2020 at 6:30 PM Sachin Khanna <Sachin_Khanna@infosys.com> wrote:

Hi

I am new to postgreSQL , I am trying to install the same with XML support but it is giving below error on configuration.

./configure --prefix=/opt/postgresql-12.3/pqsql --with-libxml --datadir=/home/postgres/ --with-includes=/usr/lib64/

It seems like your include path is pointing to "/usr/lib64/" which
basically contains the libraries and not the header files, I guess. To
include libraries you should be using --with-libraries option.

Also, I feel that these types of questions are not for hackers
mailing-list. These are configuration related issues and should
probably be raised in pgsql-general mailing list
(pgsql-general.postgresql.org).

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

#4Sachin Khanna
Sachin_Khanna@infosys.com
In reply to: Ranier Vilela (#2)
RE: Please help for error ( file <libxml/parser.h> is required for XML support )

Package libxml2-devel-2.9.1-6.el7.4.ppc64le is already installed.

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

From: Ranier Vilela <ranier.vf@gmail.com>
Sent: Thursday, August 27, 2020 6:46 PM
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Sachin Khanna <Sachin_Khanna@infosys.com>
Subject: re: Please help for error ( file <libxml/parser.h> is required for XML support )

[**EXTERNAL EMAIL**]

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

sudo yum install libxml2-devel

You need to install the development package before ./configure.

regards,
Ranier Vilela

#5Sachin Khanna
Sachin_Khanna@infosys.com
In reply to: Sachin Khanna (#4)
1 attachment(s)
RE: Please help for error ( file <libxml/parser.h> is required for XML support )

Now I can see the that libraries are identified in config.log . I also found some error in configuration file as well. Highlight below.
Please find the attached config.log file for reference.
Please help and let me know if I there is any issue in configuration script and I need to change it ?

I am using PostgreSQL version postgresql-12.3.tar.gz

configure:8291: checking for XML2_CONFIG
configure:8293: result: /usr/lib64/libxml2.so
configure:8416: checking for grep that handles long lines and -e
configure:8474: result: /bin/grep
configure:8479: checking for egrep
configure:8541: result: /bin/grep -E
configure:8588: checking for ld used by GCC
configure:8651: result: /bin/ld
configure:8658: checking if the linker (/bin/ld) is GNU ld
GNU ld version 2.27-44.base.el7

at-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -D_GNU_SOURCE conftest.c >&5
conftest.c: In function 'main':
conftest.c:76:20: error: expected expression before ')' token
if (sizeof ((_Bool)))
^
configure:12910: $? = 1
configure: failed program was:
| /* confdefs.h */

at-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -D_GNU_SOURCE conftest.c >&5
conftest.c:75:20: fatal error: atomic.h: No such file or directory
#include <atomic.h>
^
compilation terminated.

| #include <libxml/parser.h>
configure:13266: result: no
configure:13266: checking libxml/parser.h presence
configure:13266: gcc -std=gnu99 -E -D_GNU_SOURCE conftest.c
conftest.c:63:27: fatal error: libxml/parser.h: No such file or directory
#include <libxml/parser.h>
^
compilation terminated.

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

From: Sachin Khanna
Sent: Friday, August 28, 2020 12:14 PM
To: 'Ranier Vilela' <ranier.vf@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: RE: Please help for error ( file <libxml/parser.h> is required for XML support )

Package libxml2-devel-2.9.1-6.el7.4.ppc64le is already installed.

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

From: Ranier Vilela <ranier.vf@gmail.com<mailto:ranier.vf@gmail.com>>
Sent: Thursday, August 27, 2020 6:46 PM
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org<mailto:pgsql-hackers@lists.postgresql.org>>
Cc: Sachin Khanna <Sachin_Khanna@infosys.com<mailto:Sachin_Khanna@infosys.com>>
Subject: re: Please help for error ( file <libxml/parser.h> is required for XML support )

[**EXTERNAL EMAIL**]

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

sudo yum install libxml2-devel

You need to install the development package before ./configure.

regards,
Ranier Vilela

Attachments:

config.logapplication/octet-stream; name=config.logDownload
#6Ranier Vilela
ranier.vf@gmail.com
In reply to: Sachin Khanna (#5)
Re: Please help for error ( file <libxml/parser.h> is required for XML support )

Em sex., 28 de ago. de 2020 às 04:37, Sachin Khanna <
Sachin_Khanna@infosys.com> escreveu:

Now I can see the that libraries are identified in config.log . I also
found some error in configuration file as well. Highlight below.

Please find the attached config.log file for reference.

Please help and let me know if I there is any issue in configuration
script and I need to change it ?

I am using PostgreSQL version postgresql-12.3.tar.gz

configure:8291: checking for XML2_CONFIG

configure:8293: result: /usr/lib64/libxml2.so

configure:8416: checking for grep that handles long lines and -e

configure:8474: result: /bin/grep

configure:8479: checking for egrep

configure:8541: result: /bin/grep -E

configure:8588: checking for ld used by GCC

configure:8651: result: /bin/ld

configure:8658: checking if the linker (/bin/ld) is GNU ld

GNU ld version 2.27-44.base.el7

at-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2
-D_GNU_SOURCE conftest.c >&5

conftest.c: In function 'main':

*conftest.c:76:20: error: expected expression before ')' token*

*if (sizeof ((_Bool)))*

* ^*

*configure:12910: $? = 1*

*configure: failed program was:*

*| /* confdefs.h */*

What version of gcc is being used in this environment?

regards,
Ranier Vilela

#7Ranier Vilela
ranier.vf@gmail.com
In reply to: Ranier Vilela (#6)
Re: Please help for error ( file <libxml/parser.h> is required for XML support )

em sex., 28 de ago. de 2020 às 11:05, Ranier Vilela <ranier.vf@gmail.com>
escreveu:

Em sex., 28 de ago. de 2020 às 04:37, Sachin Khanna <
Sachin_Khanna@infosys.com> escreveu:

Now I can see the that libraries are identified in config.log . I also
found some error in configuration file as well. Highlight below.

Please find the attached config.log file for reference.

Please help and let me know if I there is any issue in configuration
script and I need to change it ?

I am using PostgreSQL version postgresql-12.3.tar.gz

configure:8291: checking for XML2_CONFIG

configure:8293: result: /usr/lib64/libxml2.so

configure:8416: checking for grep that handles long lines and -e

configure:8474: result: /bin/grep

configure:8479: checking for egrep

configure:8541: result: /bin/grep -E

configure:8588: checking for ld used by GCC

configure:8651: result: /bin/ld

configure:8658: checking if the linker (/bin/ld) is GNU ld

GNU ld version 2.27-44.base.el7

at-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2
-D_GNU_SOURCE conftest.c >&5

conftest.c: In function 'main':

*conftest.c:76:20: error: expected expression before ')' token*

*if (sizeof ((_Bool)))*

* ^*

*configure:12910: $? = 1*

*configure: failed program was:*

*| /* confdefs.h */*

What version of gcc is being used in this environment?

It seems gcc does not compile C99, without -std=c99
configure:4421: checking for gcc option to accept ISO C99
conftest.c:130:3: note: use option -std=c99 or -std=gnu99 to compile your
code

try add -std=c99
./configure -std=c99

regards,
Ranier Vilela