#61464 closed defect (fixed)
php: modules fail to build with undefined symbols
Reported by: | andy-yx-chen (Andy Chen) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.4 |
Keywords: | bigsur | Cc: | ohader (Oliver Hader), mssio (Mario Suharja), jonasjonas (Frank Hellenkamp), eljakim (Eljakim Schrijvers), nortcele, ugr, kirmorozov (Kirill Morozov), druidvav (Anton Vlasov) |
Port: | php |
Description (last modified by jmroot (Joshua Root))
Looks like some c files were missing
Undefined symbols for architecture x86_64: "___zend_malloc", referenced from: _fontFetch in gdft.o _php_gd_gdCacheCreate in gdcache.o _php_gd_gdCacheGet in gdcache.o "__convert_to_string", referenced from: _zif_imagecreatefromstring in gd.o "__ecalloc", referenced from: __php_image_output_ctx in gd.o _php_gd_gdImageCreate in gd.o _php_gd_gdImageCreateTrueColor in gd.o _php_gd_gdImageFill in gd.o _php_gd_gdImageCreateFromGd2Ctx in gd_gd2.o _php_gd_gdImageCreateFromGd2PartCtx in gd_gd2.o __gd2GetHeader in gd_gd2.o ... "__efree", referenced from: _php_free_gd_font in gd.o _zif_imageloadfont in gd.o _zif_imagesetstyle in gd.o __php_image_create_from in gd.o __php_image_output in gd.o _php_imagepolygon in gd.o _php_imagechar in gd.o ... "__emalloc", referenced from: _zif_imageloadfont in gd.o _php_gd_gdImageCreate in gd.o _php_gd_gdImageCreateTrueColor in gd.o _php_gd_gdImageFilledPolygon in gd.o _php_gd_gdImageCopyResized in gd.o _php_gd_gdImageSetStyle in gd.o _gdImagePaletteToTrueColor in gd.o ... "__emalloc_1024", referenced from: _php_gd_gdImageStringFTEx in gdft.o _gdImageBmpCtx in gd_bmp.o "__emalloc_16", referenced from: __gdContributionsCalc in gd_interpolation.o "__emalloc_24", referenced from: _zif_imageloadfont in gd.o _php_gd_createwbmp in wbmp.o _php_gd_readwbmp in wbmp.o "__emalloc_32", referenced from: _php_gd_gdNewDynamicCtxEx in gd_io_dp.o _tweenColorFetch in gdft.o "__emalloc_768", referenced from: _php_gd_gdImageCreateFromPngCtx in gd_png.o "__emalloc_80", referenced from: _php_gd_gdNewDynamicCtxEx in gd_io_dp.o _php_gd_gdNewFileCtx in gd_io_file.o _php_gd_gdNewSSCtx in gd_io_ss.o "__emalloc_large", referenced from: _php_gd_gdImageCreateTrueColor in gd.o "__erealloc", referenced from: _php_gd_gdImageFilledPolygon in gd.o _gdReallocDynamic in gd_io_dp.o _gdImageCreateFromWebpCtx in gd_webp.o _gdImageTrueColorToPaletteBody in gd_topal.o "__estrdup", referenced from: _fontFetch in gdft.o _php_gd_gdImageXbmCtx in gd_xbm.o "__estrndup", referenced from: _php_imagechar in gd.o "__php_stream_cast", referenced from: __php_image_create_from in gd.o "__php_stream_copy_to_mem", referenced from: __php_image_create_from in gd.o "__php_stream_eof", referenced from: _zif_imageloadfont in gd.o "__php_stream_free", referenced from: _zif_imageloadfont in gd.o __php_image_create_from in gd.o __php_image_stream_ctxfreeandclose in gd.o "__php_stream_open_wrapper_ex", referenced from: _zif_imageloadfont in gd.o __php_image_create_from in gd.o __php_image_output_ctx in gd.o "__php_stream_read", referenced from: _zif_imageloadfont in gd.o "__php_stream_seek", referenced from: _zif_imageloadfont in gd.o "__php_stream_tell", referenced from: _zif_imageloadfont in gd.o "__php_stream_write", referenced from: __php_image_stream_putc in gd.o __php_image_stream_putbuf in gd.o "__safe_emalloc", referenced from: _zif_imagesetstyle in gd.o _php_imagepolygon in gd.o _php_gd_gdImageFill in gd.o __gdImageGd2 in gd_gd2.o _php_gd_gdImageCreateFromPngCtx in gd_png.o _php_gd_gdImagePngCtxEx in gd_png.o _php_gd_gdImageJpegCtx in gd_jpeg.o ... "__zend_new_array_0", referenced from: _zif_gd_info in gd.o _zif_imagecolorsforindex in gd.o _zif_imagegetclip in gd.o _php_imagettftext_common in gd.o _zif_imageaffinematrixget in gd.o _zif_imageaffinematrixconcat in gd.o _zif_imageresolution in gd.o ... "_add_assoc_bool_ex", referenced from: _zif_gd_info in gd.o "_add_assoc_long_ex", referenced from: _zif_imagecolorsforindex in gd.o "_add_assoc_string_ex", referenced from: _zif_gd_info in gd.o "_add_index_double", referenced from: _zif_imageaffinematrixget in gd.o _zif_imageaffinematrixconcat in gd.o "_add_next_index_long", referenced from: _zif_imagegetclip in gd.o _php_imagettftext_common in gd.o _zif_imageresolution in gd.o "_ap_php_snprintf", referenced from: _zm_info_gd in gd.o _php_gd_gdImageJpegCtx in gd_jpeg.o _fontFetch in gdft.o "_display_ini_entries", referenced from: _zm_info_gd in gd.o "_executor_globals", referenced from: _php_find_gd_font in gd.o "_php_check_open_basedir", referenced from: __php_image_output in gd.o _php_imagettftext_common in gd.o __php_image_convert in gd.o "_php_error_docref0", referenced from: _zif_imageloadfont in gd.o _zif_imagesetstyle in gd.o _zif_imagecreatetruecolor in gd.o _zif_imagetruecolortopalette in gd.o _zif_imagecolormatch in gd.o _zif_imagecreate in gd.o _zif_imagecreatefromstring in gd.o ... "_php_file_le_pstream", referenced from: __php_image_output_ctx in gd.o "_php_file_le_stream", referenced from: __php_image_output_ctx in gd.o "_php_info_print_table_end", referenced from: _zm_info_gd in gd.o "_php_info_print_table_row", referenced from: _zm_info_gd in gd.o "_php_info_print_table_start", referenced from: _zm_info_gd in gd.o "_php_open_temporary_file", referenced from: __php_image_output in gd.o "_php_sig_bmp", referenced from: _zif_imagecreatefromstring in gd.o "_php_sig_gif", referenced from: _zif_imagecreatefromstring in gd.o "_php_sig_jpg", referenced from: _zif_imagecreatefromstring in gd.o "_php_sig_png", referenced from: _zif_imagecreatefromstring in gd.o "_php_sig_riff", referenced from: _zif_imagecreatefromstring in gd.o "_php_sig_webp", referenced from: _zif_imagecreatefromstring in gd.o "_php_stream_stdio_ops", referenced from: __php_image_create_from in gd.o "_php_verror", referenced from: _php_gd_error_method in gd.o "_php_write", referenced from: __php_image_output in gd.o __php_image_output_putc in gd.o __php_image_output_putbuf in gd.o "_zend_error", referenced from: _gdImageCreateFromWebpCtx in gd_webp.o _gdImageWebpCtx in gd_webp.o "_zend_fetch_resource", referenced from: _zif_imagesetstyle in gd.o _zif_imageistruecolor in gd.o _zif_imagetruecolortopalette in gd.o _zif_imagepalettetotruecolor in gd.o _zif_imagecolormatch in gd.o _zif_imagesetthickness in gd.o _zif_imagefilledellipse in gd.o ... "_zend_fetch_resource2_ex", referenced from: __php_image_output_ctx in gd.o "_zend_hash_index_find", referenced from: _php_imagepolygon in gd.o _zif_imageconvolution in gd.o _zif_imageaffine in gd.o _zif_imageaffinematrixconcat in gd.o _php_find_gd_font in gd.o "_zend_hash_str_find", referenced from: _zif_imagecrop in gd.o _zif_imageaffine in gd.o _zif_imageaffinematrixget in gd.o "_zend_ini_long", referenced from: __php_image_create_from in gd.o __php_image_convert in gd.o "_zend_list_close", referenced from: _zif_imagedestroy in gd.o "_zend_list_insert", referenced from: _zif_imageloadfont in gd.o "_zend_parse_arg_long_slow", referenced from: _zif_imagecolorat in gd.o _zif_imagesetpixel in gd.o "_zend_parse_parameters", referenced from: _zif_imageloadfont in gd.o _zif_imagesetstyle in gd.o _zif_imagecreatetruecolor in gd.o _zif_imageistruecolor in gd.o _zif_imagetruecolortopalette in gd.o _zif_imagepalettetotruecolor in gd.o _zif_imagecolormatch in gd.o ... "_zend_register_ini_entries", referenced from: _zm_startup_gd in gd.o "_zend_register_list_destructors_ex", referenced from: _zm_startup_gd in gd.o "_zend_register_long_constant", referenced from: _zm_startup_gd in gd.o "_zend_register_resource", referenced from: _zif_imagecreatetruecolor in gd.o _zif_imagerotate in gd.o _zif_imagecreate in gd.o _zif_imagecreatefromstring in gd.o __php_image_create_from in gd.o _zif_imagecrop in gd.o _zif_imagecropauto in gd.o ... "_zend_register_string_constant", referenced from: _zm_startup_gd in gd.o "_zend_strndup", referenced from: __php_image_create_from in gd.o "_zend_vspprintf", referenced from: _error in gdkanji.o _php_gd_gdCtxPrintf in gd_xbm.o "_zend_wrong_param_count", referenced from: _php_imagettftext_common in gd.o _zif_imagefilter in gd.o "_zend_wrong_parameter_type_error", referenced from: _zif_imagecolorat in gd.o _zif_imagesetpixel in gd.o "_zend_wrong_parameters_count_error", referenced from: _zif_imagecolorat in gd.o _zif_imagesetpixel in gd.o "_zend_wrong_parameters_none_error", referenced from: _zif_gd_info in gd.o _zif_imagetypes in gd.o "_zval_get_double_func", referenced from: _php_imagettftext_common in gd.o _zif_imageconvolution in gd.o _zif_imageaffine in gd.o _zif_imageaffinematrixget in gd.o _zif_imageaffinematrixconcat in gd.o "_zval_get_long_func", referenced from: _zif_imagesetstyle in gd.o _php_imagepolygon in gd.o _zif_imagecrop in gd.o _zif_imageaffine in gd.o ld: symbol(s) not found for architecture x86_64
Attachments (3)
Change History (40)
comment:1 Changed 4 years ago by jmroot (Joshua Root)
Description: | modified (diff) |
---|---|
Keywords: | php73-gd removed |
Owner: | set to ryandesign |
Status: | new → assigned |
comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ohader added |
---|---|
Keywords: | bigsur added |
Port: | php added; php73-gd removed |
Status: | assigned → accepted |
Summary: | php73-gd failed to build on MacOS11 → php: modules fail to build with undefined symbols |
Has duplicate #61466. Probably the usual libtool bug with macOS 11+, for which there is a patch in the libtool port that can probably be copied to php.
comment:3 Changed 4 years ago by ohader (Oliver Hader)
Can you please point me to the corresponding patch for libtool
you mentioned? Thx in advance!
comment:4 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
comment:5 Changed 4 years ago by ohader (Oliver Hader)
I failed applying a similar approach to generated configure
files of any of these PHP extensions - basically due to my lack of knowledge on Macports details.
Looking forward to to any update or suggestion on this topic. Thx in advance!
comment:6 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
No worries, I'll take a look at it. Many, many ports fail to build on macOS 11 with similar errors so we have a lot of work to do and are going as fast as we can.
comment:7 Changed 4 years ago by elcheco (Miroslav Koula)
I found out yesterday the same - php74, php74-apache2handler and php74-fpm - works, but all other php74-[extensions] ports are dying on the same message above. Than you @ryandesign to take care about it ;-)
comment:8 Changed 4 years ago by eljakim (Eljakim Schrijvers)
if it's a know issue, and it's just a matter of spending time going through the php74-extension ports, please let me know if I can do anything to help.
comment:9 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
It's known, in that it is reported in this ticket, and in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44605.
It is unlikely that many or any changes are needed in individual extensions, but rather that changes are needed to m4 files installed by the php74 etc ports.
comment:10 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | mssio added |
---|
Has duplicate #61519.
comment:11 Changed 4 years ago by jonasjonas (Frank Hellenkamp)
Cc: | jonasjonas added |
---|
comment:12 Changed 4 years ago by eljakim (Eljakim Schrijvers)
Cc: | eljakim added |
---|
comment:13 Changed 4 years ago by nortcele
Cc: | nortcele added |
---|
comment:14 Changed 4 years ago by ugr
Cc: | ugr added |
---|
comment:15 Changed 4 years ago by kirmorozov (Kirill Morozov)
Hi @ryandesign, How can I help with PHP extensions?
Is it just an issue of libtool? Give me a hint, I'll make PR for extensions I use.
Changed 4 years ago by kirmorozov (Kirill Morozov)
Attachment: | xdebug-main.log added |
---|
xdebug build log
comment:16 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Thank you, more logs are not necessary. Fixes are not needed in individual extensions. Probably just the m4 files installed by php74, php73, etc need to be fixed.
comment:17 Changed 4 years ago by kirmorozov (Kirill Morozov)
Cc: | kirmorozov added |
---|
comment:18 Changed 4 years ago by kirmorozov (Kirill Morozov)
@ryandesign Are you talking about aclocal.m4 ? for php 7.2 it is the only one which has following:
10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
comment:19 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
php74 for example installs /opt/local/lib/php74/build/libtool.m4.
comment:20 Changed 4 years ago by kirmorozov (Kirill Morozov)
How good would be a patch for build/libtool.m4 ?
I'm going to open PR for 7.3 and 7.4, 7.2 goes out of support at the end of month.
comment:21 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
I will do the patch. I continue to support down to php52, although at present php72 and earlier do not build with Xcode 12.
Changed 4 years ago by kirmorozov (Kirill Morozov)
Attachment: | build-libtool.m4.diff added |
---|
Working patch for php 7.3 and 7.4
comment:22 Changed 4 years ago by kirmorozov (Kirill Morozov)
Pushing patch to PHP itself soon. https://bugs.php.net/bug.php?id=80393
comment:23 Changed 4 years ago by radarhere (Andrew Murray)
Cc: | radarhere added |
---|
comment:24 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
comment:25 Changed 4 years ago by eljakim (Eljakim Schrijvers)
One port does not build:
- php74-imap
I have tested the following other ports, and they all build fine now:
- php74-exif
- php74-gd
- php74-iconv
- php74-imagick
- php74-imap
- php74-intl
- php74-ldap
- php74-mbstring
- php74-mysql
- php74-openssl
- php74-pcntl
- php74-pdflib
- php74-posix
- php74-redis
- php74-soap
- php74-sqlite
- php74-timezonedb
- php74-xdebug
- php74-xsl
- php74-zip
- php74-curl
- php74-igbinary
comment:26 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
It seemed simpler to just change the deployment target value in a central place rather than require everyone to rebuild the main php ports. We might want to apply this same fix to MacPorts as a whole until things settle down; see #61584.
The imap extension can't start to build until its dependency cclient is fixed to build with Xcode 12+. I'm working on that now.
comment:27 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
comment:28 Changed 4 years ago by radarhere (Andrew Murray)
Cc: | radarhere removed |
---|
comment:29 Changed 4 years ago by ohader (Oliver Hader)
Thx for your great work! Sharing my experience on additional ports
- successful:
php74-gmp, php74-sockets, php74-sodium, php74-sqlite, php74-xdebug
- failed:
php74-mcrypt
due to a problem buildinglibmcrypt
comment:30 follow-up: 32 Changed 4 years ago by druidvav (Anton Vlasov)
Thanks for the fixes! Still not building: php74-geoip, php74-imagick, php74-ssh2, php74-zip
php74-memcached not building due to error in umem
comment:31 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
This ticket was about the problem that php's libtool.m4 has the macOS 11 deployment target bug. It was fixed by forcing the use of the 10.16 deployment target.
The additional issues that are now being reported here are separate problems that each need separate solutions and should be filed in separate tickets so that they can be investigated and tracked individually.
comment:32 follow-up: 33 Changed 4 years ago by kirmorozov (Kirill Morozov)
Built fine, try 'port clean php74-imagick'
UMEM has same issue with its m4 config.
10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
Replying to druidvav:
Thanks for the fixes! Still not building: php74-geoip, php74-imagick, php74-ssh2, php74-zip
php74-memcached not building due to error in umem
comment:33 Changed 4 years ago by druidvav (Anton Vlasov)
Replying to kirmorozov:
Built fine, try 'port clean php74-imagick'
My bad, cleaning fixed my issues. Only problem with umem remains.
comment:34 Changed 4 years ago by druidvav (Anton Vlasov)
I've opened ticket for umem bug: #61629
Thanks!
comment:35 Changed 4 years ago by druidvav (Anton Vlasov)
Cc: | druidvav added |
---|
comment:36 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Please add the complete log as an attachment.