ID: 42926
Updated by: [EMAIL PROTECTED]
Reported By: mamfelt at acm dot org
Status: Open
Bug Type: MySQL related
Operating System: AIX 5.3 TL06
PHP Version: 5.2.4
New Comment:
Seems more like you're trying to outsmart both PHP and Mysql here.
Why don't you just install the mysql libs like they should be installed
and forget those hacks with symlinks?
Previous Comments:
------------------------------------------------------------------------
[2007-10-11 12:09:28] mamfelt at acm dot org
Description:
------------
On a fresh install of AIX 5.3 at TL 06-03 I am trying to configure
php5.
I was not expecting it to work perfectly on the first pass, because I
am also using the IBM compiler as part of the test, rather than gcc.
System: AIX 5.3, Power4, 64-bit mode, jfs2 filesystems
Compiler: xlC/C++ 7 with latest patches from July 2007
The first problem I run into is that configure wants the file:
xml2-config. I tried loading the AIX Toolbox package for libxml2, but
this package does not include the file xml2-config.
This problem I could resolve by downloading the source package
(libxml2-2.6.30), running config, make, and make install.
The next problem involved finding the mysql include and lib files. I
have the 64-bit version of mysql loaded:
[EMAIL PROTECTED]:[/usr/local]ls -l mysql
lrwxrwxrwx 1 root system 52 Oct 09 22:28 mysql ->
/data/home/michael/mysql-5.0.45-aix5.2-powerpc-64bit
The mysql distributions have a standard layout. The include/lib files
are located at: /usr/local/mysql/include and /usr/local/mysql/lib
These two errors were resolved my adding two symbolic links:
[EMAIL PROTECTED]:[/usr/local/include]ls -l
total 160
drwxr-xr-x 3 root system 256 Oct 09 22:31 libxml2
lrwxrwxrwx 1 root system 16 Oct 09 22:42 mysql ->
../mysql/include
-rw-r--r-- 1 root system 9544 Oct 11 12:54 zconf.h
-rw-r--r-- 1 root system 66188 Oct 11 12:54 zlib.h
[EMAIL PROTECTED]:[/usr/local/lib]ls -l
total 10384
-rwxr-xr-x 1 root system 5200148 Oct 09 22:31 libxml2.a
-rwxr-xr-x 1 root system 785 Oct 09 22:31 libxml2.la
-rwxr-xr-x 1 root system 103558 Oct 11 12:54 libz.a
lrwxrwxrwx 1 root system 12 Oct 09 22:54 mysql ->
../mysql/lib
drwxr-xr-x 2 root system 256 Oct 09 22:31 pkgconfig
-rw-r--r-- 1 root system 225 Oct 09 22:31 xml2Conf.sh
The final errors that I could not resolve regard the search for some
mysql functions:
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... /tmp/mysql.sock
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for
more information.
[EMAIL PROTECTED]:[/home/michael/prj/php-5.2.4]tail config.log
#line 59860 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mysql_error();
int main() {
mysql_error()
; return 0; }
The library is found, but as it is 64-bit, the routines are not found.
Even with AIX I must specify -X64 to see the contents....
[EMAIL PROTECTED]:[/usr/local/lib/mysql]ls
libdbug.a libmysqlclient_r.so
libmysql.imp libmysqlclient_r.so.15
libmysqlclient.a libmysqlclient_r.so.15.0.0
libmysqlclient.so libmystrings.a
libmysqlclient.so.15 libmysys.a
libmysqlclient.so.15.0.0 libz.a
libmysqlclient_r.a
[EMAIL PROTECTED]:[/usr/local/lib/mysql]ar -t libmysqlclient.a
[EMAIL PROTECTED]:[/usr/local/lib/mysql]ar -X64 -t libmysqlclient.a | head
-5
libmysql.o
password.o
manager.o
get_password.o
errmsg.o
My assumption is that php is not supporting 64-bit builds. I'll put a
32-bit mysql in place (as it is only a symbolic link I need to change)
and continue. If php is linking functions into the client a 32-bit build
should not be a problem. However, if it is loading the mysqlclient
library dynamically, swictching to a 64-bit rte is likely to break php.
p.s. I also downloaded and built the zlib-1.2.3 package. Having it
installed was not enough, I still had to provide the source directory.
Reproduce code:
---------------
./configure --with-mysql --with-zlib-dir=/data/prj/zlib.1.2.3
Expected result:
----------------
That I could run make.
Actual result:
--------------
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... /tmp/mysql.sock
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for
more information.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42926&edit=1