PHP 4.0 Bug #4739: build script fails to link "nss_dns" library

From: Date: Wed, 31 May 2000 20:14:19 +0000
Subject: PHP 4.0 Bug #4739: build script fails to link "nss_dns" library
Groups: php.dev 
Request: Send a blank email to php-dev+get-19922@lists.php.net to get a copy of this message
From: myk@zapogee.com Operating system: RedHat 6.0 Linux 2.2.5 PHP version: 4.0.0 Release PHP Bug Type: Installation problem Bug description: build script fails to link "nss_dns" library When compiling PHP as a static module with Apache 1.3.12, Apache compilation fails with the following errors: modules/php4/libphp4.a(dns.o): In function `php_if_checkdnsrr': /usr/local/src/php-4.0.0/ext/standard/dns.c:204: undefined reference to `res_search' modules/php4/libphp4.a(dns.o): In function `php_if_getmxrr': /usr/local/src/php-4.0.0/ext/standard/dns.c:273: undefined reference to `res_search' /usr/local/src/php-4.0.0/ext/standard/dns.c:282: undefined reference to `__dn_skipname' /usr/local/src/php-4.0.0/ext/standard/dns.c:288: undefined reference to `__dn_skipname' /usr/local/src/php-4.0.0/ext/standard/dns.c:300: undefined reference to `dn_expand' When compiling PHP as a dynamic module with Apache 1.3.12 I get similar errors. I solved the problem by prepending 'EXTRA_LIBS="-lnss_dns"' to "./configure" when configuring Apache to load PHP as a static module: EXTRA_LIBS="-lnss_dns" ./configure ... I solved the problem when compiling PHP as a dynamic module by doing the same thing when configuring PHP itself instead of Apache, although my guess is that either one works either way, it's just that one of the two has to be configured so it links in that library. Sorry I'm not sophisticated enough to figure out how to actually fix the PHP build scripts, but hopefully this gives you the information you need to do it.

« previous php.dev (#19922) next »