Re: Unable to compile PHP-7.3.0
- Date: Wed, 26 Dec 2018 14:24:17 -0500
- From: John <john.iliffe@xxxxxxxxx>
- Subject: Re: Unable to compile PHP-7.3.0
On Wed, 2018-12-26 at 12:25 +0100, Christoph M. Becker wrote:
> 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 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.
>  <https://github.com/php/php-src/blob/php-7.3.0/ext/imap/config.m4#L212>
Thanks for the links Christoph. I downloaded the Fedora-25 rpm and if I can't
figure all this out I will install it. Due to the age of F25 (2017) this
repository rpm would backdate the PHP version I have installed.
My sincere apologies for the length of this memo, and if you want to save time,
please read only the last para. I know that you have other, more important,
things to spend your time on.
I have done some checking on the PHP configure script and I think I found some
errors. The one that is crashing everything at the moment is the last one on
the list below and providing links to the correct locations doesn't work.
configure doesn't seem to want to follow the links.
- throws error:
configure:3849: cc -qversion >&5
cc: error: unrecognized command line option '-qversion'; did you mean '
cc: fatal error: no input files
At this point configuration continues, (ie not fatal) BUT cc --version WILL
return 6.4.1 which would pass the version check and prevent the error
- throws a fatal error against confdefs.h but I can't find what package it is.
A web search says to ignore this error. (configure did that anyway) This
happens several times.
- if test -r $i/include/openssl/evp.h; then
as_fn_error $? "Cannot find OpenSSL's <evp.h>" "$LINENO" 5
This is the point at which configure crashes and as far as I can see the test is
wrong because in my install of openssl the header files are at
$PREFIX/include/openssl/....h I set up a soft link from <$PREFIX/include> to
<$PREFIX/include/openssl/evp.h> but configure won't follow that link. So, I
copied all of the ../openssl directory to the include directory (so the explicit
test for <$i/include/evp.h> would be satisfied) but I still get the same error.
I can live without imap having encryption so I removed the parameter with-imap-
ssl and tried again. Same error on evp.h, so changed the only other place where
openssl is defined to: "with-openssl=/usr/openssl-1.1.0i". This leads to a
crash with error: "configure: error: Cannot find OpenSSL's libraries". That
parameter HAS to be "with-openssl=/usr/openssl-1.1.0i/lib", that is, configure
does not descend the directory tree below the install directory.
Christoph, I am absolutely convinced that there are errors in the configuration
script for PHP-7.3.0 BUT I don't have the skill set to prove that. Do you think
that a problem report should be filed with PHP or am I right out in left field?