Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#56835 - [php-enchant] Module fails to load

Attached to Project: Arch Linux
Opened by Jakob Gahde (J5lx) - Saturday, 23 December 2017, 14:36 GMT
Last edited by Doug Newgard (Scimmia) - Thursday, 25 January 2018, 22:05 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Pierre Schmitz (Pierre)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

PHP fails to load the enchant module and errors out like this:

PHP Warning: PHP Startup: Unable to load dynamic library 'enchant.so' (tried: /usr/lib/php/modules/enchant.so (/usr/lib/php/modules/enchant.so: undefined symbol: enchant_dict_is_in_session), /usr/lib/php/modules/enchant.so.so (/usr/lib/php/modules/enchant.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Additional info:
* php-enchant version: 7.2.0-2
* enchant version: 2.1.2-3

Steps to reproduce:
1. Make sure the enchant PHP module is enabled (i.e. extension=enchant.so in configuration)
2. Run `php -m` in a terminal and observe:
a) above error message
b) enchant is missing from the [PHP Modules] section of the output
This task depends upon

Closed by  Doug Newgard (Scimmia)
Thursday, 25 January 2018, 22:05 GMT
Reason for closing:  Fixed
Additional comments about closing:  enchant 2.2 moved to Extra
Comment by Eli Schwartz (eschwartz) - Sunday, 24 December 2017, 03:04 GMT
  • Field changed: Status (Unconfirmed → Assigned)
  • Field changed: Severity (Low → High)
  • Task assigned to Pierre Schmitz (Pierre)
PHP documentation claims that the enchant plugin only supports enchant 1.x: https://secure.php.net/manual/en/enchant.requirements.php

The source code history would tend to agree: https://github.com/php/php-src/commits/PHP-7.2.0/ext/enchant

Either we should build against a legacy enchant1 package, or we should enable the bundled enchant, or figure out how to get this to work with modern versions of enchant.
Comment by Jan de Groot (JGC) - Sunday, 24 December 2017, 07:14 GMT
Patching is not hard at all.

Enchant upstream decided to make 1.x and 2.x co-installable though, so we have to patch and recompile everything again or simply introduce 1.x package.
Comment by Jan de Groot (JGC) - Sunday, 21 January 2018, 23:06 GMT
php71 and php in (community-)staging have been patched for Enchant 2.x support. Deprecated function calls have been replaced with more modern function names. I didn't change the PHP API, so enchant_dict_is_in_session still exists as PHP function.
Comment by Jakob Gahde (J5lx) - Wednesday, 24 January 2018, 23:42 GMT
  • Field changed: Percent Complete (100% → 0%)
While the package appears to be working with enchant 2 now, the PHP module is linked to the non-existent libenchant-2.so.2, while it should actually be linked to libenchant.so.2. As it is now, the module can only be loaded if a symlink is in place.

ldd output:

$ ldd /usr/lib/php/modules/enchant.so
linux-vdso.so.1 (0x00007ffcf27de000)
libenchant-2.so.2 => not found
libc.so.6 => /usr/lib/libc.so.6 (0x00007f726596a000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007f7265f27000)
Comment by Doug Newgard (Scimmia) - Wednesday, 24 January 2018, 23:44 GMT
It's simply linked to enchant from testing but got moved to extra instead of testing by mistake.

Loading...