Bug #55108 [Com]: Unable to compile with MySQL
| From: | aaronh at bind dot com | Date: | Mon, 29 Aug 2011 23:10:02 +0000 |
| Subject: | Bug #55108 [Com]: Unable to compile with MySQL | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-163124@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55108&edit=1
ID: 55108
Comment by: aaronh at bind dot com
Reported by: s21122012 at yahoo dot com
Summary: Unable to compile with MySQL
Status: Open
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:
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)
Previous Comments:
------------------------------------------------------------------------
[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] johannes@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.)
------------------------------------------------------------------------
[2011-07-01 15:04:34] s21122012 at yahoo dot com
Description:
------------
I'm trying to compile PHP 5.4 alpha 1 with MySQL support using the configuration
commands in "Version 1". It produces the error below. If I use "Version 2" (that
is, no MySQL), it works.
MySQL is 5.5.13 x86_64.
Test script:
---------------
Version 1
----------
./configure --prefix=/alt --with-apxs2=/alt/apache/bin/apxs --with-openssl=/alt --with-zlib=/alt
--with-curl=/alt --with-gmp=/alt --with-libxml-dir=/alt --enable-ftp --disable-cgi
--with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config
Version 2
----------
./configure --prefix=/alt --with-apxs2=/alt/apache/bin/apxs --with-openssl=/alt --with-zlib=/alt
--with-curl=/alt --with-gmp=/alt --with-libxml-dir=/alt --enable-ftp --disable-cgi
Expected result:
----------------
Build complete
Actual result:
--------------
Undefined symbols for architecture x86_64:
"_res_9_init", referenced from:
_zif_dns_get_mx in dns.o
_zif_dns_get_record in dns.o
_zif_dns_check_record in dns.o
"_res_9_search", referenced from:
_zif_dns_get_mx in dns.o
_zif_dns_get_record in dns.o
_zif_dns_check_record in dns.o
"_res_9_dn_skipname", referenced from:
_zif_dns_get_mx in dns.o
_zif_dns_get_record in dns.o
"_res_9_dn_expand", referenced from:
_zif_dns_get_mx in dns.o
_php_parserr in dns.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55108&edit=1