Fixing PHP 5.3.0 Build Problems on Snow Leopard

Building PHP from source on 10.6 produced a new problem I’ve not seen before. After successfully configuring and a few minutes of building, a link error stops the show, with the end part looking like:

Undefined symbols:
"_res_9_dn_expand", referenced from:
_zif_dns_get_mx in dns.o
"_res_9_search", referenced from:
_zif_dns_get_mx in dns.o
_zif_dns_check_record in dns.o
"_res_9_dn_skipname", referenced from:
_zif_dns_get_mx in dns.o
_zif_dns_get_mx in dns.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1
Error: Status 1 encountered during processing.

Some searching found MacPorts users were seeing the same problem, and the culprit was lresolv.

Simply adding a configure environment variable before the actual configure command created a Makefile which worked:

LIBS=-lresolv ./configure --with-apxs2 --with-gd (etc.)

0 Responses to “Fixing PHP 5.3.0 Build Problems on Snow Leopard”


  • No Comments

Leave a Reply