On Thu, Nov 20, 2003, Alan DeKok wrote:
> Bug reports are nice. Lack of notification is stupid.
I'm running into a problem building 0.9.3 with MySQL support on FreeBSD 4.8
and on SuSE 9.0 Professional Linux.
The problem is that the test for libmysqlclient fails with an undefined
reference to compress and uncompress. It appears that the configure.in
file should have $old_LIBS after the -lmysqlclient to pick up the -lz
that's found earlier in configure. On FreeBSD this build was not able to
find the ``floor'' function in the math libraries until I added ``-lm'' to
LIBS before starting the build.
Looking at the src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.in file,
I would think that $mysql_lib_dir should be at the beginning of the list of
directories to check rather than the end. The mysql configuration succeeds
with the attached patch.
Bill
--
INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Systems, Inc.
UUCP: camco!bill PO Box 820; 6641 E. Mercer Way
FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/
If you think health care is expensive now, wait until you see what it coses
when it's free -- P.J. O'Rourke
diff -uNr
/csoft/RPM/TMP/freeradius-0.9.3.orig/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure
./src/modules/rlm_sql/drivers/rlm_sql_mysql/configure
---
/csoft/RPM/TMP/freeradius-0.9.3.orig/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure
2003-09-04 11:14:18.000000000 -0400
+++ ./src/modules/rlm_sql/drivers/rlm_sql_mysql/configure 2003-11-26
16:10:33.000000000 -0500
@@ -978,8 +978,8 @@
old_LIBS="$LIBS"
- for try in /usr/lib /usr/lib/mysql /usr/local/lib/mysql
/usr/local/mysql/lib/mysql $mysql_lib_dir; do
- LIBS="$old_LIBS -L$try -lmysqlclient"
+ for try in $mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql
/usr/local/mysql/lib/mysql; do
+ LIBS="$old_LIBS -L$try -lmysqlclient $old_LIBS"
cat > conftest.$ac_ext <<EOF
#line 985 "configure"
#include "confdefs.h"
@@ -990,7 +990,7 @@
EOF
if { (eval echo configure:992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s
conftest${ac_exeext}; then
rm -rf conftest*
- MYSQL_LIBS="-L$try -lmysqlclient"
+ MYSQL_LIBS="-L$try -lmysqlclient $old_LIBS"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
diff -uNr
/csoft/RPM/TMP/freeradius-0.9.3.orig/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.in
./src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.in
---
/csoft/RPM/TMP/freeradius-0.9.3.orig/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.in
2001-07-11 16:38:09.000000000 -0400
+++ ./src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.in 2003-11-26
16:10:55.000000000 -0500
@@ -70,10 +70,10 @@
dnl AC_LOCATE_DIR(mysql_lib_dir,[libmysqlclient.so])
dnl AC_LOCATE_DIR(mysql_lib_dir,[libmysqlclient.a])
- for try in /usr/lib /usr/lib/mysql /usr/local/lib/mysql
/usr/local/mysql/lib/mysql $mysql_lib_dir; do
- LIBS="$old_LIBS -L$try -lmysqlclient"
+ for try in $mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql
/usr/local/mysql/lib/mysql; do
+ LIBS="$old_LIBS -L$try -lmysqlclient $old_LIBS"
AC_TRY_LINK([extern char mysql_init();], [mysql_init()],
- MYSQL_LIBS="-L$try -lmysqlclient",
+ MYSQL_LIBS="-L$try -lmysqlclient $old_LIBS",
MYSQL_LIBS=
)
if test "x$MYSQL_LIBS" != "x"; then