|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45793 conflicting types for `utf8_mime2text'
Submitted: 2008-08-12 06:02 UTC Modified: 2008-08-20 01:00 UTC
Avg. Score:3.3 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: amiheev at st-host dot ru Assigned: fb-req-jani (profile)
Status: No Feedback Package: IMAP related
PHP Version: 5.2.6 OS: Linux glibc-2.3.3-27 gcc-3.3.3
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-08-12 06:02 UTC] amiheev at st-host dot ru
This bug have been opened many times for a variety of php versions (up to 5.2.0), but most of them were closed due to no feedback. Hopefully, this report would be the final one.

As in previous reports, the problem occurs while trying to build PHP over a newer c-client version with new utf8_mime2text signature.

This is caused by undefined HAVE_NEW_MIME2TEXT. configure script detects new c-client correctly and comments out the '#undef HAVE_NEW_MIME2TEXT' line, but this is not enough. The following changes to main/php_config.h after running ./configure solve the problem:

 /* Whether utf8_mime2text() has new signature *
-/* #undef HAVE_NEW_MIME2TEXT */

Reproduce code:
./configure --with-imap=/usr/local && make

Expected result:
Compile without errors.

Actual result:
Compilation fails with the following output

/chr/src/php-5.2.6/ext/imap/php_imap.c:82: error: conflicting types for `utf8_mime2text'
/usr/local/include/utf8aux.h:37: error: previous declaration of `utf8_mime2text'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-12 14:21 UTC]
1. What is the exact c-client version you compile with?
2. Check your config.log for the relevant output for the check of utf8_mime2text() signature and paste here.
 [2008-08-12 14:29 UTC] amiheev at st-host dot ru
1. imap-2007b

2. Not too much:

configure:46967: checking for IMAP support
configure:47014: checking for IMAP Kerberos support
configure:47040: checking for IMAP SSL support
configure:47456: checking for utf8_mime2text signature
configure:47503: checking for U8T_CANONICAL

And a bit later:

configure:49236: checking whether build with IMAP works
configure:49274: gcc -o conftest -I/usr/local/include -g -O2  -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib conftest.c -lc-client   -lcrypt -lpam  -liconv -lfreetype -lpng -lz -ljpeg -lcurl -lz -lresolv -lm -ldl -lnsl  -lxml2 -lz -liconv -lm -lcurl -lxml2 -lz -liconv -lm 1>&5 
/usr/local/lib/libc-client.a(osdep.o)(.text+0x8b0b): In function `ssl_onceonlyin
it': /chr/src/imap/imap-2007b/c-client/osdep.c:353: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
 [2008-08-12 14:35 UTC]
Are you sure you don't have some old c-client header files in your system, for example in /usr/include or other header path included in the make?
 [2008-08-12 15:21 UTC] amiheev at st-host dot ru
Yes. Actually, I had the problem (quite different) with old version first, so I replaced old c-client files. So I did ensure I only have one instance of both c-client.h and utf8aux.h in this system.

Probably, the problems with different c-client versions could be relevant. I had "old" c-client in /usr/local and a "new" one in /usr/local/imap-2007b and failed to compile php over the new one, although I explicitly specified a "new" directory when ran configure. If it could relevant, I could try to reproduce, I have another box which still has old setup.
 [2008-08-12 15:31 UTC]
You really should have only one version per system. Mixing them, even in different directories while other has header files under common (f.e. /usr/include or /usr/local/include) will never work properly.
 [2008-08-20 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Jan 25 14:01:24 2021 UTC