ID:               29619
 User updated by:  helge at eco-logic-software dot de
 Reported By:      helge at eco-logic-software dot de
 Status:           Bogus
 Bug Type:         Compile Failure
 Operating System: Linux (SuSE 8.1)
 PHP Version:      5.0.0
 New Comment:

It was somewhat clear to me that this isn't a real bug in  
PHP but I think in the ./configure script which could give  
a little more hints or at least provide a link to somewhat  
of a FAQ where problems like these are focused. I didn't  
tried to compile MySQL on my own because on the MySQL  
download page they warn you to do it although I have done  
that already on my private machines. All I want is  
a ./configure script which is a little more verbose  
because I couldn't find the error after more than 11 hours  
of testing+googleing :-/ Will try to compile MySQL on my  
own this night.


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

[2004-08-11 20:35:13] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

MySQL links against OpenSSL 0.96 while PHP links against 0.97. So it
cannot work. It\'s a known issue to the way out is to compile the mysql
libs on your own. Doing that you probably end up in the same problem as
i did. I cannot compile shared mysql libs so that i can only use 1 of
the three extensions that link against MySQL (mysql, mysqlI,
pdo_mysql).

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

[2004-08-11 19:20:02] helge at eco-logic-software dot de

Description:
------------
When trying to configure PHP 5 for compilation under SuSE Linux 8.1
(old system because it's a production server) and enabling MySQLi
support I get this:

checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... no
checking for mysql_set_server_option in -lmysqlclient... no
configure: error: wrong mysql library version or lib not found. Check
config.log for more information.

The message seems clear but the problem is that in the given directory
the MySQL 4.1.3 libraries exist (and only there - I used the RPM-devel
from the official homepage). config.log ends with:

configure:54782: checking for MySQLi support
configure:54828: checking whether to enable embedded MySQLi support
configure:54961: checking for mysql_set_server_option in -lmysqlclient
configure:54980: gcc -o conftest -g -O2  -Wl,-rpath,/usr/lib/mysql
-L/usr/lib/mysql  -lmysqlclient -lz -lcrypt -lnsl -lm -lnss_files
-lnss_dns -lresolv -lnss_files -lnss_dns -lresolv conftest.c -L/usr/lib
-lmysqlclient  -lldap -llber -lcrypt -lpam -lfreetype -lpng -lz -ljpeg
-lbz2 -lz -lssl -lcrypto -lresolv -lm -ldl -lnsl  1>&5
/usr/lib/gcc-lib/i486-suse-linux/3.2/../../../../i486-suse-linux/bin/ld:
cannot find -lnss_files
collect2: ld returned 1 exit status
configure: failed program was:
#line 54969 "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_set_server_option();

int main() {
mysql_set_server_option()
; return 0; }

I already tried to apply the patch given in #29329 but that didn't work
either. I also tried changing the paths and so on but that only resulted
in the same error. The libraries are the right ones as the "normal"
mysql support compiles just fine and phpinfo() gives me "MySQL client
library: 4.1.3-beta". So normal MySQL support is working just fine with
the libraries but MySQLi support is not. Why, what am I doing wrong?

Reproduce code:
---------------
PHP 5.0.0 source from php.net

./configure --with-openssl --with-zlib --enable-bcmath --with-bz2
--enable-calender --enable-exif --enable-ftp --with-gd
--with-png-dir=/usr --with-jpeg-dir=/usr --with-zlib-dir=/usr
--with-ttf=/usr --with-freetype-dir --enable-gd-native-ttf
--with-gettext --with-iconv --with-imap --with-ldap=/usr
--enable-mbstring --with-mime-magic --enable-sockets
--enable-sqlite-utf8 --with-iconv-dir --with-xsl
--with-apxs2=/usr/local/apache2/bin/apxs --disable-libxml
--with-mysql=/usr/lib/mysql --with-mysql-sock=/var/lib/mysql/mysql.sock
--with-mysqli=/usr/bin/mysql_config

(libxml2 is disabled because I can't upgrade to a newer version right
now because of the old glibc in 8.1 - but that shouldn't matter ...
or?)

Expected result:
----------------
./configure should finish successfully - as well as the make
afterwards, of course ;-)

Actual result:
--------------
./configure aborts due to the missing MySQL libraries which are
defenitively there.


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


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

Reply via email to