Compiling log4cxx on CentOS 5.1 gives error on libdb-4.3 32bit

Support for the other architectures (X86_64, IA-64, and PowerPC)
Post Reply
oncethor
Posts: 2
Joined: 2008/05/25 15:38:49

Compiling log4cxx on CentOS 5.1 gives error on libdb-4.3 32b

Post by oncethor » 2008/05/25 15:58:59

Hello,
I am trying to get apache log4cxx (latest) compiled, but I get the error:

/usr/lib/libdb-4.3.so: could not read symbols: File in wrong format

during linking.
I've tried to modify libtool to try to understand why it takes the libs on /usr/lib and not those in /usr/lib64, but I did not succeed.

Changing the lib in /usr/lib, linking it to the one in /usr/lib64 works, even though there is another library, the expat, which gives the same problem, just after fixing the link on db-4.3.

I've the following db packages installed:

[root@gipserver3 ~]# yum list db4
Loading "installonlyn" plugin
Setting up repositories
extras 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
base 100% |=========================| 1.1 kB 00:00
addons 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
Installed Packages
db4.x86_64 4.3.29-9.fc6 installed
db4.i386 4.3.29-9.fc6 installed


Trying to delete the packages gives these dependencies:

[root@gipserver3 ~]# rpm -e db4.i386
error: Failed dependencies:
libdb-4.3.so is needed by (installed) db4-devel-4.3.29-9.fc6.i386
libdb-4.3.so is needed by (installed) apr-util-1.2.7-6.i386
libdb-4.3.so is needed by (installed) subversion-1.4.2-2.el5.i386
libdb-4.3.so is needed by (installed) pam_ccreds-3-5.i386
libdb-4.3.so is needed by (installed) kdesdk-3.5.4-3.el5.i386
libdb-4.3.so is needed by (installed) evolution-data-server-1.8.0-25.el5.i386
libdb_cxx-4.3.so is needed by (installed) db4-devel-4.3.29-9.fc6.i386
[root@gipserver3 ~]# rpm -e db4.x86_64
error: Failed dependencies:
libdb-4.3.so()(64bit) is needed by (installed) iproute-2.6.18-4.el5.x86_64
libdb-4.3.so()(64bit) is needed by (installed) db4-devel-4.3.29-9.fc6.x86_64
libdb-4.3.so()(64bit) is needed by (installed) python-2.4.3-19.el5.x86_64
libdb-4.3.so()(64bit) is needed by (installed) apr-util-1.2.7-6.x86_64
libdb-4.3.so()(64bit) is needed by (installed) subversion-1.4.2-2.el5.x86_64
libdb-4.3.so()(64bit) is needed by (installed) php-cli-5.1.6-15.el5.x86_64
libdb-4.3.so()(64bit) is needed by (installed) sendmail-8.13.8-2.el5.x86_64
libdb-4.3.so()(64bit) is needed by (installed) webalizer-2.01_10-30.1.x86_64
libdb-4.3.so()(64bit) is needed by (installed) mod_perl-2.0.2-6.3.el5.x86_64
libdb-4.3.so()(64bit) is needed by (installed) pam_ccreds-3-5.x86_64
libdb-4.3.so()(64bit) is needed by (installed) kdesdk-3.5.4-3.el5.x86_64
libdb-4.3.so()(64bit) is needed by (installed) kdevelop-3.3.4-1.fc6.x86_64
libdb-4.3.so()(64bit) is needed by (installed) evolution-data-server-1.8.0-25.el5.x86_64
libdb-4.3.so()(64bit) is needed by (installed) perl-5.8.8-10.el5_0.2.x86_64
libdb-4.3.so()(64bit) is needed by (installed) httpd-2.2.3-11.el5_1.centos.3.x86_64
libdb-4.3.so()(64bit) is needed by (installed) openoffice.org-core-2.0.4-5.4.26.x86_64
libdb_cxx-4.3.so()(64bit) is needed by (installed) db4-devel-4.3.29-9.fc6.x86_64
libdb_cxx-4.3.so()(64bit) is needed by (installed) kdeaddons-3.5.4-1.fc6.x86_64


Any ideas?

-Antonio

oncethor
Posts: 2
Joined: 2008/05/25 15:38:49

Re: Compiling log4cxx on CentOS 5.1 gives error on libdb-4.3 32bit

Post by oncethor » 2008/05/26 19:06:52

Solved, by hacking the libtool.

I was able to build log4cpp at last.
I had to hack the libtool utility.
1) First I renamed the original libtool in /usr/bin
2) redoing the "make" in the main directory does create another libtool, and the compilation goes until the error on the library
3) at this point I hacked the libtool, changing *all* occurrences of /usr/lib/ and /lib/ with a dummy name, like /usr/lib9000 and /lib9000
4) please note that also path like
"/usr/lib9/gcc/x86_64-redhat-linux/4.1.2/../../../"
need to be changed, cause they point to /usr/lib/ anyway!!! Of course paths like:
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../x86_64-redhat-linux/lib/x86_64-redhat-linux/4.1.2/
are ok.
5) re-run make, and now the compiler does not complain any more

-oncethor

Post Reply

Return to “CentOS 5 - X86_64,s390(x) and PowerPC Support”