PDA

View Full Version : PHP make error: dns.c



Rich-Boy
09-29-2007, 12:10 PM
I've tried compiling PHP 4, 5 and 6 and get this same error every time during make;


I/usr/local/directadmin/custombuild/php-5.2.4/ext/mbstring/oniguruma -I/usr/local/directadmin/custombuild/php-5.2.4/ext/mbstring/libmbfl -I/usr/local/directadmin/custombuild/php-5.2.4/ext/mbstring/libmbfl/mbfl -I/usr/local/mysql/include -I/usr/local/include/mysql -I/usr/local/directadmin/custombuild/php-5.2.4/TSRM -I/usr/local/directadmin/custombuild/php-5.2.4/Zend -I/usr/local/include -g -O2 -prefer-non-pic -c /usr/local/directadmin/custombuild/php-5.2.4/ext/standard/dns.c -o ext/standard/dns.lo
/usr/local/directadmin/custombuild/php-5.2.4/ext/standard/dns.c: In function `zif_dns_get_record':
/usr/local/directadmin/custombuild/php-5.2.4/ext/standard/dns.c:672: error: storage size of 'res' isn't known
/usr/local/directadmin/custombuild/php-5.2.4/ext/standard/dns.c:776: error: `RES_DEFNAMES' undeclared (first use in this function)
/usr/local/directadmin/custombuild/php-5.2.4/ext/standard/dns.c:776: error: (Each undeclared identifier is reported only once
/usr/local/directadmin/custombuild/php-5.2.4/ext/standard/dns.c:776: error: for each function it appears in.)
*** Error code 1

Stop in /usr/local/directadmin/custombuild/php-5.2.4.


PHP 5 compiled fine via custombuild about a month ago but as soon as i came to compile in exactly the same way as before that error popped up. I've googled and messed around with settings etc. for hours on end now so any help would be appreciated.

Thanks,
Chris

Rich-Boy
09-29-2007, 12:33 PM
Literally minutes after i posted this i found a fix (two actually)

What i did was install Cygwin's minires-devel package


cd /
wget http://ftp.univie.ac.at/packages/cygwin/release/minires/minires-devel/minires-devel-1.01-1.tar.bz2
tar zxvf minires-devel-1.01-1.tar.bz2


There's also a fix which i didnt test here; http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2005-January/049653.html



pico /usr/ports/lang/php5/work/php-5.0.3/ext/standard/dns.c [most likely /usr/local/directadmin/custombuild/php-5.2.4/ext/standard/dns.c instead]
replace
res_ninit with __res_ninit
res_nmkquery with __res_nmkquery
res_nsend with __res_nsend
res_nclose with __res_nclose


I hope thats helped someone.