Closed llaville closed 8 months ago
I am pretty sure this is not a bug, but follow the suggestion in the error message:
Check config.log for additional information.
I don't find any config.log
file, and more than that
/tmp/
├── hsperfdata_root
└── pear
├── cache
│ ├── 09c7a4116060de71a6a89c55a781511brest.cachefile
│ ├── 09c7a4116060de71a6a89c55a781511brest.cacheid
│ ├── 1af6566454b2ae1bb15cec0a285d07eerest.cachefile
│ ├── 1af6566454b2ae1bb15cec0a285d07eerest.cacheid
│ ├── 8ac57f69d71d859c4f5a971758531700rest.cachefile
│ ├── 8ac57f69d71d859c4f5a971758531700rest.cacheid
│ ├── e212497613ee5d3730a6c63e484fc656rest.cachefile
│ └── e212497613ee5d3730a6c63e484fc656rest.cacheid
├── download
│ └── imap-1.0.0.tgz
└── temp
6 directories, 9 files
There is no /tmp/pear/temp/imap/configure
available ! (/tmp/pear/tmp
is empty)
You'll have to do the manual install to see the log:
pecl download imap
tar -xvzf imap-1.0.0.tgz
cd imap-1.0.0
phpize
./configure
Here is the result of my config.log
14kb (that I don't understand, sorry)
I now remember that I had a similar problem. The problem is that the build system can not find the c-client
installed on your system.
You can see that in:
configure:4960: cc -c -I conftest.c >&5
Where it should be:
configure:4960: cc -c -I/usr/include/c-client conftest.c >&5
The build system expects a mail.h
and c-client.h
file in one of the following directories:
/usr/local/include/c-client
/usr/local/include/imap
/usr/local/include
/usr/local/imap
/usr/local/c-client
/usr/include/c-client
/usr/include/imap
/usr/include
/usr/imap
/usr/c-client
On my Debian system it finds /usr/include/c-client/mail.h
, which is installed through the libc-client2007e-dev
package. Installing that with apt-get
should do the job.
After trying to install the libc-client requirement
root@php-8.1.27 in ~ $ apt-get update
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease
Hit:4 https://packages.microsoft.com/debian/12/prod bookworm InRelease
Reading package lists... Done
root@php-8.1.27 in ~ $ apt-get install libc-client-dev -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libc-client2007e-dev' instead of 'libc-client-dev'
libc-client2007e-dev is already the newest version (8:2007f~dfsg-7+b2).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
And trying to install imap
without kerberos and ssl support by answering to questions
Include Kerberos Support [yes] : no
Include SSL Support [yes] : no
I got this error
configure: error: This c-client library is built with Kerberos support.
Add --with-kerberos to your configure line. Check config.log for details.
ERROR: `/tmp/pear/temp/imap/configure --with-php-config=/usr/local/bin/php-config --with-kerberos=no --with-imap-ssl=no' failed
So I've let down this possibility and try to install imap
with kerberos and ssl support, but I got these errors
imap extension is only compatible with PHP 8.3+
PHP Api Version: 20210902
This is PHP 8.1
Notice: package.xml in git is OK https://github.com/php/pecl-mail-imap/blob/main/package.xml#L147 (min = 8.3.0) but package.xml in pecl tarball is wrong (min = 8.1.0)
After installing required lib, all seems ok with pecl install imap
apt-get install libc-client-dev -y
apt-get install libkrb5-dev -y
pecl install imap
Would you mind making a PR to the readme to document this?
Did your forget my comment about disabling support ?
And trying to install
imap
without kerberos and ssl support by answering to questions
Include Kerberos Support [yes] : no
Include SSL Support [yes] : no
I got this error
configure: error: This c-client library is built with Kerberos support.
Add --with-kerberos to your configure line. Check config.log for details.
ERROR: `/tmp/pear/temp/imap/configure --with-php-config=/usr/local/bin/php-config --with-kerberos=no --with-imap-ssl=no' failed
I don't think if there is a workaround for that or if any other libraries that I don't know yet allow to compile `imap` without these supports
We can't do much about this on the PHP (pecl extension) side, as it is how the system installed c-client has been built.
I suppose it is possible to compile your own c-client without kerberos/SSL support, but if the system installed c-client already links to it, you have to enable it for the extension too.
Hello,
To be honest, as I'm a newbie in C, I don't know if it's a real issue or not.
I've tried few minutes ago to install this
imap
extension from PECL, on a PHP 8.1.26 version (that of course have already imap bundled version)php --ri
Now with following command
pecl install imap
, and choose to disable kerberos and ssl support, I got this output (see ERROR at end) :