After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 787646 - Replace deprecated and removed enchant API usage
Replace deprecated and removed enchant API usage
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
3.26.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2017-09-13 21:10 UTC by Armin K.
Modified: 2017-09-18 10:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (1.18 KB, patch)
2017-09-14 18:57 UTC, Guido Trentalancia
reviewed Details | Review

Description Armin K. 2017-09-13 21:10:05 UTC
Enchant-2.1.1 was recently released and it removed some deprecated APIs which Evolution is still using. Trying to build Evolution-3.26.0 against Enchant-2.1.1 results in following errors:

/home/armin/src/pacman/pkgbuild/evolution/src/evolution-3.26.0/src/e-util/e-spell-dictionary.c:674:2: error: implicit declaration of function 'enchant_dict_add_to_personal' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        enchant_dict_add_to_personal (enchant_dict, word, length);
        ^
/home/armin/src/pacman/pkgbuild/evolution/src/evolution-3.26.0/src/e-util/e-spell-dictionary.c:674:2: note: did you mean 'enchant_dict_add_to_session'?
/usr/include/enchant/enchant.h:199:6: note: 'enchant_dict_add_to_session' declared here
void enchant_dict_add_to_session (EnchantDict * dict, const char *const word, ssize_t len);
     ^
/home/armin/src/pacman/pkgbuild/evolution/src/evolution-3.26.0/src/e-util/e-spell-dictionary.c:754:2: error: implicit declaration of function 'enchant_dict_free_suggestions' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        enchant_dict_free_suggestions (enchant_dict, suggestions);
        ^
/home/armin/src/pacman/pkgbuild/evolution/src/evolution-3.26.0/src/e-util/e-spell-dictionary.c:754:2: note: did you mean 'enchant_dict_suggest'?
/usr/include/enchant/enchant.h:178:8: note: 'enchant_dict_suggest' declared here
char **enchant_dict_suggest (EnchantDict * dict, const char *const word,


Refer to commit [1] for details.

Easy bug fix (taken from [1]):

sed -i "s#enchant_dict_add_to_personal#enchant_dict_add#g" src/e-util/e-spell-dictionary.c
sed -i "s#enchant_dict_free_suggestions#enchant_dict_free_string_list#g" src/e-util/e-spell-dictionary.c

[1] https://github.com/AbiWord/enchant/commit/744a1a19c1d0a5c3e1359fa994cf60a4d98ee12e
Comment 1 Guido Trentalancia 2017-09-14 18:57:11 UTC
Created attachment 359809 [details] [review]
Proposed patch
Comment 2 Milan Crha 2017-09-18 08:14:02 UTC
Thanks for a bug report and patch. Searching for the addition of enchant_dict_add(), it's in the sources since 1.4.0, and the enchant_dict_free_string_list() had been added in time of 1.2.1, but evolution has set minimum dependency on enchant at version 1.1.7.

This change is no problem for master, where the dependency version bump can be done, but even the 1.4.0 is more than 4 years old, the stable branch is problematic, strictly speaking.
Comment 3 Milan Crha 2017-09-18 10:05:44 UTC
I used Guido's patch with added enchant version dependency bump in the git master branch and made a backwards compatible change for the stable branch.

Created commit f5691e9a5f in evo master (3.27.1+)
Created commit cbe916e1c5 in evo gnome-3-26 (3.26.1+)