Bug #48618 Unclear errors while running configure for mysql proxy 0.7.2
Submitted: 9 Nov 2009 1:59 Modified: 13 Jan 2010 18:10
Reporter: Roel Van de Paar (OCA) Email Updates:
Status: QA testing Impact on me:
None 
Category:MySQL Proxy: Install/Config Severity:S3 (Non-critical)
Version:0.7.2 OS:Linux (Ubuntu 9.0.4)
Assigned to: Jan Kneschke CPU Architecture:Any
Triage: Needs Triage: D4 (Minor)

[9 Nov 2009 1:59] Roel Van de Paar
Description:
roel@roel-ubuntu-vm:/proxy/mysql-proxy-0.7.2$ ./configure
[...]
checking for MySQL support... yes
checking for mysql_config... no
configure: error: mysql_config is not found

How to repeat:
Attempt to run configure for mysql-proxy 0.7.2 on Ubuntu 9.0.4

Installed packages on the system: libqt4-sql-mysql, mysql-common, libmysqlclient15off (there's many installations of mysql on this system, but not as installed packages)

-----

Some searching gave:

--with-mysql[=PATH]  
  Include MySQL support. PATH is the path to 'mysql_config'

and in ./configure:

--------
if test \! -x $MYSQL_CONFIG; then
  { { $as_echo "$as_me:$LINENO: error: mysql_config not exists or not executable, use $ ./configure --with-mysql=/path/to/mysql_config" >&5
$as_echo "$as_me: error: mysql_config not exists or not executable, use $ ./configure --with-mysql=/path/to/mysql_config" >&2;}
   { (exit 1); exit 1; }; }
fi
--------

etc.

Suggested fix:
Do not give an error, or report better on the --with-mysql[=PATH] option.
[9 Nov 2009 3:05] Roel Van de Paar
Getting it to work:

roel@roel-ubuntu-vm:/proxy$ cat ./configure-proxy 
cd /proxy/mysql-proxy-0.7.2/
./configure --with-mysql=/proxy/mysql-5.1.40-proxied/bin/

roel@roel-ubuntu-vm:/proxy$ ./configure-proxy 
[...]
checking for MySQL support... yes
configure: error: mysql_config not exists or not executable, use $ ./configure --with-mysql=/path/to/mysql_config

roel@roel-ubuntu-vm:/proxy$ ls -l /proxy/mysql-5.1.40-proxied/bin/mysql_config 
-rwx------ 1 roel roel 6146 2009-10-07 08:20 /proxy/mysql-5.1.40-proxied/bin/mysql_config

-------

roel@roel-ubuntu-vm:/proxy$ cat ./configure-proxy 
cd /proxy/mysql-proxy-0.7.2/
./configure --with-mysql=/proxy/mysql-5.1.40-proxied/bin/mysql_config

roel@roel-ubuntu-vm:/proxy$ ./configure-proxy 
[...]
checking for MySQL support... yes
checking for MySQL includes at... -I/proxy/mysql-5.1.40-proxied/include

-------

So, besides making the first error clearer, it would be good to make the second error clearer. How about:

configure: error: mysql_config not exists or not executable, use $ ./configure --with-mysql=/path_to_your_mysql_installation/bin/mysql_config/

Instead?
[10 Nov 2009 3:29] Roel Van de Paar
Verifying as D4
[25 Nov 2009 16:03] Enterprise Tools JIRA Robot
Jan Kneschke writes: 
revno: 914
committer: jan@mysql.com
branch nick: trunk
timestamp: Wed 2009-11-25 17:01:34 +0100
message:
  added a hint for --with-mysql (fixes #48618)
[13 Jan 2010 18:10] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch available in build.