Opened 4 months ago
Last modified 7 weeks ago
#70468 accepted defect
php74 @7.4.33: Undefined symbols _res_9_dn_expand, _res_9_dn_skipname, _res_9_init, _res_9_search,
Reported by: | dLovell2001 (David Lovell) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.9.3 |
Keywords: | sonoma sequoia | Cc: | exlemor (Emmanuel Lemor) |
Port: | php74 php74-apache2handler php74-cgi php74-fpm |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
new computer - i've installed 2.9.3 - did selfupdate - installed apache24 and php74 successfully. attempting to install php74-apache2handler fails. The log it points me to has this at the bottom:
:info:build ld: symbol(s) not found for architecture arm64 :info:build clang: error: linker command failed with exit code 1 (use -v to see invocation) :info:build make: *** [libs/libphp7.bundle] Error 1 :info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php74-apache2handler/work/php-7.4.33' :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php74-apache2handler/work/php-7.4.33" && /usr/bin/make -j12 -w libs/libphp7.bundle :info:build Exit code: 2 :error:build Failed to build php74-apache2handler: command execution failed :debug:build Error code: CHILDSTATUS 52815 2 :debug:build Backtrace: command execution failed :debug:build while executing :debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring" :debug:build invoked from within :debug:build "command_exec -callback portprogress::target_progress_callback build" :debug:build (procedure "portbuild::build_main" line 10) :debug:build invoked from within :debug:build "$procedure $targetname" :error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php74-apache2handler/main.log for details.
I tried port clean but that fails:
Can't map the URL 'file://.' to a port description file ("Could not find Portfile in /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php74-apache2handler"). Please verify that the directory and portfile syntax are correct. To use the current port, you must be in a port's directory.
I have no idea what is causing this. MacPorts has worked for me for years. I am doing everything as root
Attachments (1)
Change History (6)
Changed 4 months ago by dLovell2001 (David Lovell)
Attachment: | main.log.gz added |
---|
comment:1 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… removed |
---|---|
Description: | modified (diff) |
Keywords: | arm64 removed |
Owner: | set to ryandesign |
Status: | new → accepted |
Summary: | php74-apache2handler build fails for MacOS Sonoma (Apple M3) → php74-apache2handler @7.4.33: Undefined symbols _res_9_dn_expand, _res_9_dn_skipname, _res_9_init, _res_9_search, |
The relevant error in the log is:
Undefined symbols for architecture arm64: "_res_9_dn_expand", referenced from: _php_parserr in dns.o _php_parserr in dns.o _php_parserr in dns.o _php_parserr in dns.o _php_parserr in dns.o _php_parserr in dns.o _php_parserr in dns.o ... "_res_9_dn_skipname", referenced from: _zif_dns_get_record in dns.o _zif_dns_get_mx in dns.o _zif_dns_get_mx in dns.o "_res_9_init", referenced from: _zif_dns_check_record in dns.o _zif_dns_get_record in dns.o _zif_dns_get_mx in dns.o "_res_9_search", referenced from: _zif_dns_check_record in dns.o _zif_dns_get_record in dns.o _zif_dns_get_mx in dns.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
The log also shows you are using the Xcode command line tools version 15.3. This problem is caused by using Xcode or CLT version 15.3 or later because those versions consider implicit int to be an error. Previous compilers allowed implicit int with just a warning. For reasons of laziness we still use Xcode and CLT 15.2 on our macOS 14 build machines and this is able to build PHP without problems.
PHP cleaned up its code for implicit int issues in version 8.0, for example in this commit. I need to either backport that commit, and probably others, or downgrade the error back to a warning to allow php74 and earlier to build again with the latest Xcode and CLT.
If you are able to use a newer version of PHP for your project, try php80 or newer. They shouldn't have this problem.
If you require php74 or older, with the understanding that those versions have reached end of life, you can work around the problem by running:
sudo port clean php74-apache2handler sudo port install php74-apache2handler configure.cflags="-Os -Wno-error=implicit-int"
comment:2 Changed 4 months ago by dLovell2001 (David Lovell)
Thanks for the quick turnaround and easy fix!
comment:3 Changed 8 weeks ago by ryandesign (Ryan Carsten Schmidt)
Cc: | exlemor added |
---|---|
Keywords: | sequoia added |
Port: | php74 php74-cgi php74-fpm added |
Summary: | php74-apache2handler @7.4.33: Undefined symbols _res_9_dn_expand, _res_9_dn_skipname, _res_9_init, _res_9_search, → php74 @7.4.33: Undefined symbols _res_9_dn_expand, _res_9_dn_skipname, _res_9_init, _res_9_search, |
Has duplicate #70981.
comment:4 Changed 7 weeks ago by BjarneDMat
The reason for still needing php7.4 is primarily WordPress plugins - of which many still haven't gotten around to cleaning up their code. Many WP service providers are still offering php74 bacause of that.
comment:5 Changed 7 weeks ago by exlemor (Emmanuel Lemor)
I wouldn't use Wordpress piece of crap for all of the money in the world but I still need PHP 7.4 for a project for a few months while transitioning the customer project to PHP 8.2...
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php74-apache2handler/main.log