Web lists-archives.com

Re: Unable to compile PHP-7.3.0

On 26.12.2018 at 05:37, John wrote:

> This is turning into an exercise in stamina!  A web search came up with the same
> error on a Centos PHP 7.3.0 install and the solution is to change the with-
> libdir parameter from /usr/lib64 to lib64.  This seems wrong to me and doesn't
> create or point to libc-client.a, so the error message is misleading.

Indeed, this error message[1] looks fishy (the .a extension should
likely be removed from the message).

> Then I got "cannot find OpenSSL's <evp.h>", even though it is in /usr/openssl-
> 1.1.0i/include/openssl and I had with-imap-ssl=/usr/openssl-1.1.0i.  
> Since this error is occurring in the extensions section of the configuration, I
> tried variations such as "with-imap-ssl=/usr/openssl-1.1.0i/include/openssl
> without any luck.  A web search shows that this is a fairly common problem for
> people installing PHP 7.3.0 but none of the answers I can find work.  It is
> confusing that the paths to the various supporting files such as openssl vary
> between different extensions.  The instructions seem to imply that the given
> path is to the base of the install (ie /usr/openssl-1.1.0i in my case) but
> sometimes refer to the exact path (ie /usr/openssl-1.1.0i/lib) and, apparently,
> sometimes not (ie /usr/openssl-1.1.0i/include/openssl leads to "cannot find
> OpenSSL's <evp.h>) 
> As things stand, I seem to be able to take my pick of any error I want by
> playing with the configuration parameters but I can't get rid of all of them at
> once. 
> FYI, here is the exact configuration I have at the moment:
> ../configure prefix=/usr/php-7.3.0 --enable-fpm --with-fpm-user=phpfpm --with-
> fpm-group=phpfpm --with-fpm-systemd --disable-short-tags --with-
> openssl=/usr/openssl-1.1.0i/lib --with-pcre-regex --with-imap=/usr/lib64 --with-
> imap-ssl=/usr/openssl-1.1.0i/include/openssl --with-pgsql=/usr/postgres-
> 9.6.2/bin --enable-zip --with-pear
> which leads to the <evp.h> error.

It seems to me that the OpenSSL stuff uses pkg-config, if you don't
specify a path, so try with

  --with-openssl --with-imap-ssl

Anyhow, if you just want to have a working installation of PHP with IMAP
support, you may have better luck using Remi's repo[2].

[1] <https://github.com/php/php-src/blob/php-7.3.0/ext/imap/config.m4#L212>

Christoph M. Becker