#64953 closed defect (fixed)
php81-mailparse @3.1.3_0: fails to load with error symbol not found in flat namespace '_mbfl_convert_filter_delete'
Reported by: | slaakso (Seppo Laaksonen) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.2 |
Keywords: | monterey | Cc: | chrisminett (Chris Minett) |
Port: | php-mailparse, php-event |
Description
With a clean install the php81-mailparse into macOS Monterey fails to load with error:
PHP Warning: PHP Startup: Unable to load dynamic library 'mailparse.so' (tried: /opt/local/lib/php81/extensions/no-debug-non-zts-20210902/mailparse.so (dlopen(/opt/local/lib/php81/extensions/no-debug-non-zts-20210902/mailparse.so, 0x0009): symbol not found in flat namespace '_mbfl_convert_filter_delete'), /opt/local/lib/php81/extensions/no-debug-non-zts-20210902/mailparse.so.so (dlopen(/opt/local/lib/php81/extensions/no-debug-non-zts-20210902/mailparse.so.so, 0x0009): tried: '/usr/local/mysql/lib/mailparse.so.so' (no such file), '/mailparse.so.so' (no such file), '/opt/local/lib/php81/extensions/no-debug-non-zts-20210902/mailparse.so.so' (no such file))) in Unknown on line 0
Tried the install from source, but with same result. _mbfl_convert_filter_delete seems to refer to mbstring which is also installed.
Change History (8)
comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… removed |
---|---|
Owner: | set to ryandesign |
Port: | @3.1.3_0 removed |
Status: | new → assigned |
comment:2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Port: | php-mailparse added; php81-mailparse removed |
---|---|
Status: | assigned → accepted |
comment:3 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
This seems to be another instance of the loader on macOS 12 being pickier than on earlier OS versions about missing symbols. (#64448 is another such case.) This symbol, as you noted, is provided by mbstring, but PHP extensions are loaded alphabetically, so at the moment that mailparse is loaded, this mbstring symbol is not yet there.
As a workaround, rename /opt/local/var/db/php81/mailparse.ini so that it comes alphabetically after mbstring.ini, for example:
sudo mv /opt/local/var/db/php81/mailparse.ini /opt/local/var/db/php81/zmailparse.ini
If you do this, be prepared to redo it if you upgrade php81-mailparse, and to undo it once a better fix is found.
I'm still trying to find out if this is a bug in mailparse or mbstring that can be fixed without needing to resort to reordering the .ini files. If not, I'll change php-mailparse so that it does rename its .ini file automatically.
comment:4 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Port: | php-event added |
---|
php-event has the same problem (it depends on php-sockets):
Warning: PHP Startup: Unable to load dynamic library 'event.so' (tried: /opt/local/lib/php81/extensions/no-debug-non-zts-20210902/event.so (dlopen(/opt/local/lib/php81/extensions/no-debug-non-zts-20210902/event.so, 0x0009): symbol not found in flat namespace '_socket_ce'), /opt/local/lib/php81/extensions/no-debug-non-zts-20210902/event.so.so (dlopen(/opt/local/lib/php81/extensions/no-debug-non-zts-20210902/event.so.so, 0x0009): tried: '/opt/local/lib/php81/extensions/no-debug-non-zts-20210902/event.so.so' (no such file))) in Unknown on line 0
although curiously php-event has this problem macOS 11 and earlier too. Not sure why mailparse only has this problem on macOS 12 then.
And I've encountered it before in php-http2, and renaming the .ini file is what I did there so I'll do that here too.
comment:5 Changed 3 years ago by slaakso (Seppo Laaksonen)
OK. That will dot it.
Thank you for the prompt investigation.
comment:6 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
comment:7 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:8 Changed 3 years ago by chrisminett (Chris Minett)
Cc: | chrisminett added |
---|
Thank you for the report! I agree it does do that on Monterey but not on Big Sur. I am investigating.