php / pecl-mail-imap

An extension to operate with the IMAP protocol, as well as the NNTP, POP3, and local mailbox access methods.
Other
8 stars 2 forks source link

error in ubuntu 24.04 #10

Open thaamaraiselvan opened 4 months ago

thaamaraiselvan commented 4 months ago

When I integrated this plugin with ubuntu 24.04 I got the below error.

/usr/local/src/imap-1.0.0/php_imap.h:50:32: error: expected declaration specifiers or ‘...’ before string constant
   50 |  ZEND_DIAGNOSTIC_IGNORED_START("-Wstrict-prototypes")
      |                                ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c-client/c-client.h:41,
                 from /usr/local/src/imap-1.0.0/php_imap.h:51:
/usr/include/c-client/mail.h:636:13: error: field ‘text’ has incomplete type
  636 |   SIZEDTEXT text;               /* string text */
      |             ^~~~
/usr/include/c-client/mail.h:750:13: error: field ‘text’ has incomplete type
  750 |   SIZEDTEXT text;               /* text */
      |             ^~~~
/usr/include/c-client/mail.h:914:13: error: field ‘line’ has incomplete type
  914 |   SIZEDTEXT line;               /* header line */
      |             ^~~~
/usr/include/c-client/mail.h:915:13: error: field ‘text’ has incomplete type
  915 |   SIZEDTEXT text;               /* text in header */
      |             ^~~~
/usr/include/c-client/mail.h:1133:13: error: field ‘text’ has incomplete type
 1133 |   SIZEDTEXT text;               /* scratch buffer for text */
      |             ^~~~
/usr/local/src/imap-1.0.0/php_imap.h:52:29: error: expected ‘;’ before ‘typedef’
   52 |  ZEND_DIAGNOSTIC_IGNORED_END
      |                             ^
      |                             ;
/usr/local/src/imap-1.0.0/php_imap.h:91:19: error: field ‘text’ has incomplete type
   91 |         SIZEDTEXT text;
      |                   ^~~~
/usr/local/src/imap-1.0.0/php_imap.h:98:19: error: field ‘text’ has incomplete type
   98 |         SIZEDTEXT text;
      |                   ^~~~
/usr/local/src/imap-1.0.0/php_imap.c: In function ‘zif_imap_utf8’:
/usr/local/src/imap-1.0.0/php_imap.c:2219:19: error: storage size of ‘src’ isn’t known
 2219 |         SIZEDTEXT src, dest;
      |                   ^~~
/usr/local/src/imap-1.0.0/php_imap.c:2219:24: error: storage size of ‘dest’ isn’t known
 2219 |         SIZEDTEXT src, dest;
      |                        ^~~~
/usr/local/src/imap-1.0.0/php_imap.c: In function ‘zif_imap_mail_compose’:
/usr/local/src/imap-1.0.0/php_imap.c:3329:41: warning: implicit declaration of function ‘zend_zval_value_name’; did you mean ‘zend_zval_type_name’? [-Wimplicit-function-declaration]
 3329 |                                         zend_zval_value_name(data));
      |                                         ^~~~~~~~~~~~~~~~~~~~
      |                                         zend_zval_type_name
make: *** [Makefile:210: php_imap.lo] Error 1
cmb69 commented 2 months ago

Are you trying to build ext/imap for PHP 8.2 or older? That is not supported, since you can (and should) use the bundled ext/imap prior to PHP 8.4.0.