php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42764 cannot configure --with-mysql because conftest looks in the wrong place on OS X
Submitted: 2007-09-25 23:15 UTC Modified: 2007-09-26 22:01 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: wangoo dot tangoo at yahoo dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.2.4 OS: os x
Private report: No CVE-ID: None
 [2007-09-25 23:15 UTC] wangoo dot tangoo at yahoo dot com
Description:
------------
A clean, fresh install of mysql on os x places the client dynamic 
libraries in /usr/local/mysql/lib

Php's conftest looks for them in /usr/local/mysql/lib/mysql

Because they are not found there, the configuration dies.

This is a new install (neither existed on this machine in the past) of 
both php and mysql. It is reproducible.

A google search for the quotes string:
  "dyld: Library not loaded: 
/usr/local/mysql/lib/mysql/libmysqlclient.15.dylib"
indicates that numerous other people are having this problem as well.






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

Expected result:
----------------
I expect the configuration to complete successfully.

Actual result:
--------------
Here is the output in debug.log:

CONFIGURE:   './configure'  '--with-mysql=/usr/local/mysql'
CC:         gcc
CFLAGS:     -I/usr/include -g -O2
CPPFLAGS:    -no-cpp-precomp
CXX:
CXXFLAGS:
INCLUDES:    -I/usr/include/libxml2 -I/Users/art/Desktop/php-
5.2.4/ext/date/lib -I/usr/local/mysql/include
LDFLAGS:    -liconv -L/usr/lib  -L/usr/local/mysql/lib -
L/usr/local/mysql/lib
LIBS:       -lmysqlclient -liconv -lm  -lxml2 -lz -liconv -lm -lxml2 -
lz -liconv -lm -lxml2 -lz -liconv -lm
DLIBS:
SAPI:       cgi
PHP_RPATHS:  /usr/local/mysql/lib
uname -a:   Darwin leo-macbook-1 8.10.1 Darwin Kernel Version 8.10.1: 
Wed May 23 16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386 
i386

gcc -o conftest -I/usr/include -g -O2  -no-cpp-precomp -liconv -
L/usr/lib  -L/usr/local/mysql/lib -L/usr/local/mysql/lib conftest.c -
lmysqlclient -li\
conv -lm  -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -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: /Users/art/Desktop/php-5.2.4/./conftest
  Reason: image not found
./configure: line 91490: 22722 Trace/BPT trap          ./conftest





Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-25 23:17 UTC] wangoo dot tangoo at yahoo dot com
Clarified in summary that this is strictly an OS X bug.
 [2007-09-25 23:46 UTC] wangoo dot tangoo at yahoo dot com
Category was wrong. This is a configuration issue, not a compile issue.
 [2007-09-26 22:01 UTC] jani@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #42515
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 04 00:01:30 2024 UTC