Friday, April 3, 2009

Zabbix & libcurl on x86_64 platform

While building Zabbix 1.6.3 from source on CentOS 5 on x86_64 architecture, I ran into a very strange issue. The following configure line kept giving me errors about libcurl not found.

./configure --prefix=/opt/zabbix --enable-server --with-mysql --with-net-snmp --with-jabber --with-libcurl --enable-agent --disable-ipv6 --with-ldap --with-openipmi
...
...
checking for the version of libcurl... 7.15.5
checking for libcurl >= version 7.13.1... yes
checking for main in -lcurl... no
configure: error: Not found libcurl library


I checked to make sure I had curl and curl-devel installed and sure enough I did. Not only did I have curl - 7.15.5-2.1.el5_3.4.x86_64 & curl-devel - 7.15.5-2.1.el5_3.4.x86_64, but I also had the i386 version.

It took me a long time to figure out that mixing i386 and x86_64 packages is not a good idea. To resolve the issue, I went back and uninstall every i386 package I had installed, many of which were pulled in as dependencies. The problem started when I started to install package without specifying the architecture. For example, instead of running "yum install package", try "yum install package.x86_64". Following are the list of i386 rpms I had to manually remove and install the x86_64 version of them.

[root@crash ~]# cat /var/log/yum.log | grep "Apr 02" | grep i386
Apr 02 20:33:27 Updated: e2fsprogs-libs - 1.39-20.el5.i386
Apr 02 20:33:48 Updated: libselinux - 1.33.4-5.1.el5.i386
Apr 02 20:33:55 Updated: krb5-libs - 1.6.1-31.el5.i386
Apr 02 20:34:05 Installed: mysql - 5.0.45-7.el5.i386
Apr 02 20:34:10 Installed: e2fsprogs-devel - 1.39-20.el5.i386
Apr 02 20:34:13 Installed: libsepol-devel - 1.15.2-1.el5.i386
Apr 02 20:34:15 Installed: libselinux-devel - 1.33.4-5.1.el5.i386
Apr 02 20:34:18 Installed: keyutils-libs-devel - 1.2-1.el5.i386
Apr 02 20:34:22 Installed: krb5-devel - 1.6.1-31.el5.i386
Apr 02 20:34:29 Installed: zlib-devel - 1.2.3-3.i386
Apr 02 20:34:43 Installed: openssl-devel - 0.9.8e-7.el5.i386
Apr 02 20:34:50 Installed: mysql-devel - 5.0.45-7.el5.i386
Apr 02 20:36:17 Updated: elfutils-libelf - 0.137-3.el5.i386
Apr 02 20:36:23 Updated: popt - 1.10.2.3-9.el5.i386
Apr 02 20:36:25 Updated: net-snmp-libs - 1:5.3.2.2-5.el5.i386
Apr 02 20:36:45 Updated: rpm-libs - 4.4.2.3-9.el5.i386
Apr 02 20:37:17 Installed: net-snmp-devel - 1:5.3.2.2-5.el5.i386
Apr 02 20:37:54 Installed: gnutls - 1.4.1-3.el5_2.1.i386
Apr 02 20:42:02 Updated: libgcc - 4.1.2-44.el5.i386
Apr 02 20:43:49 Installed: libidn - 0.6.5-1.1.i386
Apr 02 20:43:51 Installed: curl - 7.15.5-2.1.el5_3.4.i386
Apr 02 20:43:54 Installed: cyrus-sasl-lib - 2.1.22-4.i386
Apr 02 20:43:57 Installed: openldap - 2.3.43-3.el5.i386
Apr 02 20:44:01 Installed: cyrus-sasl-devel - 2.1.22-4.i386
Apr 02 20:44:06 Installed: glib2 - 2.12.3-4.el5_3.1.i386
Apr 02 20:44:08 Installed: gdbm - 1.8.0-26.2.1.i386
Apr 02 20:44:22 Installed: OpenIPMI-libs - 2.0.6-11.el5.i386
Apr 02 20:44:29 Installed: openldap-devel - 2.3.43-3.el5.i386
Apr 02 20:44:35 Installed: curl-devel - 7.15.5-2.1.el5_3.4.i386
Apr 02 20:44:42 Installed: OpenIPMI-devel - 2.0.6-11.el5.i386


After fixing the packages, I ran "make clean" and then ran the ./configure line again for a successful compile.

Bottom line, don't mix x86_64 and i386 packages, unless you absolutely have to.

Cheers,
VVK

No comments:

Post a Comment