OAT, StartApache and libexpat
Posted in 2017
A user on Linux Mint 64-bit couldn't start OAT's bundled Apache with IDS 12.10.FC8DE: httpd failed with "libexpat.so.0: cannot open shared object file" (matching APAR IT13310). Respondents suggested checking with ldd/apt-cache and symlinking the distro's libexpat.so.1 to libexpat.so.0. That cleared the first error but exposed a new one, "undefined symbol: pcre_free" (a 32-bit libexpat symlink gave an ELFCLASS32 error). Marcus attributed this to the old Apache 2.4.2 needing legacy PCRE 8.x rather than PCRE2; another poster linked an OAT setup paper. No confirmed fix is recorded in the thread.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Third-Party Tools & Monitoring
Greetings, Family. I have IDS 12.10.FC8DE, that is Developer Edition, on Linux-Mint 64-bit. The instructions for running OAT include running $INFORMIXDIR/OAT/StartApache. But when I do that I get: $ $INFORMIXDIR/OAT/StartApache /var/opt/ifmx/12.10.FC8DE/OAT/Apache_2.4.2/bin/httpd: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory According to the page http://www-01.ibm.com/support/docview.wss?uid=swg21975941, this is apparently a known defect, APAR IT13310. That page also points me to another page of prerequisites for Linux, including a laundry-list of libraries. libexpat.so is not one of them. Any ideas out there? There needs to be *some* way to get that library! Thanks! Jacob S
Hi,
I assume (have not used OAT in MINT), the library reference is different in
this Linux (which is derived from Ubuntu I think).
Ubuntu has a libexpat.so.1 (somewhere unter lib/x86_64-linux-gnu).
Obviously the apache expects to find a libexpat.so.0 somewhere.
(anywhere in the LD_LIBRARY_PATH or where /etc/ld.so.conf finds it)
The easy way to test this is to make a symbolic link
# cd /lib/x86_64-linux-gnu
# ln -s libexpat.so.1 libexpat.so.0
Try again ... (of course the package libexpat1 should be installed)
Hope this helps,
Marcus Haarmann
Von: "JACOB SALOMON" <jakesalomon@yahoo.com>
An: "ids" <ids@iiug.org>
Gesendet: Mittwoch, 10. Mai 2017 01:56:35
Betreff: OAT, StartApache and libexpat [39155]
Greetings, Family.
I have IDS 12.10.FC8DE, that is Developer Edition, on Linux-Mint 64-bit.
The instructions for running OAT include running $INFORMIXDIR/OAT/StartApache.
But when I do that I get:
$ $INFORMIXDIR/OAT/StartApache
/var/opt/ifmx/12.10.FC8DE/OAT/Apache_2.4.2/bin/httpd: error while loading
shared libraries: libexpat.so.0: cannot open shared object file: No such file
or directory
According to the page
http://www-01.ibm.com/support/docview.wss?uid=swg21975941, this is apparently
a known defect, APAR IT13310.
That page also points me to another page of prerequisites for Linux, including
a laundry-list of libraries. libexpat.so is not one of them.
Any ideas out there? There needs to be *some* way to get that library!
Thanks!
Jacob S
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Hi,
I do not know much about Linux-Mint distributions. In you= r place I
would
first check, whether there is already a libexpat shared l= ibrary on
your system.
(Following examples are from my RedHat system and might s= lightly
differ on
your Linux-Mint distribution.)
You can use "ldd" to find out, where exactly the Apache e= xpects the
library:
% ldd ${INFORMIXDIR}/OAT/Apache=5F2.4.2/bin/httpd
...
libexpat.so.0 =3D> /lib64/libexpat.so.0 (0x0000003440800000)
...
%
This tells me, that on my system it expects the library in /lib64 .
This is a default location, so it is found there even without me
havin= g LD=5FLIBRARY=5FPATH
set to /lib64 (among other directories).
Now I can check, whether this library is there:
% ls -l /lib64/libexpat*
lrwxrwxrwx 1 root root &n= bsp; 17 Sep 29 2011 /lib64/libexpat.so.0
-> libexpat.so.0.5.0
-= rwxr-xr-x 1 root root 143144 Jul 28 2010 /lib64/libexpat.so.0.5.0
= %
This tells me, that I do not actually have libexpat.so.0 . But I have
= libexpat.so.0.5.0,
and the symbolic link allows the Apache to use that in place of
libexp= at.so.0.
It is common practice to create such links with the name of an older
v= ersion of a library
to point to a newer version, because the libraries generally are
backw= ards compatible.
So, if you find a newer version of the libexpat shared library on
your= system, then you can
create a symbolic link accordingly. With that you should be OK.
Other common locations for such libraries are for example /lib or
/usr= /lib :
% ls -l /lib/libexpat*
lrwxrwxrwx 1 root root &nbs= p; 17 Sep 29 2011 /lib/libexpat.so.0
-> libexpat.so.0.5.0
-rwxr= -xr-x 1 root root 133184 Jul 28 2010 /lib/libexpat.so.0.5.0
% ls -= l /usr/lib/libexpat*
-rw-r--r-- 1 root root 196826 Jul 28 2010 /us= r/lib/libexpat.a
-rwxr-xr-x 1 root root 706 Jul 28&nbs= p; 2010 /usr/lib/libexpat.la
lrwxrwxrwx 1 root root &nb= sp; 27 Sep 29 2011 /usr/lib/libexpat.so
-> ../../lib/libexpat.so.0= .5.0
%
If you do not find any version of that library on your system, then
yo= u may find all
about it e.g. here: [1]https://en.wikipedia.org/wiki/Expat=5F(library)
Regards, Martin
--
Martin Fuerderer
IBM Informix Development Munich, Germany
Inf= ormation Management
Read about the Informix Warehouse
Accelerator:http://tinyurl.com/the-iwa-blog
IBM Deutschland GmbH
Vorsitzend= er des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Martina Koederit= z (Vorsitzende), Susanne Peter,
Norbert Janzen, Dr. Christian Keller, Iv= o Koerner, Stefan Lutz
Sitz der Gesellschaft: Ehningen
Registergerich= t: Amtsgericht Stuttgart, HRB 14562 WEEE-Reg.-Nr. DE
99369940
&nb= sp;
----- Original message -----
From: "JACOB SALOMON" &l= t;jakesalomon@yahoo.com>
Sent by: ids-bounces@iiug.org
To: ids@iiu= g.org
Cc:
Subject: OAT, StartApache and libexpat [39155]
Date: Wed= , May 10, 2017 1:57 AM
Greetings, Family.
I have IDS 12.10.FC8DE, that is Developer Ed= ition, on Linux-Mint
64-bit.
The instructions for running OAT includ= e running
$INFORMIXDIR/OAT/StartApache.
But when I do that I get:
$ $= INFORMIXDIR/OAT/StartApache
/var/opt/ifmx/12.10.FC8DE/OAT/Apache=5F2.4.2= /bin/httpd: error while
loading
shared libraries: libexpat.so.0: cannot = open shared object file: No
such file
or directory
According to t= he page
[2]http://www-01.ibm.com/support/docview.wss?uid= =3Dswg21975941, this
is apparently
a known defect, APAR IT13310.
=
That page also points me to another page of prerequisites for Linux,
in= cluding
a laundry-list of libraries. libexpat.so is not one of them.
=
Any ideas out there? There needs to be *some* way to get that
library!<= br>
Thanks!
Jacob S
**********************************=
*********************************************
Forum Note: Us= e "Reply" to post a response in the discussion
forum.
References
1. 3D"https://en.wikipedia.org/wiki/Expat=5F(=
2. 3D"http://www-01.ibm.com/support/docview.wss?uid=3Dswg21=
Did you try apt-cache search libexpat =E2=80=94 Clive > On 10 May 2017, at 00:56, JACOB SALOMON <jakesalomon@yahoo.com> wrote: >=20 > Greetings, Family.=20 >=20 > I have IDS 12.10.FC8DE, that is Developer Edition, on Linux-Mint = 64-bit.=20 >=20 > The instructions for running OAT include running = $INFORMIXDIR/OAT/StartApache.=20 > But when I do that I get:=20 > $ $INFORMIXDIR/OAT/StartApache=20 > /var/opt/ifmx/12.10.FC8DE/OAT/Apache_2.4.2/bin/httpd: error while = loading=20 > shared libraries: libexpat.so.0: cannot open shared object file: No = such file=20 > or directory=20 >=20 > According to the page=20 > http://www-01.ibm.com/support/docview.wss?uid=3Dswg21975941, this is = apparently=20 > a known defect, APAR IT13310.=20 >=20 > That page also points me to another page of prerequisites for Linux, = including=20 > a laundry-list of libraries. libexpat.so is not one of them.=20 >=20 > Any ideas out there? There needs to be *some* way to get that library!=20= >=20 > Thanks!=20 >=20 > Jacob S=20 >=20 >=20 > = **************************************************************************= *****=20 > Forum Note: Use "Reply" to post a response in the discussion forum.=20= >=20
As usual, this post is kinda verbose but this way I'm less likely to get
suggestions I've already tried. (Not for the faint of heart.)
Martin and Clive,
I guess you've noticed by now that there are a lot of extraneous characters in
your responses, making it difficult to extract what you are trying to suggest.
Still, I ran this command on all the binaries in directory
$INFORMIXIR/OATApache_2.4.2/bin:
$ ldd $(file *|grep -v ASCII|cut -d: -f1)
Three directories show up in the output:
- $INFORMIXDIR/OAT/Apache_2.4.2/bin
- /lib/x86_64-linux-gnu
- /lib64
I did find libexpat.so.1 in /lib/x86_64-linux-gnu (itself a symlink to
libexpat.so.1.6.0) so I created the symlink libexpat.so.0 -> libexpat.so.1
Now I no longer get the "Cannot open shared object file" error. That's the
good news. The bad news is that I now got this error:
informix:/var/opt/ifmx/12.10.FC8DE/OAT:$ ./StartApache
/var/opt/ifmx/12.10.FC8DE/OAT/Apache_2.4.2/bin/httpd: symbol lookup error:
/var/opt/ifmx/12.10.FC8DE/OAT/Apache_2.4.2/bin/httpd: undefined symbol:
pcre_free
WHOA! That can't be good!
On the other hand, there is another libexpat.so.1 in /lib/i386-linux-gnu. So I
tried reconnecting my new symlink thus:
/lib/x86_64-linux-gnu/libexpat.so.0 -> /lib/i386-linux-gnu/libexpat.so.1
Risky, since that is 32-bit so.
And sure enough, this time I get a worse error:
/var/opt/ifmx/12.10.FC8DE/OAT/Apache_2.4.2/bin/httpd: error while loading
shared libraries: libexpat.so.0: wrong ELF class: ELFCLASS32
Ok, I set it back to the libexpat.so.1 in the X86-64 directory. Better a
missing symbol than the wrong type.
Bottom line: GREAT idea, still unable to run Apache and OAT.
I'm still open to ideas.
I feel IBM has done us a disservice by discontinuing onmonitor to be replaced
by OAT. It cost nothing to leave it in there and, as you can see, setting up
OAT can be quite the gluteal pain, especially if the OS libraries are
installed in a monogluteal manner. (Mama taught me to mind my language. ;-)
I don't know if you are having the exact problem I had with RHEL, but I
found this useful:
http://www.advancedatatools.com/Downloads/Informix_and_OAT_by_TomBeebe_20140211.
pdf
On 5/10/2017 3:16 PM, JACOB SALOMON wrote:
> As usual, this post is kinda verbose but this way I'm less likely to get
> suggestions I've already tried. (Not for the faint of heart.)
>
> Martin and Clive,
>
> I guess you've noticed by now that there are a lot of extraneous characters
in
> your responses, making it difficult to extract what you are trying to
suggest.
> Still, I ran this command on all the binaries in directory
> $INFORMIXIR/OATApache_2.4.2/bin:
>
> $ ldd $(file *|grep -v ASCII|cut -d: -f1)>
> Three directories show up in the output:
> - $INFORMIXDIR/OAT/Apache_2.4.2/bin
> - /lib/x86_64-linux-gnu
> - /lib64
>
> I did find libexpat.so.1 in /lib/x86_64-linux-gnu (itself a symlink to
> libexpat.so.1.6.0) so I created the symlink libexpat.so.0 -> libexpat.so.1
>
> Now I no longer get the "Cannot open shared object file" error. That's the
> good news. The bad news is that I now got this error:
>
> informix:/var/opt/ifmx/12.10.FC8DE/OAT:$ ./StartApache
> /var/opt/ifmx/12.10.FC8DE/OAT/Apache_2.4.2/bin/httpd: symbol lookup error:
> /var/opt/ifmx/12.10.FC8DE/OAT/Apache_2.4.2/bin/httpd: undefined symbol:
> pcre_free
>
> WHOA! That can't be good!
>
> On the other hand, there is another libexpat.so.1 in /lib/i386-linux-gnu. So
I
> tried reconnecting my new symlink thus:
>
> /lib/x86_64-linux-gnu/libexpat.so.0 -> /lib/i386-linux-gnu/libexpat.so.1
>
> Risky, since that is 32-bit so.
> And sure enough, this time I get a worse error:
> /var/opt/ifmx/12.10.FC8DE/OAT/Apache_2.4.2/bin/httpd: error while loading
> shared libraries: libexpat.so.0: wrong ELF class: ELFCLASS32
>
> Ok, I set it back to the libexpat.so.1 in the X86-64 directory. Better a
> missing symbol than the wrong type.
>
> Bottom line: GREAT idea, still unable to run Apache and OAT.
>
> I'm still open to ideas.
>
> I feel IBM has done us a disservice by discontinuing onmonitor to be replaced
> by OAT. It cost nothing to leave it in there and, as you can see, setting up
> OAT can be quite the gluteal pain, especially if the OS libraries are
> installed in a monogluteal manner. (Mama taught me to mind my language. ;-)
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
Hi,
well apache 2.4.2 is somewhat outdated, IBM should work on that issue.
But: apache is build against an version of pcre (regular expressions), not
pcre2.
The older versions (8.xx) should be used for apache. I would guess you have a
newer version
installed, which leads to the error message.
See:
https://serverfault.com/questions/741467/util-pcre-c104-undefined-reference-to-p
cre-free-while-compiling-apache-httpd
https://lists.gt.net/apache/bugs/443555
https://unix.stackexchange.com/questions/342172/apache-2-4-25-make-failed-due-to
-pcre-cannot-find-pcre-h
Marcus Haarmann
Von: "JACOB SALOMON" <jakesalomon@yahoo.com>
An: "ids" <ids@iiug.org>
Gesendet: Mittwoch, 10. Mai 2017 21:16:32
Betreff: Re: OAT, StartApache and libexpat [39165]
As usual, this post is kinda verbose but this way I'm less likely to get
suggestions I've already tried. (Not for the faint of heart.)
Martin and Clive,
I guess you've noticed by now that there are a lot of extraneous characters in
your responses, making it difficult to extract what you are trying to suggest.
Still, I ran this command on all the binaries in directory
$INFORMIXIR/OATApache_2.4.2/bin:
$ ldd $(file *|grep -v ASCII|cut -d: -f1)
Three directories show up in the output:
- $INFORMIXDIR/OAT/Apache_2.4.2/bin
- /lib/x86_64-linux-gnu
- /lib64
I did find libexpat.so.1 in /lib/x86_64-linux-gnu (itself a symlink to
libexpat.so.1.6.0) so I created the symlink libexpat.so.0 -> libexpat.so.1
Now I no longer get the "Cannot open shared object file" error. That's the
good news. The bad news is that I now got this error:
informix:/var/opt/ifmx/12.10.FC8DE/OAT:$ ./StartApache
/var/opt/ifmx/12.10.FC8DE/OAT/Apache_2.4.2/bin/httpd: symbol lookup error:
/var/opt/ifmx/12.10.FC8DE/OAT/Apache_2.4.2/bin/httpd: undefined symbol:
pcre_free
WHOA! That can't be good!
On the other hand, there is another libexpat.so.1 in /lib/i386-linux-gnu. So I
tried reconnecting my new symlink thus:
/lib/x86_64-linux-gnu/libexpat.so.0 -> /lib/i386-linux-gnu/libexpat.so.1
Risky, since that is 32-bit so.
And sure enough, this time I get a worse error:
/var/opt/ifmx/12.10.FC8DE/OAT/Apache_2.4.2/bin/httpd: error while loading
shared libraries: libexpat.so.0: wrong ELF class: ELFCLASS32
Ok, I set it back to the libexpat.so.1 in the X86-64 directory. Better a
missing symbol than the wrong type.
Bottom line: GREAT idea, still unable to run Apache and OAT.
I'm still open to ideas.
I feel IBM has done us a disservice by discontinuing onmonitor to be replaced
by OAT. It cost nothing to leave it in there and, as you can see, setting up
OAT can be quite the gluteal pain, especially if the OS libraries are
installed in a monogluteal manner. (Mama taught me to mind my language. ;-)
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.