[php-src] Issue #9503: Error in compiling php7.4.30
| From: | coder-liyang | Date: | Thu, 08 Sep 2022 03:01:28 +0000 |
| Subject: | [php-src] Issue #9503: Error in compiling php7.4.30 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-242377@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/9503
Author: coder-liyang
### Description
### Error in compiling php7.4.30
```
./configure \
--prefix=/usr/local/php7.4 \
--enable-mbstring \
--enable-xml \
--enable-pdo \
--enable-gd \
--enable-dom \
--enable-pcntl \
--enable-fpm \
--enable-bcmath \
--enable-sockets \
--enable-fpm \
--with-openssl \
--with-zlib \
--with-libxml \
--with-pdo_mysql \
--with-curl
```
```
make
```
```
sudo make install
```
This error comes from **make install**
```
In file included from /home/liyang/Downloads/php-7.4.30/main/php.h:441,
from /home/liyang/Downloads/php-7.4.30/ext/openssl/openssl.c:28:
/home/liyang/Downloads/php-7.4.30/ext/openssl/openssl.c: In function ‘zm_startup_openssl’:
/home/liyang/Downloads/php-7.4.30/ext/openssl/openssl.c:1520:58: error: ‘RSA_SSLV23_PADDING’
undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
1520 | REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING,
CONST_CS|CONST_PERSISTENT);
| ^~~~~~~~~~~~~~~~~~
/home/liyang/Downloads/php-7.4.30/Zend/zend_constants.h:53:105: note: in definition of macro
‘REGISTER_LONG_CONSTANT’
53 | #define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name),
sizeof(name)-1, (lval), (flags), module_number)
|
^~~~
/home/liyang/Downloads/php-7.4.30/ext/openssl/openssl.c:1520:58: note: each undeclared identifier is
reported only once for each function it appears in
1520 | REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING,
CONST_CS|CONST_PERSISTENT);
| ^~~~~~~~~~~~~~~~~~
.
.
.
.
.
.
.
In file included from /home/liyang/Downloads/php-7.4.30/ext/openssl/openssl.c:46:
/usr/include/openssl/rsa.h:288:5: note: declared here
288 | int RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to,
| ^~~~~~~~~~~~~~~~~~
/home/liyang/Downloads/php-7.4.30/ext/openssl/openssl.c:5960:41: warning: ‘EVP_PKEY_get0_RSA’ is
deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
5960 | EVP_PKEY_get0_RSA(pkey),
| ^~~~~~~~~~~~~~~~~
In file included from /home/liyang/Downloads/php-7.4.30/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1346:22: note: declared here
1346 | const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
| ^~~~~~~~~~~~~~~~~
/home/liyang/Downloads/php-7.4.30/ext/openssl/openssl.c:5960:41: warning: passing argument 4 of
‘RSA_public_decrypt’ discards ‘const’ qualifier from pointer target type
[-Wdiscarded-qualifiers]
5960 | EVP_PKEY_get0_RSA(pkey),
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/liyang/Downloads/php-7.4.30/ext/openssl/openssl.c:46:
/usr/include/openssl/rsa.h:289:29: note: expected ‘RSA *’ {aka ‘struct rsa_st *’} but
argument is of type ‘const struct rsa_st *’
289 | RSA *rsa, int padding);
| ~~~~~^~~
make: *** [Makefile:706: ext/openssl/openssl.lo] Error 1
```
### PHP Version
PHP 7.4.30
### Operating System
Ubuntu 22.04 LTS