|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #76962 Enchant module should support enchant >= 2.0
Submitted: 2018-10-02 17:11 UTC Modified: 2021-08-26 16:30 UTC
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: grknight at gentoo dot org Assigned: cmb (profile)
Status: Closed Package: Enchant related
PHP Version: 7.2.10 OS: Gentoo Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: grknight at gentoo dot org
New email:
PHP Version: OS:


 [2018-10-02 17:11 UTC] grknight at gentoo dot org
Enchant 2.0 has a compatibility break in it's API/ABI.

Trying to compile PHP 7.2.10 ends in failure

Expected result:
Compilation success

Actual result:
/bin/sh /var/tmp/portage/dev-lang/php-7.2.10/work/sapis-build/cli/libtool --silent --preserve-dup-deps --mode=link x86_64-pc-linux-gnu-gcc -export-dyn
amic -O2 -pipe -fvisibility=hidden -DZEND_SIGNALS    -Wl,-O1 -Wl,--as-needed ext/date/php_date.lo ext/date/lib/astro.lo ext/date/lib/dow.lo ext/date/lib/parse_date.lo ext/date/lib/parse_tz.lo ext/date/lib/timelib.lo ext/date/lib/tm2unixtime.lo ext/date/lib/unixtime2tm.lo ext/date/lib/parse_iso_intervals.lo ext/date/lib/interval.lo ext/pcre/php_pcre.lo ext/enchant/enchant.lo ext/readline/readline.lo ext/readline/readline_cli.lo ext/reflection/php_reflection.lo ext/spl/php_spl.lo ext/spl/spl_functions.lo ext/spl/spl_engine.lo ext/spl/spl_iterators.lo ext/spl/spl_array.lo ext/spl/spl_directory.lo ext/spl/spl_exceptions.lo ext/spl/spl_observer.lo ext/spl/spl_dllist.lo ext/spl/spl_heap.lo ext/spl/spl_fixedarray.lo ext/standard/crypt_freesec.lo
ext/standard/crypt_blowfish.lo ext/standard/crypt_sha512.lo ext/standard/crypt_sha256.lo ext/standard/php_crypt_r.lo ext/standard/array.lo ext/standard/base64.lo ext/standard/basic_functions.lo ext/standard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo ext/standard/cyr_convert.lo ext/standard/datetime.lo ext/standard/dir.lo ext/standard/dl.lo ext/standard/dns.lo ext/standard/exec.lo ext/standard/file.lo ext/standard/filestat.lo ext/standard/flock_compat.lo ext/standard/formatted_print.lo ext/standard/fsock.lo ext/standard/head.lo ext/standard/html.lo ext/standard/image.lo ext/standard/info.lo ext/standard/iptc.lo ext/standard/lcg.lo ext/standard/link.lo ext/standard/mail.lo ext/standard/math.lo ext/standard/md5.lo ext/standard/metaphone.lo ext/standard/microtime.lo ext/standard/pack.lo ext/standard/pageinfo.lo ext/standard/quot_print.lo ext/standard/rand.lo ext/standard/mt_rand.lo ext/standard/soundex.lo ext/standard/string.lo ext/standard/scanf.lo ext/standard/syslog.lo ext/standard/type.lo ext/standard/uniqid.lo ext/standard/url.lo ext/standard/var.lo ext/standard/versioning.lo ext/standard/assert.lo ext/standard/strnatcmp.lo ext/standard/levenshtein.lo ext/standard/incomplete_class.lo ext/standard/url_scanner_ex.lo ext/standard/ftp_fopen_wrapper.lo ext/standard/http_fopen_wrapper.lo ext/standard/php_fopen_wrapper.lo ext/standard/credits.lo ext/standard/css.lo ext/standard/var_unserializer.lo ext/standard/ftok.lo ext/standard/sha1.lo ext/standard/user_filters.lo ext/standard/uuencode.lo ext/standard/filters.lo ext/standard/proc_open.lo ext/standard/streamsfuncs.lo ext/standard/http.lo ext/standard/password.lo ext/standard/random.lo TSRM/TSRM.lo TSRM/tsrm_strtok_r.lo main/main.lo main/snprintf.lo main/spprintf.lo main/php_sprintf.lo main/fopen_wrappers.lo main/alloca.lo main/php_scandir.lo main/php_ini.lo main/SAPI.lo main/rfc1867.lo main/php_content_types.lo main/strlcpy.lo main/strlcat.lo main/explicit_bzero.lo main/mergesort.lo main/reentrancy.lo main/php_variables.lo main/php_ticks.lo main/network.lo main/php_open_temporary_file.lo main/output.lo main/getopt.lo main/streams/streams.lo main/streams/cast.lo main/streams/memory.lo main/streams/filter.lo main/streams/plain_wrapper.lo main/streams/userspace.lo main/streams/transports.lo main/streams/xp_socket.lo main/streams/mmap.lo main/streams/glob_wrapper.lo Zend/zend_language_parser.lo Zend/zend_language_scanner.lo Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo Zend/zend_alloc.lo Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dtrace.lo Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zend_vm_opcodes.lo Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_sort.lo Zend/zend_multibyte.lo Zend/zend_ts_hash.lo Zend/zend_stream.lo Zend/zend_iterators.lo Zend/zend_interfaces.lo Zend/zend_exceptions.lo Zend/zend_strtod.lo Zend/zend_gc.lo Zend/zend_closures.lo Zend/zend_float.lo Zend/zend_string.lo Zend/zend_signal.lo Zend/zend_generators.lo Zend/zend_virtual_cwd.lo Zend/zend_ast.lo Zend/zend_objects.lo Zend/zend_object_handlers.lo Zend/zend_objects_API.lo Zend/zend_default_classes.lo Zend/zend_inheritance.lo Zend/zend_smart_str.lo Zend/zend_execute.lo main/internal_functions_cli.lo sapi/cli/php_cli.lo sapi/cli/php_http_parser.lo sapi/cli/php_cli_server.lo sapi/cli/ps_title.lo sapi/cli/php_cli_process_title.lo -lcrypt -lresolv -lcrypt -ledit -lncurses -lenchant -lpcre -lrt -lm -ldl -lnsl -lcrypt -lcrypt  -o sapi/cli/php
/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ext/enchant/enchant.o: in function `zif_enchant_dict_quick_check': enchant.c:(.text+0xbd0): undefined reference to `enchant_dict_free_suggestions'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ext/enchant/enchant.o: in function `zif_enchant_dict_suggest':
enchant.c:(.text+0xd3f): undefined reference to `enchant_dict_free_suggestions'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ext/enchant/enchant.o: in function `zif_enchant_dict_add_to_personal':
enchant.c:(.text+0xe04): undefined reference to `enchant_dict_add_to_personal'/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ext/enchant/enchant.o: in function `zif_enchant_dict_is_in_session':
enchant.c:(.text+0x15bd): undefined reference to `enchant_dict_is_in_session'


enchant-2.patch (last revision 2020-03-25 23:21 UTC by tbk at jjtc dot eu)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-10-02 17:33 UTC]
-Status: Open +Status: Verified -Package: Compile Failure +Package: Enchant related
 [2018-10-02 17:33 UTC]
See <>.
 [2018-10-03 21:24 UTC]
-Summary: Cannot compile enchant module with enchant >= 2.0 +Summary: Enchant module should support enchant >= 2.0 -Status: Verified +Status: Open -Type: Bug +Type: Feature/Change Request
 [2018-10-03 21:24 UTC]
Well, the docs[1] already state:

| Enchant 2.0.0 or later is not yet supported.

So I'm changing this to a feature request.

[1] <>
 [2020-02-06 07:39 UTC] bigon at debian dot org

The enchant_dict_is_in_session() and enchant_dict_free_suggestions() functions are already deprecated in the version 1 of the library, the comment above the function says:

 * enchant_dict_is_in_session
 * @dict: A non-null #EnchantDict
 * @word: The word you wish to see if it's in your session in UTF8 encoding
 * @len: the byte length of @word, or -1 for strlen (@word)
 * DEPRECATED. Please use enchant_dict_is_added() instead.


 * enchant_dict_free_suggestions
 * @dict: A non-null #EnchantDict
 * @suggestions: The non-null suggestion list returned by
 *               'enchant_dict_suggest'
 * Releases the suggestions
 * This function is DEPRECATED. Please use enchant_dict_free_string_list() instead.

So in any case it should be a good idea to update the code.

For the rest the only difference between version 1 and version 2 will be the pkg-config file (enchant.pc vs enchant-2.pc) nothing more

FTR, the NEWS entry for version 2 was stating:

2.0.0 (August 4, 2017)

The major version number has been incremented owing to API/ABI changes, but
in practice upgrading from 1.6.x should be easy.

Previously-deprecated APIs have been removed.

The little-used enchant_broker_get/set_param calls have been removed.

Some trivial API changes have been made to fix otherwise-unavoidable
compilation warnings both in libenchant and in application code. This is
strictly an ABI change (although the ABI may not actually have changed,
depending on the platform).

The provider API has been changed slightly: enchant_get_user_language is now
a documented public API (before it was marked private, but it has in fact
been exported for some years). enchant_get_user_config_dirs is now
enchant_get_user_config_dir, and returns only a single directory.

The plethora of configuration options previously available has been
rationalised and documented. In particular, support for relocation (so that
Enchant, or an application of which it is part, can be installed anywhere in
a filing system) has been rewritten and documented (see INSTALL).

The Myspell backend has been renamed to Hunspell to match the upstream
project. Users with their own enchant.ordering files will need to change
“myspell” to “hunspell”.
 [2020-03-25 23:21 UTC] tbk at jjtc dot eu
The following patch has been added/updated:

Patch Name: enchant-2.patch
Revision:   1585178492
 [2021-08-26 16:30 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-08-26 16:30 UTC]
Enchant 2 is supported as of PHP 8.0.0[1].  This is already
mentioned in the migration guide[2], and the manual proper[3].

[1] <>
[2] <>
[3] <>
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 22 23:01:31 2024 UTC