Edit report at https://bugs.php.net/bug.php?id=55108&edit=1

 ID:                 55108
 Updated by:         m...@php.net
 Reported by:        s21122012 at yahoo dot com
 Summary:            Unable to compile with MySQL
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            Compile Failure
 Operating System:   Mac OS X 10.6.8
 PHP Version:        5.4.0alpha1
 Block user comment: N
 Private report:     N

 New Comment:

Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.




Previous Comments:
------------------------------------------------------------------------
[2011-11-07 20:09:04] rpickard at gmail dot com

Hi all,

I had this problem trying to compile php 5.3.8 on OS X 10.7.2 (Lion) with MySQL 
5.5.17 against Apache 2.2.21. I found a solution that would allow the build to 
complete here:

https://github.com/adamv/homebrew-alt/issues/53

The solution is to set a EXTRA_CFLAGS value of -lresolv. In my case with the 
bash 
command

export EXTRA_CFLAGS=-lresolv

and then re-do make. There was no need to do make clean or distclean.

After compiling all tests passed.

Hope this helps,
-p.

------------------------------------------------------------------------
[2011-09-01 22:30:46] matt dot fellows at onegeek dot com dot au

I had the same issue with php 5.3.8 on Lion, but unfortunately I'm unable to 
use the mysqlnd option due to the fact that the database I'm connecting to is 
MySQL v3.

Assuming a default MySQL installation (5.5.15 using either image or source), I 
was able to solve the issue with the following command:

sudo install_name_tool -id /usr/local/mysql/lib/libmysqlclient.18.dylib 
/usr/local/mysql/lib/libmysqlclient.dylib

Hope this helps someone.

Cheers,
Matt

------------------------------------------------------------------------
[2011-08-29 23:10:02] aaronh at bind dot com

Same issue here running Lion Server / 10.7.1 and php-5.3.8 with the mysql 
binary.

mysql-5.5.15-osx10.6-x86_64.tar.gz

Darwin 6c1.sjc.6connect.com 11.0.1 Darwin Kernel Version 11.0.1: Thu Jul 28 
02:01:39 PDT 2011; root:xnu-1699.23.4~1/RELEASE_X86_64 x86_64

Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/src/configure -
-disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --
mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- -
-program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --
build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-
2335.15~25/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-
darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-
include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)

------------------------------------------------------------------------
[2011-07-01 18:12:31] s21122012 at yahoo dot com

Thank you for your reply!

I used the binary package when I posted the issue, but I had tried with a 
version compiled by myself before and the result was the same. Here is the file 
you requested (it was compiled using only the --prefix, --with-apxs2, --with-
mysql and --with-mysqli flags): http://dl.dropbox.com/u/4460937/php_config.h

I have been able to compile it with MySQL support using the native driver 
(mysqlnd), as suggested by you.

I would also like to mention that I had similar errors with PHP 5.3.6 in the 
past. I am not sure if the conflict was between the same macros, though.

------------------------------------------------------------------------
[2011-07-01 16:22:28] johan...@php.net

These might be caused by conflicts in the usage of either HAVE_DNS_SEARCH or 
HAVE_RES_NSEARCH between MySQL libs and PHP. Did you use MySQL binary packages 
or did you compile MySQL yourself?
I have no Mac at hand, could you please send me the file main/php_config.h from 
the failing build? - Thanks.

(As remark: You could build PHP using mysqlnd instead of libmysql by using 
--with-mysql=mysqlnd --with-mysqli=mysqlnd - but your issue should be fixed 
anyways.)

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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=55108


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

Reply via email to