php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41803 Linking MySQLi fails during ./configure
Submitted: 2007-06-25 17:27 UTC Modified: 2007-06-26 15:09 UTC
From: seth at pricepages dot org Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5CVS-2007-06-25 (snap) OS: Mac 10.4.9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: seth at pricepages dot org
New email:
PHP Version: OS:

 

 [2007-06-25 17:27 UTC] seth at pricepages dot org
Description:
------------
The test program compiled by configure links to a non-existant mysqli 
library (and fails to be run). See the following debug.log:
CONFIGURE:   './configure' '--with-mysqli=/usr/local/mysql/bin/
mysql_config'
CC:         gcc
CFLAGS:     -I/usr/local/include -g -O2
CPPFLAGS:    -no-cpp-precomp
CXX:        
CXXFLAGS:   
INCLUDES:    -I/usr/include/libxml2 -I/usr/local/php/
php5.2-200706251630/ext/date/lib -I/usr/local/mysql/include
LDFLAGS:    -liconv -L/usr/local/lib  -L/usr/local/lib -L/usr/local/
lib -L/usr/local/mysql/lib -L/usr/local/mysql/lib
LIBS:       -liconv -lm  -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm 
-lmysqlclient -lz -lm -lxml2 -lz -liconv -lm
DLIBS:      
SAPI:       cgi
PHP_RPATHS:  /usr/local/lib /usr/local/mysql/lib
uname -a:   Darwin Pine06.local 8.10.0 Darwin Kernel Version 8.10.0: 
Wed May 23 16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC Power 
Macintosh powerpc

gcc -o conftest -I/usr/local/include -g -O2  -no-cpp-precomp -liconv -
L/usr/local/lib  -L/usr/local/lib -L/usr/local/lib -L/usr/local/mysql/
lib -L/usr/local/mysql/lib conftest.c -liconv -lm  -lxml2 -lz -liconv 
-lm -lxml2 -lz -liconv -lm -lmysqlclient -lz -lm -lxml2 -lz -liconv -
lm 1>&5
conftest.c: In function 'main':
conftest.c:3: warning: incompatible implicit declaration of built-in 
function 'exit'
dyld: Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.
15.dylib
  Referenced from: /usr/local/php/php5.2-200706251630/./conftest
  Reason: image not found
./configure: line 90558:  4955 Trace/BPT trap          ./conftest


The dyld *does* exist at this location:
/usr/local/mysql/lib/libmysqlclient.15.dylib

mysql_config gives this:
Usage: /usr/local/mysql/bin/mysql_config [OPTIONS]
Options:
        --cflags         [-I/usr/local/mysql/include -Os -arch ppc -
fno-common]
        --include        [-I/usr/local/mysql/include]
        --libs           [-L/usr/local/mysql/lib -lmysqlclient -lz -
lm]
        --libs_r         [-L/usr/local/mysql/lib -lmysqlclient_r -lz -
lm]
        --socket         [/tmp/mysql.sock]
        --port           [3306]
        --version        [5.0.41]
        --libmysqld-libs [-L/usr/local/mysql/lib -lmysqld -lz -lm]

This problem exists in the latest v5 CVS snap and 5.2.3, but not in 
5.2.0.

Reproduce code:
---------------
 ./configure  --with-mysqli=/usr/local/mysql/bin/mysql_config

Expected result:
----------------
Configure should end like this:
...
| your web space, users may be able to circumvent existing .htaccess |
| security by loading files directly through the parser.  See        |
| http://www.php.net/manual/security.php for more details.           |
+--------------------------------------------------------------------+
| License:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE.  By continuing this installation |
...

Actual result:
--------------
But it doesn't:
...
| your web space, users may be able to circumvent existing .htaccess |
| security by loading files directly through the parser.  See        |
| http://www.php.net/manual/security.php for more details.           |
+--------------------------------------------------------------------+
|                       *** ATTENTION ***                            |
|                                                                    |
| Something is likely to be messed up here, because the configure    |
| script was not able to detect a simple feature on your platform.   |
| This is often caused by incorrect configuration parameters. Please |
| see the file debug.log for error messages.                         |
|                                                                    |
| If you are unable to fix this, send the file debug.log to the      |
| php-install@lists.php.net mailing list and include appropiate      |
| information about your setup.                                      |
+--------------------------------------------------------------------+
| License:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE.  By continuing this installation |
...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-25 20:43 UTC] sniper@php.net
According to your mysql_config output, the library should be in:

/usr/local/mysql/lib/

And you say the library is in:

/usr/local/mysql/lib/mysql/

Have you moved it manually or something?
 [2007-06-25 21:28 UTC] seth at pricepages dot org
No, the library is in /usr/local/mysql/lib and mysql_config beleives it 
is in /usr/local/mysql/lib. I'm not sure what is causing the conftest 
program to do what it's doing.

The mysql install was a binary install of v5.0.41, and as far as I can 
tell is working fine.
 [2007-06-25 21:45 UTC] tony2001@php.net
ls -l /usr/local/mysql/lib/libmysqlclient.15.dylib
?
 [2007-06-25 22:36 UTC] seth at pricepages dot org
$ ls -l /usr/local/mysql/lib/libmysqlclient.15.dylib
-rwxr-xr-x   1 root  mysql  2033452 Apr 26 15:48 /usr/local/mysql/lib/
libmysqlclient.15.dylib

$ ls -l /usr/local/mysql/lib/mysql/                 
ls: /usr/local/mysql/lib/mysql/: No such file or directory
 [2007-06-25 23:29 UTC] sniper@php.net
What does config.log have about this?
 [2007-06-26 03:08 UTC] seth at pricepages dot org
Here it is in its entirety:

http://144.92.10.211/config.log
 [2007-06-26 10:43 UTC] sniper@php.net
That config.log is identical to what I get for succesful run.
Just to be sure: You're using 100% fresh sources, ie. you have deleted config.cache before rerunning configure?

 [2007-06-26 10:51 UTC] sniper@php.net
Perhaps this is the issue here:
http://www.fatmixx.com/2007/05/30/ruby-mysql-gem-error/

 [2007-06-26 13:31 UTC] seth at pricepages dot org
I deleted the entire directory and reinstalled from the .tar.gz 
snapshot. I still get the error, but the config.log is different 
(according to diff). It's uploaded to the same address.

That looks like the error I'm getting. What command can I use to test it 
out?
 [2007-06-26 14:24 UTC] sniper@php.net
This has some more info (in german, but has english comments in the end):
http://blog.calganx.net/2007/05/20/apache-2-php-5-und-mysql-5-fr-macos-x/

As this is really not PHP bug at all, I'm closing this.
 [2007-06-26 15:09 UTC] seth at pricepages dot org
Here's the bug report on MySQL's tracker:

http://bugs.mysql.com/bug.php?id=28544
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 09:01:30 2024 UTC