Re: Trying to load MySQL libraries from wrong location, configure failing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



If you read the bug reports you will see that this is a fresh MySQL install from the package available at mysql.org and I have been able to reproduce this error on multiple systems with multiple versions of MySQL.

If I make symlinks everything works as it should so that tells me there are hard references lingering somewhere.

-J

 --
Juan A. Pons
juan@xxxxxxxx

On Sep 1, 2007, at 5:34 PM, BuildSmart <buildsmart@xxxxxxxxxxxxxxxxxx> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Sep 1, 2007, at 16:05:49, Juan A. Pons wrote:

Geoffrey,

As John rightly pointed out, I ran into the same or similar issue. I battled it out a bit with the PHP people but frankly their attitude just bothers me.

In any case I voted for your bug and I saw that you referenced my bug, so maybe they will take this issue more seriously.

I did come up with a workaround by using symlinks

cd /usr/local/mysql/lib
ln -s /usr/local/mysql/lib ./mysql
cd /usr/local/mysql/include
ln -s /usr/local/mysql/include ./mysql

This will make your build compile and work correctly, however it is not an optimal solution, what needs to happen is that the hard references to /usr/local/mysql/lib/mysql need to be removed.

That is incorrect thinking and the reference is not hard.

The only time I see the symlink trick and people having finding and binding issues in OSX is that mysql isn't built/installed properly in the first place.

The solution is to have ext/mysql/config.m4 to check in both locations (which it already does), after examining the file I see the following:
 for i in $PHP_LIBDIR $PHP_LIBDIR/mysql; do
   MYSQL_LIB_CHK($i)
 done

PHP_LIBDIR is defined as "lib" and this tells me that something else is going on if it can't find the libraries in your installation and the check for the header files looks in both locations as well.

This means the bug you are trying to report is in fact bogus, I have MySQL-5.0.24 installed in /usr/local/mysql/ and I don't have any finding or binding issues.

Oh, one more thing, you can link against the client libraries from 4.1.13 (in /usr/lib/mysql) and experience no ill effects or lack of functionality when used with your 5.0.x mysql server.


-J

---
Juan A. Pons
juan@xxxxxxxx



On Sep 1, 2007, at 3:56 PM, Geoffrey Sneddon wrote:


On 1 Sep 2007, at 18:49, John N wrote:

Hello,

On 9/1/07, Geoffrey Sneddon <geoffers@xxxxxxxxx> wrote:
As can be seen from the debug.log, PHP attempts to read from /usr/
local/mysql/lib/mysql, which doesn't exist. It should be looking in /
usr/local/mysql/lib. I'm running Mac OS 10.4.10/x86, with nothing
else interesting about my setup. Everything worked up to PHP 5.2.3 on
this.

It's here been discussed with Juan, and he has reported a Php bug,

 http://bugs.php.net/bug.php?id=42464

The Php developers appear to be in disagreement :-/ You may wish to
add your voice & experiences there.

As it's marked as bogus, I cannot comment on that bug. I have opened another (#42515).

It is bogus, the issue is not with the PHP source but with the mysql.org binary if it's having an issue locating or linking to the libraries.

There are also issues with the mysql shared libraries and twolevel_namespace which causes linking issues, one of the reasons that apple builds them as static in flat_namespace is to overcome these issues.

I found the mysql.org binaries to be useless myself, I build my own as needed (as universal binaries) in the ADE (if you don't know don't ask) and I have had zero issues with any software requiring the client libraries, of course my build is environment compliant, the mysql.org binaries are not.



One may notice that when building from source MySql on OSX, the
locations are correctly,

 /usr/local/mysql/lib/mysql
 /usr/local/mysql/include/mysql

I'm reluctant to do, as the normal tarball doesn't have the patches for XNU's threading (the default ones lead to terrible performance).

Find a source version that has been patched for XNU threading, generate a diff to find the specific OSX changes and apply these to the mysql source of choice you want to utilize.


-g.

- -- Dale

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)

iD8DBQFG2drj0hzWbkf0eKgRAkNhAJ95NnNlduKHiIkFJeQvP75jP/8XpQCfYbTc
WmQot0cgbyEGPF2/wOlKPBU=
=hRoX
-----END PGP SIGNATURE-----


[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux