ID:               36073
 User updated by:  chris at spawnordie dot com
 Reported By:      chris at spawnordie dot com
-Status:           Bogus
+Status:           Open
 Bug Type:         Compile Failure
 Operating System: Linux/Any
 PHP Version:      5.1.2
 New Comment:

You don't need to be rude:
"Don't try building Mysql yourself if you don't know how to do it
properly."

I have been doing this for many years and know how to do it extremely
well.  Don't assume that your bug reporters are all idiots before you
look into it.

I view this as a PHP bug because the PHP configure process looks in the
"lib" directory for other items on an x86_64 system.  For example, I
built PostgreSQL from source and used this configure flag in PHP:
--with-pgsql=/usr/local/pgsql
This worked despite the fact that there is no /usr/local/pgsql/lib64 -
which means that their is an inconsistency in the directories into
which the PHP configure process is willing to look between MySQL and
PostgreSQL.  If it were consistent in PHP, I would look at it as a
MySQL bug.  Since PHP will look into the "lib" directory for other
tools, I can only assume that those responsible for maintaining the
MySQL configure/build process in PHP forgot to include a similar check.
 It's a simple check to add.

The fact that I solved the problem and provided enough detail on how to
do so for others should have given you a small clue to the fact that I
do, in fact, know what I am doing.

Responses like you provided are one of the reasons people are reluctant
to provide bug reports.

Please leave this bug report open to see if the configure scripts can't
be changed to look into "lib" as well as the defined libdir for MySQL
the same as it does for other libraries.

If you want or need for me to spend 30 minutes tracking down where the
change needs to be made and exactly what needs to change, I would be
happy to do so over this weekend.  My hunch is that the maintainer of
the MySQL code in the PHP configure scripts can locate it in less than
a couple of minutes.

Thanks.


Previous Comments:
------------------------------------------------------------------------

[2006-01-18 23:53:50] [EMAIL PROTECTED]

Works fine for me.
Hint: Don't try building Mysql yourself if you don't know how to do it
properly. Use the binary packages provided by MySQL.
And last but not least: report this to MySQL. It's not our fault if
they do things wrong.

------------------------------------------------------------------------

[2006-01-18 22:14:10] chris at spawnordie dot com

Description:
------------
Please accept my apologies if this is already reported - I searched and
didn't find it.

When configuring PHP for x86_64, it is necessary to use:
--with-libdir=lib64

When you compile MySQL from source, it does not place its files in
lib64, but rather lib.

MySQL was configured using:
--prefix=/usr/local/mysql

Configuring PHP using:
--with-mysql=/usr/local/mysql
fails with this:
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
configure: error: Cannot find libmysqlclient under /usr/local/mysql.
Note that the MySQL client library is not bundled anymore!

This fixes the problem:
cd /usr/local/mysql
ln -s lib lib64

When PHP is configured using --with-mysql=<mysql_dir> and
--with-libdir=<lib_dir>, it should search <mysql_dir>/<lib_dir> and
then <mysql_dir>/lib

Reproduce code:
---------------
./configure --with-mysql=<path/to/mysql> when MySQL is compiled from
source code

Expected result:
----------------
successful configure

Actual result:
--------------
configure fails with:
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
configure: error: Cannot find libmysqlclient under /usr/local/mysql.
Note that the MySQL client library is not bundled anymore!



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=36073&edit=1

Reply via email to