#42490 [Fbk->Opn]: PHP will not compile with BIND 9 installed

From: Date: Thu, 06 Sep 2007 14:46:22 +0000
Subject: #42490 [Fbk->Opn]: PHP will not compile with BIND 9 installed
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-117235@lists.php.net to get a copy of this message
ID: 42490 User updated by: jerry at scene-naturally dot dyndns dot org Reported By: jerry at scene-naturally dot dyndns dot org -Status: Feedback +Status: Open Bug Type: Compile Failure Operating System: OS X 10.4.10 PHP Version: 5.2.4 New Comment: No, there is only the one libbind file installed from the Bind 9 Installation (9.4.1-p1), This is an update to the older files provided by Apple. It was compiled using the --enable-libbind option for apps such as Postfix that need this library. This option places the libbind into /usr/local/lib. This is the only libbind file on the entire system. The older Apple setup is done differently using /usr/lib/libresolv.9.dylib and /usr/lib/libresolv.dylib for the library files. As I have mentioned, if you remove (safely -- by shutting down all apps that depend on the bind libraries and then move the libbind fiel out of the search path or not safely by just removing the libbind library file out of the search path) and then running configure for PHP, this will allow you to build PHP. But you do not get all of the benefits provided by the BIND files -- as far as I can tell, the configure app is not not really checking the older Apple resolv libraries for very much. Previous Comments: ------------------------------------------------------------------------ [2007-09-06 10:56:27] jani@php.net So you have multiple libbind.* around? AFAIK, this Macosx version comes with bind 9, so why do you have to install bind 8??? (I'm very confused now..) Are you able to try this with a clean system without any bind 8 libs installed and without modifying anything, using PHP 5.2.4 from fresh sources? ------------------------------------------------------------------------ [2007-09-05 14:29:28] jerry at scene-naturally dot dyndns dot org Hello Jani and thank you for taking a further look at this problem. I tried the suggestion, but it did not work, running into a problem with dns. I have attached the output from running the make command. /temp/php-5.2.4/ext/standard/dns.c: In function 'zif_dns_get_record': /temp/php-5.2.4-copy/ext/standard/dns.c:673: error: 'HEADER' undeclared (first use in this function) /temp/php-5.2.4/ext/standard/dns.c:673: error: 'hp' undeclared (first use in this function) /temp/php-5.2.4/ext/standard/dns.c:674: error: parse error before 'buf' /temp/php-5.2.4/ext/standard/dns.c:778: error: 'QUERY' undeclared (first use in this function) /temp/php-5.2.4/ext/standard/dns.c:778: error: 'C_IN' undeclared (first use in this function) /temp/php-5.2.4/ext/standard/dns.c:778: error: 'buf' undeclared (first use in this function) /temp/php-5.2.4/ext/standard/dns.c:786: error: 'answer' undeclared (first use in this function) /temp/php-5.2.4/ext/standard/dns.c:797: error: parse error before ')' token /temp/php-5.2.4/ext/standard/dns.c: In function 'zif_dns_get_mx': /temp/php-5.2.4/ext/standard/dns.c:865: error: 'HEADER' undeclared (first use in this function) /temp/php-5.2.4/ext/standard/dns.c:865: error: 'hp' undeclared (first use in this function) /temp/php-5.2.4/ext/standard/dns.c:894: error: 'C_IN' undeclared (first use in this function) /temp/php-5.2.4/ext/standard/dns.c:901: error: parse error before ')' token make: *** [ext/standard/dns.lo] Error 1 There is an un-safe method to get this to work. Before running Configure, just move the libbind.a library out of /usr/local/lib and then run configure, which will then not put any of the dependent bind stuff into the various makefiles, etc. Jerry ------------------------------------------------------------------------ [2007-09-05 10:31:18] jani@php.net Reopening, see bug #25955 I think this must be the reason it fails on Macosx with bind 9. Try delete the line with BIND_8_COMPAT in it from main/php_config.h after running configure and before 'make'. ------------------------------------------------------------------------ [2007-09-03 09:18:08] jani@php.net When you start messing around with your system, the results are unexpected. This is not PHP bug per se. ------------------------------------------------------------------------ [2007-09-02 15:34:52] jerry at scene-naturally dot dyndns dot org I have found a partial workaround, but it is very kludgy at best: 1) Turn off named. Turn off Postfix (master) and any other apps that are using the bind libraries. Just to be sure nothing odd happens, turn off the IMAP/POP servers and any of the second level apps that use those first level apps. Note: since these are usually started as LaunchDaemons or StartUpItems, you will need to disable them from re- starting. 2) Move the libbind.a and libbind9.a libraries out of /usr/local/lib to the desktop (or somewhere that is not in the search path of the Configure app). 3) Restart the machine. This is necessary. 4) Configure, make and install the new PHP. Take care of any post install stuff you need to do. 5) Undo step number 2. Undo step number 1. Restart the machine. ------------------------------------------------------------------------ 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 http://bugs.php.net/42490 -- Edit this bug report at http://bugs.php.net/?id=42490&edit=1

« previous php.bugs (#117235) next »