All of lore.kernel.org
 help / color / mirror / Atom feed
From: "eescar@free.fr" <eescar@free.fr>
To: netfilter-devel@lists.netfilter.org
Subject: Re: [PATCH] ulogd 1.24 mysql bad identification
Date: Mon, 23 Jul 2007 13:12:31 +0200	[thread overview]
Message-ID: <46A48D1F.4060601@free.fr> (raw)
In-Reply-To: <Pine.LNX.4.64.0707230952530.32367@fbirervta.pbzchgretzou.qr>

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 ${MYSQLLIBS}/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="${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 ${MYSQLLIBS}/libmysqlclient.so |
grep mysql_real_escape_string`
+       MYSQL_FUNCTION_TEST=`strings ${MYSQLLIBSDIR}/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

  reply	other threads:[~2007-07-23 11:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-22 23:43 [PATCH] ulogd 1.24 mysql bad identification eescar
2007-07-23  8:01 ` Jan Engelhardt
2007-07-23 11:12   ` eescar [this message]
2007-07-23 15:10     ` Jan Engelhardt
2007-07-26 13:19       ` Pablo Neira Ayuso
  -- strict thread matches above, loose matches on Subject: below --
2007-07-22 22:57 MaNU ESCaR

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46A48D1F.4060601@free.fr \
    --to=eescar@free.fr \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.