Compilation fails with an error like the following.
ext/standard/dns.o: In function `php_parserr':
/home/danbettles/build/php-5.3.1/ext/standard/dns.c:418: undefined reference to `__dn_expand'
/home/danbettles/build/php-5.3.1/ext/standard/dns.c:468: undefined reference to `__dn_expand'
/home/danbettles/build/php-5.3.1/ext/standard/dns.c:652: undefined reference to `__dn_expand'
/home/danbettles/build/php-5.3.1/ext/standard/dns.c:674: undefined reference to `__dn_expand'
/home/danbettles/build/php-5.3.1/ext/standard/dns.c:513: undefined reference to `__dn_expand'
ext/standard/dns.o:/home/danbettles/build/php-5.3.1/ext/standard/dns.c:519: more undefined references to `__dn_expand' follow
ext/standard/dns.o: In function `zif_dns_check_record':
/home/danbettles/build/php-5.3.1/ext/standard/dns.c:393: undefined reference to `__res_nsearch'
ext/standard/dns.o: In function `zif_dns_get_mx':
/home/danbettles/build/php-5.3.1/ext/standard/dns.c:933: undefined reference to `__res_nsearch'
/home/danbettles/build/php-5.3.1/ext/standard/dns.c:944: undefined reference to `__dn_skipname'
/home/danbettles/build/php-5.3.1/ext/standard/dns.c:951: undefined reference to `__dn_skipname'
/home/danbettles/build/php-5.3.1/ext/standard/dns.c:964: undefined reference to `__dn_expand'
ext/standard/dns.o: In function `zif_dns_get_record':
/home/danbettles/build/php-5.3.1/ext/standard/dns.c:810: undefined reference to `__res_nsearch'
/home/danbettles/build/php-5.3.1/ext/standard/dns.c:833: undefined reference to `__dn_skipname'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1
Solution
Execute the following command before running configure.
export EXTRA_LIBS="-lresolv"That fixed the problem on Debian. Hopefully it'll do the trick for you, too.
1 comments:
Thank you so much for export EXTRA_LIBS="-lresolv"
Post a Comment