How to fix error utf8_mime2text()

Today I encountered the following error while recompiling php with imap support on a customer’s server (CentOS 6.4 – 64 bit): configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information. Unfortunately the config.log did not say much either, so I began searching on Google what this error is about and soon found out that it’s related to imap extension, so all I had to do was to download and recompile imap-2007e.tar.gz. Since this is a multi-php environment (using both php 5.4 and 5.3) this proved out to be a big hassle and a lot of dependencies were not met. Instead of trying to solve each issue one at a time, I decided to look for a smarter/faster solution so the first thing I did was to see what packages are related to imap and are also related to development

[root@someserver ~]# yum search all imap |grep -i dev
cyrus-imapd-devel.i686 : Cyrus IMAP server development files
cyrus-imapd-devel.x86_64 : Cyrus IMAP server development files
libc-client-devel.i686 : Development tools for programs which will use the IMAP
libc-client-devel.x86_64 : Development tools for programs which will use the
libsieve-devel.i686 : A library for parsing, sorting and filtering your mail
libsieve-devel.x86_64 : A library for parsing, sorting and filtering your mail

Since there weren’t so many packages to check I decided to see what’s in each with yum info and so I reached libc-client-devel:

[root@someserver ~]# yum info libc-client-devel.x86_64
Available Packages
Name        : libc-client-devel
Arch        : x86_64
Version     : 2007e
Release     : 11.el6
Size        : 56 k
Repo        : base
Summary     : Development tools for programs which will use the IMAP library.
URL         : http://www.washington.edu/imap/
License     : ASL 2.0
Description : The c-client-devel package contains the header files and static libraries
: for developing programs which will use the C-client common API.

Bingo! It seems to contain what was needed so I decided to install it

yum -y install libc-client-devel

After installation I was able to recompile php without issues. NOTE: Debian or deb based distribution users the package you need to install is libc-client2007e-dev 

apt-get install libc-client-dev

2 thoughts on “How to fix error utf8_mime2text()”

  1. Bingo! That did the trick! Stackoverflow proposed the weirdest possible alternatives, including commenting out the IMAP configuration options. Lots of thankyous!

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.