Can't get php5 to build on machines that have php4 or have had php4

Edwin L. Culp eculp at encontacto.net
Mon May 23 07:59:09 PDT 2005


Quoting Bjoern Koenig <bkoenig at cs.tu-berlin.de>:

> Edwin L. Culp wrote:
>
>> I have php5 running with no problems on machines that I installed it 
>> initially but I've not been able to compile php5 on any machine that 
>> has or has had ( deleted with pkg_delete php4*).  I can't find the 
>> reason for the error that I get in all cases.
>>
>> ext/standard/dns.lo(.text+0x131f): In function `zif_dns_get_record':
>> : undefined reference to `res_ninit'
>> ext/standard/dns.lo(.text+0x1365): In function `zif_dns_get_record':
>> : undefined reference to `res_nmkquery'
>> ext/standard/dns.lo(.text+0x138d): In function `zif_dns_get_record':
>> : undefined reference to `res_nsend'
>> ext/standard/dns.lo(.text+0x148f): In function `zif_dns_get_record':
>> : undefined reference to `res_nclose'
>> *** Error code 1
>>
>> Stop in /usr/ports/lang/php5/work/php-5.0.4.
>> *** Error code 1
>
> Could it be that you have built a world with option 
> WITH_BIND_LIBS=yes or installed dns stuff from ports?

Thanks, Bjoern,

Not that I am aware of.  I'm using bind9 but not from ports and haven't 
installed any dns stuff from ports but I'm going to recheck, JIC.

>
> I had also problems with PHP and undefined references to these 
> functions because FreeBSD does not install the header files which 
> belong to the libraries if you use WITH_BIND_LIBS=yes, i.e. the 
> definitions
>
>   #define res_ninit       __res_ninit
>   #define res_nmkquery    __res_nmkquery
>   #define res_nsend       __res_nsend
>   #define res_nclose      __res_nclose
>
> and others are missing. You can solve the problem if you prepend "__" 
> to these functions in the PHP source code. I attached a patch to this 
> mail. Put it into /usr/ports/lang/php5/files, 'make clean' and 
> install PHP again.

I'm going to apply the patch and test it in a bit.  Thanks very much 
for sending it.  I'm seeing this problem on 4 different machines.  I've 
got a couple that I started with php5 and they are great.  The only 
problems are with the ones that were initiated with php4.

Thanks, again,

ed

>
> The PHP project don't feel responsible for their non-working and 
> ignorant configure script.
>
> Regards Björn
>





More information about the freebsd-ports mailing list