|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39401 conflicting types for utf8_mime2text
Submitted: 2006-11-06 15:23 UTC Modified: 2007-01-29 10:08 UTC
Avg. Score:4.4 ± 0.8
Reproduced:5 of 5 (100.0%)
Same Version:3 (60.0%)
Same OS:3 (60.0%)
From: wouter at widexs dot nl Assigned:
Status: Closed Package: IMAP related
PHP Version: 4.4.4 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: wouter at widexs dot nl
New email:
PHP Version: OS:


 [2006-11-06 15:23 UTC] wouter at widexs dot nl
I get an error when trying to build PHP 5.2.0 with imap c-client 2006c1 ( :

/opt/install/widexs_apache_2006_017/php-5.2.0/ext/imap/php_imap.c:79: conflicting types for `utf8_mime2text'
/opt/install/widexs_apache_2006_017/imap-2006c1/c-client/utf8.h:548: previous declaration of `utf8_mime2text'

Which is correct, because:

* PHP 5.2.0 : long utf8_mime2text(SIZEDTEXT *src, SIZEDTEXT *dst);
* imap c-client 2006c1 : long utf8_mime2text (SIZEDTEXT *src,SIZEDTEXT *dst,long flags);

Haven't tested with previous versions of PHP, but I assume the same will happen.

IMAP c-client 2004g gives no problem.

This could be seen as a DUP of #37948 and #38941, but it is still present in 5.2.0 ...

Actual result:
/bin/sh /opt/install/widexs_apache_2006_017/php-5.2.0/libtool --silent --preserve-dup-deps --mode=compile gcc  -Iext/imap/ -I/opt/install/widexs_apache_2006_017/php-5.2.0/ext/imap/ -DPHP_ATOM_INC -I/opt/install/widexs_apache_2006_017/php-5.2.0/include -I/opt/install/widexs_apache_2006_017/php-5.2.0/main -I/opt/install/widexs_apache_2006_017/php-5.2.0 -I/usr/local/include/libxml2 -I/usr/local/ssl/include -I/usr/local/include -I/opt/install/widexs_apache_2006_017/php-5.2.0/ext/date/lib -I/usr/include/freetype2 -I/opt/install/widexs_apache_2006_017/imap-2006c1/c-client -I/opt/install/widexs_apache_2006_017/php-5.2.0/ext/mbstring/oniguruma -I/opt/install/widexs_apache_2006_017/php-5.2.0/ext/mbstring/libmbfl -I/opt/install/widexs_apache_2006_017/php-5.2.0/ext/mbstring/libmbfl/mbfl -I/usr/local/mysql/include/mysql -I/usr/local/pgsql/include -I/opt/install/widexs_apache_2006_017/php-5.2.0/TSRM -I/opt/install/widexs_apache_2006_017/php-5.2.0/Zend    -I/usr/include -g -O2  -c /opt/install/widexs_apache_2006_017/php-5.2.0/ext/imap/php_imap.c -o ext/imap/php_imap.lo
/opt/install/widexs_apache_2006_017/php-5.2.0/ext/imap/php_imap.c:79: conflicting types for `utf8_mime2text'
/opt/install/widexs_apache_2006_017/imap-2006c1/c-client/utf8.h:548: previous declaration of `utf8_mime2text'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-06 17:01 UTC]
Does your imap's mail.h header contain the mail_append_set() 
 [2006-11-06 18:25 UTC] wouter at widexs dot nl
Yes, it does :)

grep "mail_append_set" src/c-client/mail.h

SEARCHSET *mail_append_set (SEARCHSET *set,unsigned long msgno);
 [2006-11-07 17:09 UTC]
Can you see if HAVE_NEW_MIME2TEXT is defined inside PHP's 
main.h ?
 [2006-11-07 18:49 UTC] wouter at widexs dot nl
It hasn't ...

php-5.2.0/main/php_config.h:/* #undef HAVE_NEW_MIME2TEXT */
 [2006-11-07 19:26 UTC] wouter at widexs dot nl
configure:45679: ../imap-2006c1/c-client/mail.h: No such file or directory

This file exists though...

If I change configure from :

#include <$IMAP_INC_DIR/mail.h>


#include "$IMAP_INC_DIR/mail.h"

It correctly works...
 [2006-11-07 19:58 UTC] wouter at widexs dot nl
This patch fixes my problem ...

--- php-5.2.0/configure Wed Nov  1 03:01:06 2006
+++ php-5.2.0-fix/configure     Tue Nov  7 20:55:02 2006
@@ -45673,10 +45673,12 @@
 rm -f conftest*

         cat > conftest.$ac_ext <<EOF
 #line 45678 "configure"
 #include "confdefs.h"
-#include <$IMAP_INC_DIR/mail.h>
+#include "mail.h"
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "mail_append_set" >/dev/null 2>&1; then
@@ -45690,7 +45692,8 @@
 rm -f conftest*

     cat > conftest.$ac_ext <<EOF
 [2006-11-07 20:53 UTC]
It works just fine here as long as the fullpath to the library 
is specified ala /usr/local/imap-2006c 
 [2006-11-17 10:26 UTC] wouter at widexs dot nl
This was indeed fixed when using full-path, BUT it is still present in PHP 4.4.4 and PHP4-dev.

(bugfix from 5.x not backported to 4.x)
 [2007-01-03 19:42 UTC] jmoseley at pgtv dot com
Can someone provide a patch for 4.4.4?  The latest CVS release of 4.4.4 does not include the fix.

I'd compile 5.2.0, but I am having linker problems since I run a Solaris box that uses a GCC compiler build with Sun's ld, blah, blah, blah.
 [2007-01-22 15:53 UTC] php at aaronrubin dot com
Are there any plans to patch this? The latest snapshots still 
have the same issue.
 [2007-01-26 12:33 UTC] dmda at yandex dot ru
you can fix this with following:

open ext/php_imap.c in your favorite editor,
remove utf8_mime2text prototype (it's just wrong),
find utf8_mime2text function call and add 3rd arguement:

that's all tricks.
 [2007-01-26 12:55 UTC] wouter at widexs dot nl
That's not the point ;)

It's the hope to have this fixed in 4.4.5 so we can use it without patching, just like in 5.x
 [2007-01-29 10:08 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 28 15:01:30 2024 UTC