Hi Zabbix team,
Note: post updated to also include the Net-SNMP compilation problem.
Zabbix 1.3.6 (rev 4081) compiles and works correctly on a 32 bits Linux with MySQL and Net-SNMP (tested on Debian Etch), but the configure phase stops with an error on a 64 bits Linux (tested with Fedora Core 5 64 bits).
The faulty patch is the revision 4054 of files "m4/ax_lib_mysql.m4" and "m4/netsnmp.m4". I haven't fully analyzed and understood this patch, but one thing is obvious: if --enable-static is not provided, the piece of code that sets MYSQL_LDFLAGS and MYSQL_LIBS is not executed
This revision works seamlessly on a 32 bits linux, but on an 64 bits Linux somes library paths must absolutely be set, and the bug is triggered. The obvious patch is to remove the "if" that tests for "enable-static" in "m4/ax_lib_mysql.m4".
Here is a tested patch, it compiles on Debian 32 bits and FC5 64 bits.
Regards.
Note: post updated to also include the Net-SNMP compilation problem.
Zabbix 1.3.6 (rev 4081) compiles and works correctly on a 32 bits Linux with MySQL and Net-SNMP (tested on Debian Etch), but the configure phase stops with an error on a 64 bits Linux (tested with Fedora Core 5 64 bits).
The faulty patch is the revision 4054 of files "m4/ax_lib_mysql.m4" and "m4/netsnmp.m4". I haven't fully analyzed and understood this patch, but one thing is obvious: if --enable-static is not provided, the piece of code that sets MYSQL_LDFLAGS and MYSQL_LIBS is not executed
This revision works seamlessly on a 32 bits linux, but on an 64 bits Linux somes library paths must absolutely be set, and the bug is triggered. The obvious patch is to remove the "if" that tests for "enable-static" in "m4/ax_lib_mysql.m4".
Here is a tested patch, it compiles on Debian 32 bits and FC5 64 bits.
Code:
Index: m4/ax_lib_mysql.m4
===================================================================
--- m4/ax_lib_mysql.m4 (révision 4081)
+++ m4/ax_lib_mysql.m4 (copie de travail)
@@ -84,7 +84,6 @@
MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`"
- if test "x$enable_static" = "xyes"; then
_full_libmysql_libs="`$MYSQL_CONFIG --libs`"
for i in $_full_libmysql_libs; do
@@ -100,7 +99,6 @@
;;
esac
done
- fi
_save_mysql_libs="${LIBS}"
_save_mysql_ldflags="${LDFLAGS}"
Index: m4/netsnmp.m4
===================================================================
--- m4/netsnmp.m4 (révision 4081)
+++ m4/netsnmp.m4 (copie de travail)
@@ -67,22 +67,19 @@
esac
done
- if test "x$enable_static" = "xyes"; then
- _full_libnetsnmp_libs="`$_libnetsnmp_config --libs` -lcrypto"
+ _full_libnetsnmp_libs="`$_libnetsnmp_config --libs` -lcrypto"
+ for i in $_full_libnetsnmp_libs; do
+ case $i in
+ -lnetsnmp)
+ ;;
+ -l*)
+ _lib_name="`echo "$i" | cut -b3-`"
+ SNMP_LIBS="$SNMP_LIBS $i"
- for i in $_full_libnetsnmp_libs; do
- case $i in
- -lnetsnmp)
- ;;
- -l*)
- _lib_name="`echo "$i" | cut -b3-`"
- SNMP_LIBS="$SNMP_LIBS $i"
+ ;;
+ esac
+ done
- ;;
- esac
- done
- fi
-
_save_netsnmp_libs="${LIBS}"
_save_netsnmp_ldflags="${LDFLAGS}"
_save_netsnmp_cflags="${CFLAGS}"
I reposted the patch in a correct form (file attachement) in the "Zabbix patches" forum:
Comment