Operating System - Linux
1822732 Members
3806 Online
109644 Solutions
New Discussion юеВ

/usr/lib/libexpat.so: could not read symbols: File in wrong format

 
GnanaShekar
Regular Advisor

/usr/lib/libexpat.so: could not read symbols: File in wrong format

Hi,

I am getting the following error while building apache 2059. Please suggest.

$ more /etc/redhat-release
Red Hat Enterprise Linux Server release 5 (Tikanga)
$ uname -a
Linux lclnx34 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:14 EST 2007 x86_64
$

/tmp/apache/httpd-2.0.59/srclib/apr/libtool --silent --mode=link gcc -g -O2 -pthread -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DAP_HAVE_DESIGNATED_INITIALIZER -I/tmp/apache/httpd-2.0.59/srclib/apr/include -I/tmp/apache/httpd-2.0.59/srclib/apr-util/include -I. -I/tmp/apache/httpd-2.0.59/os/unix -I/tmp/apache/httpd-2.0.59/server/mpm/prefork -I/tmp/apache/httpd-2.0.59/modules/http -I/tmp/apache/httpd-2.0.59/modules/filters -I/tmp/apache/httpd-2.0.59/modules/proxy -I/tmp/apache/httpd-2.0.59/include -I/tmp/apache/httpd-2.0.59/modules/generators -I/tmp/apache/httpd-2.0.59/modules/dav/main -export-dynamic -o htpasswd htpasswd.lo /tmp/apache/httpd-2.0.59/srclib/pcre/libpcre.la /tmp/apache/httpd-2.0.59/srclib/apr-util/libaprutil-0.la -lexpat /tmp/apache/httpd-2.0.59/srclib/apr/libapr-0.la -lrt -lm -lcrypt -lnsl -lpthread -ldl
/usr/lib/libexpat.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[2]: *** [htpasswd] Error 1
make[2]: Leaving directory `/tmp/apache/httpd-2.0.59/support'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/apache/httpd-2.0.59/support'
make: *** [all-recursive] Error 1

Thanks & Regards,

6 REPLIES 6
Emir Faisal
Frequent Advisor

Re: /usr/lib/libexpat.so: could not read symbols: File in wrong format

I would suggest you to run full check on file /usr/lib/libexpat.so. Lots of command can be used for such task, here's some:::
- file: to check file type
- rpm -Va: to check file integrity
- ldd: check library dependancy

Hope it helps.
Everything is possible, if you don't know what you're talking about.
GnanaShekar
Regular Advisor

Re: /usr/lib/libexpat.so: could not read symbols: File in wrong format

Hi,

$ file /usr/lib/libexpat.so
-ksh: hist_flush: EOF seek failed errno=116
/usr/lib/libexpat.so: symbolic link to `../../lib/libexpat.so.0.5.0'

$ file /lib/libexpat.so.0.5.0
/lib/libexpat.so.0.5.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped

$ rpm -Va /lib/libexpat.so.0.5.0

$ ldd /lib/libexpat.so.0.5.0
linux-gate.so.1 => (0xffffe000)
libc.so.6 => /lib/libc.so.6 (0x4564e000)
/lib/ld-linux.so.2 (0x56555000)
$
Emir Faisal
Frequent Advisor

Re: /usr/lib/libexpat.so: could not read symbols: File in wrong format

Hi,
The output for the first command looks weird. Check integrity of the file using rpm -Vv, OR if you had other server with same 'expat' version, compare its md5 signature (hint: md5sum command).

the result should look something like example below. first column should only contains dots.
$ rpm -Vv expat
........ /usr/bin/xmlwf
........ /usr/lib/libexpat.so.0
........ /usr/lib/libexpat.so.0.5.0
........ /usr/share/doc/expat-1.95.7
........ d /usr/share/doc/expat-1.95.7/COPYING
........ d /usr/share/doc/expat-1.95.7/README
........ d /usr/share/man/man1/xmlwf.1.gz
$

hope it helps.
Everything is possible, if you don't know what you're talking about.
GnanaShekar
Regular Advisor

Re: /usr/lib/libexpat.so: could not read symbols: File in wrong format

Hi,

$ rpm -Vv expat
........ /lib64/libexpat.so.0
........ /lib64/libexpat.so.0.5.0
........ /usr/bin/xmlwf
........ /usr/share/doc/expat-1.95.8
........ d /usr/share/doc/expat-1.95.8/COPYING
........ d /usr/share/doc/expat-1.95.8/README
.......T d /usr/share/man/man1/xmlwf.1.gz
........ /lib/libexpat.so.0
........ /lib/libexpat.so.0.5.0
........ /usr/bin/xmlwf
........ /usr/share/doc/expat-1.95.8
........ d /usr/share/doc/expat-1.95.8/COPYING
........ d /usr/share/doc/expat-1.95.8/README
........ d /usr/share/man/man1/xmlwf.1.gz

Emir Faisal
Frequent Advisor

Re: /usr/lib/libexpat.so: could not read symbols: File in wrong format

It's an apache bug.

Probably this will helps:
http://www.weblogs.uhi.ac.uk/sm00ay/?p=196

EF
Everything is possible, if you don't know what you're talking about.
GnanaShekar
Regular Advisor

Re: /usr/lib/libexpat.so: could not read symbols: File in wrong format

Hi,

I donwloaded the latest diff patch from bugzilla. However it seems to give error while applying the patch.

$ patch patching file apu-conf.m4
Hunk #1 FAILED at 46.
Hunk #2 succeeded at 107 with fuzz 2 (offset -17 lines).
1 out of 2 hunks FAILED -- saving rejects to file apu-conf.m4.rej


Please suggest.