|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75487 can't find res_ndestroy
Submitted: 2017-11-06 00:42 UTC Modified: 2017-11-10 03:03 UTC
Avg. Score:4.5 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (66.7%)
From: ddmitrie at gmail dot com Assigned:
Status: Open Package: Compile Failure
PHP Version: 7.2.0RC5 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: ddmitrie at gmail dot com
New email:
PHP Version: OS:


 [2017-11-06 00:42 UTC] ddmitrie at gmail dot com
configure makes certain attempts to find res_ndestroy() under various names, including for example __res_ndestroy() and innocuous_res_ndestroy, in various libraries including bind, resolv 

If I get it right, it finally finds this function in bind under __res_ndestroy name:

configure:79335: checking for __res_ndestroy in -lbind
configure:79360: cc -o conftest -I/usr/include -g -O2 -fvisibility=hidden  -L/usr/lib  -Wl,-rpath,/home/myaccount/php/install/lib -L/home/myaccount/php/install/lib conftest.c -lbind  -lresolv -lcrypt -lrt -lrt -lm -ldl -configure:79360: $? = 0
configure:79369: result: yes

and main/php_config.h gets the following entry:


all of sudden, make fails

it looks like res_ndestroy used by configure as an alias to __res_ndestroy didn't make through and compiler still found res_ndestroy() calls, otherwise it would complaint about missed __res_ndestroy

if I comment out HAVE_RES_NDESTROY in php_configure.h and rebuild with make clean all, it fails on missed isfinite() function. Commenting out HAVE_ISFINITE brings yet another failure: undeclared CALLGRIND_STOP_INSTRUMENTATION and CALLGRIND_START_INSTRUMENTATION symbols. Finally commenting out HAVE_VALGRIND results in success.

Test script:
./configure --prefix=/home/myaccount/php/install \
 --disable-fileinfo \
 --with-libxml-dir=/home/myaccount/php/install && \

Actual result:
ext/standard/.libs/dns.o(.text+0x1608): In function `zif_dns_check_record':
php-7.2.0RC5/ext/standard/dns.c:422: undefined reference to `res_ndestroy'
ext/standard/.libs/dns.o(.text+0x1c1a): In function `zif_dns_get_record':
php-7.2.0RC5/ext/standard/dns.c:1013: undefined reference to `res_ndestroy'
php-7.2.0RC5/ext/standard/dns.c:937: undefined reference to `res_ndestroy'
php-7.2.0RC5/ext/standard/dns.c:972: undefined reference to `res_ndestroy'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-11-10 03:03 UTC] ddmitrie at gmail dot com
7.2.0RC6  didn't change anything. Still fails to compile
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Aug 02 13:01:24 2021 UTC