Bug #36073 [Wfx]: Source-compiled MySQL on x86_64 causes PHP configure failure

2010-03-25 Thread chris at spawnordie dot com
Edit report at http://bugs.php.net/bug.php?id=36073edit=1

 ID:   36073
 User updated by:  chris at spawnordie dot com
 Reported by:  chris at spawnordie dot com
 Summary:  Source-compiled MySQL on x86_64 causes PHP configure
   failure
 Status:   Wont fix
 Type: Bug
 Package:  Compile Failure
 Operating System: Linux/Any
 PHP Version:  5.1.2

 New Comment:

Other than the bug reviewer just being a flat-out ass...



It is still a bug in PHP.  The PHP configure process honors the
--with-libdir 

value for PostgreSQL and many, many other packages, but NOT for its
check of 

MySQL.  It is NOT a bug in MySQL, which installs its libraries in lib64,
just 

like every other application that is compiled for 64bit OS.  But PHP
somehow 

magically knows how to find all of those other applications.  At the
very 

least, it is an inconsistency that could have been cleaned up with 15
minutes of 

effort by the PHP team when I reported the bug 4 years ago!



And, based on the fact that I provided a work-around, it should have
been clear 

that I did, in fact, know what I was doing.  Maybe my feelings were a
little 

hurt, but there's no excuse for the rudeness this bug reviewer showed. 
I 

sincerely hope that he/she is no longer in that role -- or doing
anything that 

requires using any level of tact with actual people -- because he/she is
just a 

jerk and is in serious need of therapy.  Maybe he/she didn't get hugged
as a 

child and is displaying a superiority complex to cover up low
self-esteem and 

fear of being hurt.  But I digress.


Previous Comments:

[2010-03-25 18:32:22] michael at michaelsnet dot us

IMHO this is a documentation bug.  Consider adding a README.64bit file
containing this information and other relevant information.


[2006-01-18 23:53:50] sni...@php.net

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/bug.php?id=36073edit=1


#36073 [NEW]: Source-compiled MySQL on x86_64 causes PHP configure failure

2006-01-18 Thread chris at spawnordie dot com
From: chris at spawnordie dot com
Operating system: Linux/Any
PHP version:  5.1.2
PHP Bug Type: Compile Failure
Bug description:  Source-compiled MySQL on x86_64 causes PHP configure failure

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 bug report at http://bugs.php.net/?id=36073edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36073r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36073r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36073r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36073r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=36073r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=36073r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=36073r=needscript
Try newer version:http://bugs.php.net/fix.php?id=36073r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=36073r=support
Expected behavior:http://bugs.php.net/fix.php?id=36073r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=36073r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=36073r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36073r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36073r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36073r=dst
IIS Stability:http://bugs.php.net/fix.php?id=36073r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=36073r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36073r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=36073r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=36073r=mysqlcfg


#36073 [Bgs-Opn]: Source-compiled MySQL on x86_64 causes PHP configure failure

2006-01-18 Thread chris at spawnordie dot com
 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=36073edit=1


#34939 [Com]: Undefined reference make failed

2005-10-27 Thread chris at spawnordie dot com
 ID:   34939
 Comment by:   chris at spawnordie dot com
 Reported By:  marcel dot bariou at brasnah dot com
 Status:   Assigned
 Bug Type: PDO related
 Operating System: LINUX RH ES3
 PHP Version:  5.1.0RC3
 Assigned To:  wez
 New Comment:

I got the same result.  Tring to compile with PDO support for mysql
5.0.15 and the 200510271830 PHP snapshot.  Compiles fine without PDO
for MySQL or for PDO for MySQL 4.  It hink this is related to MySQL 5.

Here are the configure options:
./configure \
--with-mysql=/usr/local/mysql5 \
--with-pgsql=/usr/local/pgsql \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-gd \
--with-imap-ssl \
--enable-track-vars \
--enable-url-includes \
--with-ttf \
--enable-magic-quotes \
--with-pcre-regex \
--enable-ftp \
--with-mcrypt \
--enable-freetype-4bit-antialias-hack \
--with-curl \
--with-zlib-dir=/usr \
--with-kerberos \
--with-gettext \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib \
--enable-gd-native-ttf \
--with-freetype-dir=/usr/include/freetype2 \
--with-dom \
--enable-sockets \
--enable-wddx \
--with-xmlrpc \
--with-xsl \
--enable-xslt \
--with-xslt-sablot=/usr/local \
--with-expat-dir \
--with-pdo-mysql=/usr/local/mysql5 \
--with-pdo-pgsql=/usr/local/pgsql \
--enable-soap \
--with-xmlreader

Here are the last few lines of output from make:


sapi_krb5 -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv -lidn
-lssl -lcrypto -lz -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt
-lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lxslt -lxml2 -lz -lm
-lcrypt  -o sapi/cli/php
ext/pdo_mysql/.libs/mysql_driver.o(.text+0xd2f): In function
`pdo_mysql_handle_factory':
/usr/local/src/php5-200510271830/ext/pdo_mysql/mysql_driver.c:438:
undefined reference to `pdo_attr_strval'
ext/pdo_mysql/.libs/mysql_driver.o(.text+0xdab):/usr/local/src/php5-200510271830/ext/pdo_mysql/mysql_driver.c:448:
undefined reference to `pdo_attr_strval'
ext/pdo_mysql/.libs/mysql_driver.o(.text+0xde2):/usr/local/src/php5-200510271830/ext/pdo_mysql/mysql_driver.c:458:
undefined reference to `pdo_attr_strval'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1


Previous Comments:


[2005-10-21 17:44:29] marcel dot bariou at brasnah dot com

Yes, I add enable-pdo=shared (last line of ./configure as you can
see..)



[2005-10-21 16:51:45] [EMAIL PROTECTED]

Did you --enable-pdo ?



[2005-10-21 14:16:01] [EMAIL PROTECTED]

Wez, take a look at it please.




[2005-10-21 06:20:54] marcel dot bariou at brasnah dot com

Description:

I start with this configure directive :

./configure --prefix=/etc/httpd --with-apxs2=/usr/sbin/apxs
--with-config-file-path=/etc/httpd/conf --with-mysql=/usr/local/mysql
--enable-bc-math --enable-calendar --with-curl=/usr --enable-exif
--with-gettext --with-gmp --enable-id3
--with-java=/usr/local/java=/usr/local/j2sdk --with-mcrypt=/usr/local
--with-mhash=/usr/local --enable-overload --enable-pcntl
--with-regex=PHP --enable-soap --enable-sockets --with-tidy=/usr/local
--enable-wddx --with-xsl=/usr/local --enable-xslt --with-xslt-sablot
--with-expat-dir=/usr --enable-php-streams --enable-memory-limit
--enable-cli --enable-posix --enable-pcre --enable-sysvmsg
--enable-sysvsem --enable-sysvshm --enable-shmop --with-pear
--with-xmlrpc --with-zlib=/usr --with-iconv --with-iconv-dir=/usr/local
--with-pdo-mysql=/usr/local/mysql  --enable-pdo=shared




Make message = :
ext/pdo_mysql/.libs/pdo_mysql.o(.text+0x13): In function
`zm_startup_pdo_mysql':
/usr/local/xtra_targz/php5-200510202030/ext/pdo_mysql/pdo_mysql.c:78:
undefined reference to `php_pdo_declare_long_constant'
ext/pdo_mysql/.libs/pdo_mysql.o(.text+0x34): In function
`zm_shutdown_pdo_mysql':
/usr/local/xtra_targz/php5-200510202030/ext/pdo_mysql/pdo_mysql.c:88:
undefined reference to `php_pdo_unregister_driver'
ext/pdo_mysql/.libs/pdo_mysql.o(.text+0x23): In function
`zm_startup_pdo_mysql':
/usr/local/xtra_targz/php5-200510202030/ext/pdo_mysql/pdo_mysql.c:80:
undefined reference to `php_pdo_register_driver'
ext/pdo_mysql/.libs/mysql_driver.o(.text+0x197): In function
`_pdo_mysql_error':
/usr/local/xtra_targz/php5-200510202030/ext/pdo_mysql/mysql_driver.c:100:
undefined reference to `php_pdo_get_exception'
ext/pdo_mysql/.libs/mysql_driver.o(.text+0x378): In function
`mysql_handle_preparer':
/usr/local/xtra_targz/php5-200510202030/ext/pdo_mysql/mysql_driver.c:169:
undefined reference to `pdo_parse_params'
ext/pdo_mysql/.libs/mysql_driver.o(.text+0x57a): In function
`pdo_mysql_last_insert_id':
/usr/local/xtra_targz/php5-200510202030/ext/pdo_mysql/mysql_driver.c:250:
undefined reference to `php_pdo_int64_to_str'
ext/pdo_mysql/.libs/mysql_driver.o(.text+0x84e