Opened 13 years ago

Closed 12 years ago

#34430 closed defect (fixed)

Php4 @4.4.9_12 -apache2 +mysql5 build fails in linking phase

Reported by: exile@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: Cc:
Port: php4

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hi,

I know PHP4 has been dead for a long time but it still comes handy time to time when you need to be able to run legacy PHP applications prior to porting, as such I find it really useful for Macports to keep the legacy php4 port alive.

Currently when trying to install (it seems the variants don't play role when trying to build php4 on Lion Server 10.7.3):

sudo port -v install php4 -apache2 +mysql5

On building I get the following error on linking:

sapi/cgi/php
Undefined symbols for architecture x86_64:
  "_res_9_search", referenced from:
      _zif_getmxrr in dns.o
      _zif_checkdnsrr in dns.o
  "_res_9_dn_skipname", referenced from:
      _zif_getmxrr in dns.o
  "_res_9_dn_expand", referenced from:
      _zif_getmxrr in dns.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php] Error 1

This seems to be a an old PHP bug where -lresolv is missing from the EXTRA_LIBS in generated Makefile. Adding the -lresolv to Makefile fixes the issue and php installs successfully. Would be nice if this is included as a patch after the configuration phase.

Regards,

Sten

Change History (2)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: php4 removed
Owner: changed from macports-tickets@… to ryandesign@…
Status: newassigned

comment:2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

Thanks for reporting the problem. Fixed php4 and just in case php52 too in r92995. Though these are obsolete versions, I'll do what I can to help you get them running on your system, so let me know if anything else is broken.

Note: See TracTickets for help on using tickets.