|
List Info
Thread: ulogd 1.24 mysql bad identification
|
|
| ulogd 1.24 mysql bad identification |
  France |
2007-07-22 18:43:15 |
Hi list,
trying to build ulogd-1.24, ./configure give me a warning,
leading to a bad identification in the mysql :
....
checking for MySQL files... found mysql_config in /usr/bin
checking for mysql_real_escape_string support... strings:
invalid option -- L
Usage: strings [option(s)] [file(s)]
Display printable strings in [file(s)] (stdin by default)
The options are:
-a - --all Scan the entire file, not just
the data section
-f --print-file-name Print the name of the file
before each string
-n --bytes=[number] Locate & print any
NUL-terminated sequence of at
-<number> least [number] characters
(default 4).
-t --radix={o,d,x} Print the location of the string
in base 8, 10 or 16
-o An alias for --radix=o
-T --target=<BFDNAME> Specify the binary file
format
-e --encoding={s,S,b,l,B,L} Select character size and
endianness:
s = 7-bit, S = 8-bit, {b,l} =
16-bit, {B,L} = 32-bit
-h --help Display this information
-v --version Print the program's version
number
strings: supported targets: elf32-i386 a.out-i386-linux
efi-app-ia32 elf32-little elf32-big srec symbolsrec tekhex
binary ihex trad-core
found old MySQL
.....
after some digging in the lists archives, it looks like
ulogd 1.x support looks nearly "abandoned" ...
As I, and certainly some more people are, am
"stucked" with kernel 2.4.x, working on a live-cd
firewall distro(devil-linux), I tried to fix the
problem by myself; As I'm not developper and a "bad
bash scripting guy", the patch may not be optimal but
it solves the issue, at least for me :
....
checking for MySQL files... found mysql_config in /usr/bin
checking for mysql_real_escape_string support... found new
MySQL
creating ./config.status
....
So, as it may help some folks around, I send it on this
mailling-list ...
--- ulogd-1.24/configure.old 2007-07-22
17:24:37.000000000 -0500
+++ ulogd-1.24/configure 2007-07-22
17:18:17.000000000 -0500
 -1728,7
+1728,7 
EOF
MYSQLINCLUDES=`$d/mysql_config --include`
- MYSQLLIBS=`$d/mysql_config --libs`
+ MYSQLLIBS=`$d/mysql_config --libs | awk '{ print $1
}' | cut -c3-`
DATABASE_DIR="$ mysql"
Thank you all for the fantastic job done,
Best Regards,
MaNU ESCaR
|
|
| Re: ulogd 1.24 mysql bad identification |
  Germany |
2007-07-23 03:01:37 |
On Jul 23 2007 01:43, eescar free.fr wrote:
>checking for MySQL files... found mysql_config in
/usr/bin
>checking for mysql_real_escape_string support...
strings: invalid option -- L
>Usage: strings [option(s)] [file(s)]
> Display printable strings in [file(s)] (stdin by
default)
>
>So, as it may help some folks around, I send it on this
mailling-list ...
No, the configure script is fundamentally broken.
MYSQLLIBS=`$d/mysql_config --libs`
...
MYSQL_FUNCTION_TEST=`strings
$/libmysqlclient.so |
grep mysql_real_escape_string
Which is really wrong, because `mysql_config --libs`
returns
*linker flags*, not a directory. A better fix is to replace
it
with
AC_SEARCH_LIBS(mysql_real_escape_string, mysqlclient_r
mysqlclient,
[
AC_MSG_NOTICE([found old MySQL])
EXTRA_MYSQL_DEF="-DOLD_MYSQL=1"
],
[
AC_MSG_NOTICE([found new MySQL])
])
(untested)
Jan
--
|
|
| Re: ulogd 1.24 mysql bad identification |
  France |
2007-07-23 06:12:31 |
Hi,
Jan Engelhardt a écrit :
> On Jul 23 2007 01:43, eescar free.fr wrote:
>
>
>> checking for MySQL files... found mysql_config in
/usr/bin
>> checking for mysql_real_escape_string support...
strings: invalid option -- L
>> Usage: strings [option(s)] [file(s)]
>> Display printable strings in [file(s)] (stdin by
default)
>>
>> So, as it may help some folks around, I send it on
this mailling-list ...
>>
>
> No, the configure script is fundamentally broken.
>
> MYSQLLIBS=`$d/mysql_config --libs`
>
> ...
>
> MYSQL_FUNCTION_TEST=`strings
$/libmysqlclient.so |
> grep mysql_real_escape_string
>
> Which is really wrong, because `mysql_config --libs`
returns
> *linker flags*, not a directory. A better fix is to
replace it
> with
>
> AC_SEARCH_LIBS(mysql_real_escape_string, mysqlclient_r
mysqlclient,
> [
> AC_MSG_NOTICE([found old MySQL])
> EXTRA_MYSQL_DEF="-DOLD_MYSQL=1"
> ],
> [
> AC_MSG_NOTICE([found new MySQL])
> ])
>
> (untested)
>
>
>
> Jan
>
tested it :
....
checking for strerror... (cached) yes
./configure: line 1762: syntax error near unexpected token
`mysql_real_escape_string,'
./configure: line 1762:
`AC_SEARCH_LIBS(mysql_real_escape_string,
mysqlclient_r mysqlclient,'
So as I don't understand your things (don't know if
AC_SEARCH_LIBS is a
predefined function somewhere...) as I am not any kind of
developper,
only a poor little wanabe hacker, I continue my way as I
understand that
by modifying the content of MYSQLLIBS, I may break some
other things
(really stupid !), I now use MYSQLLIBSDIR to store the
directory;
so maybe this is more correct :
--- ulogd-1.24/configure 2006-01-25
12:15:22.000000000 +0100
+++ ulogd-1.24.new/configure 2007-07-23
13:00:26.000000000 +0200
 -1729,6
+1729,7 
MYSQLINCLUDES=`$d/mysql_config --include`
MYSQLLIBS=`$d/mysql_config --libs`
+ MYSQLLIBSDIR=`$d/mysql_config --libs | awk '{ print
$1 }' | cut
-c3-`
DATABASE_DIR="$ mysql"
 -1747,7
+1748,7 
echo $ac_n "checking for
mysql_real_escape_string support""...
$ac_c" 1>&6
echo "configure:1749: checking for
mysql_real_escape_string support" >&5
- MYSQL_FUNCTION_TEST=`strings
$/libmysqlclient.so |
grep mysql_real_escape_string`
+ MYSQL_FUNCTION_TEST=`strings
$/libmysqlclient.so |
grep mysql_real_escape_string`
if test "x$MYSQL_FUNCTION_TEST" = x
then
Tested it on two hosts with different locations for
libmysqlclient.so
and it give the good path in both case.
Best Regards,
MaNU
|
|
| Re: ulogd 1.24 mysql bad identification |
  Germany |
2007-07-23 10:10:39 |
Index: ulogd-1.24/configure.in
============================================================
=======
--- ulogd-1.24.orig/configure.in
+++ ulogd-1.24/configure.in
 -60,7
+60,6  then
else
AC_DEFINE(HAVE_MYSQL)
MYSQLINCLUDES=`$d/mysql_config --include`
- MYSQLLIBS=`$d/mysql_config --libs`
DATABASE_DIR="$ mysql"
 -83,15
+82,8  else
AC_MSG_CHECKING(for mysql_real_escape_string support)
- MYSQL_FUNCTION_TEST=`strings
$/libmysqlclient.so | grep
mysql_real_escape_string`
-
- if test "x$MYSQL_FUNCTION_TEST" = x
- then
- EXTRA_MYSQL_DEF="-DOLD_MYSQL=1 "
- AC_MSG_RESULT(found old MySQL)
- else
- AC_MSG_RESULT(found new MySQL)
- fi
+ AC_SEARCH_LIBS(mysql_real_escape_string, mysqlclient_r
mysqlclient,
+ [EXTRA_MYSQL_DEF="-DOLD_MYSQL=1"])
fi
])
|
|
[1-4]
|
|