Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP compile fail during openssl.c #4133

Closed
shrimpwagon opened this issue Aug 10, 2017 · 3 comments
Closed

PHP compile fail during openssl.c #4133

shrimpwagon opened this issue Aug 10, 2017 · 3 comments

Comments

@shrimpwagon
Copy link

Not sure what all this means but here you go:

Debian 9
PHP 5.6.31

# uname -a
Linux shrimpwagon 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) x86_64 GNU/Linux

# openssl version
OpenSSL 1.1.0f  25 May 2017

/bin/bash /usr/local/server-setup/php-5.6.31/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/openssl/ -I/usr/local/server-setup/php-5.6.31/ext/openssl/ -DPHP_ATOM_INC -I/usr/local/server-setup/php-5.6.31/include -I/usr/local/server-setup/php-5.6.31/main -I/usr/local/server-setup/php-5.6.31 -I/usr/local/server-setup/php-5.6.31/ext/date/lib -I/usr/local/server-setup/php-5.6.31/ext/ereg/regex -I/usr/include/libxml2 -I/usr/include/freetype2 -I/usr/local/server-setup/php-5.6.31/ext/mbstring/oniguruma -I/usr/local/server-setup/php-5.6.31/ext/mbstring/libmbfl -I/usr/local/server-setup/php-5.6.31/ext/mbstring/libmbfl/mbfl -I/usr/local/server-setup/php-5.6.31/ext/sqlite3/libsqlite -I/usr/local/server-setup/php-5.6.31/ext/zip/lib -I/usr/local/server-setup/php-5.6.31/TSRM -I/usr/local/server-setup/php-5.6.31/Zend -I/usr/include -g -O2 -fvisibility=hidden -c /usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c -o ext/openssl/openssl.lo
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c: In function ‘add_assoc_name_entry’:
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:664:4: warning: ‘ASN1_STRING_data’ is deprecated [-Wdeprecated-declarations]
to_add = ASN1_STRING_data(str);
^~~~~~
In file included from /usr/include/openssl/bn.h:31:0,
from /usr/include/openssl/asn1.h:24,
from /usr/include/openssl/objects.h:916,
from /usr/include/openssl/evp.h:27,
from /usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:44:
/usr/include/openssl/asn1.h:553:1: note: declared here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING x))
^
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c: In function ‘asn1_time_to_time_t’:
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:717:2: warning: ‘ASN1_STRING_data’ is deprecated [-Wdeprecated-declarations]
if (ASN1_STRING_length(timestr) != strlen((const char
)ASN1_STRING_data(timestr))) {
^~
In file included from /usr/include/openssl/bn.h:31:0,
from /usr/include/openssl/asn1.h:24,
from /usr/include/openssl/objects.h:916,
from /usr/include/openssl/evp.h:27,
from /usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:44:
/usr/include/openssl/asn1.h:553:1: note: declared here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:732:2: warning: ‘ASN1_STRING_data’ is deprecated [-Wdeprecated-declarations]
strbuf = estrdup((char *)ASN1_STRING_data(timestr));
^~~~~~
In file included from /usr/include/openssl/bn.h:31:0,
from /usr/include/openssl/asn1.h:24,
from /usr/include/openssl/objects.h:916,
from /usr/include/openssl/evp.h:27,
from /usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:44:
/usr/include/openssl/asn1.h:553:1: note: declared here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c: In function ‘php_openssl_get_evp_md_from_algo’:
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:1057:24: warning: implicit declaration of function ‘EVP_dss1’ [-Wimplicit-function-declaration]
mdtype = (EVP_MD *) EVP_dss1();
^~~~~~~~
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:1057:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
mdtype = (EVP_MD *) EVP_dss1();
^
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c: In function ‘zif_openssl_spki_export_challenge’:
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:1726:2: warning: ‘ASN1_STRING_data’ is deprecated [-Wdeprecated-declarations]
RETVAL_STRING((char *) ASN1_STRING_data(spki->spkac->challenge), 1);
^~~~~~~~~~~~~
In file included from /usr/include/openssl/bn.h:31:0,
from /usr/include/openssl/asn1.h:24,
from /usr/include/openssl/objects.h:916,
from /usr/include/openssl/evp.h:27,
from /usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:44:
/usr/include/openssl/asn1.h:553:1: note: declared here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c: In function ‘openssl_x509v3_subjectAltName’:
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:1904:15: error: dereferencing pointer to incomplete type ‘X509_EXTENSION {aka struct X509_extension_st}’
p = extension->value->data;
^~
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:1925:6: warning: ‘ASN1_STRING_data’ is deprecated [-Wdeprecated-declarations]
BIO_write(bio, ASN1_STRING_data(as),
^~~~~~~~~
In file included from /usr/include/openssl/bn.h:31:0,
from /usr/include/openssl/asn1.h:24,
from /usr/include/openssl/objects.h:916,
from /usr/include/openssl/evp.h:27,
from /usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:44:
/usr/include/openssl/asn1.h:553:1: note: declared here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:1931:6: warning: ‘ASN1_STRING_data’ is deprecated [-Wdeprecated-declarations]
BIO_write(bio, ASN1_STRING_data(as),
^~~~~~~~~
In file included from /usr/include/openssl/bn.h:31:0,
from /usr/include/openssl/asn1.h:24,
from /usr/include/openssl/objects.h:916,
from /usr/include/openssl/evp.h:27,
from /usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:44:
/usr/include/openssl/asn1.h:553:1: note: declared here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:1937:6: warning: ‘ASN1_STRING_data’ is deprecated [-Wdeprecated-declarations]
BIO_write(bio, ASN1_STRING_data(as),
^~~~~~~~~
In file included from /usr/include/openssl/bn.h:31:0,
from /usr/include/openssl/asn1.h:24,
from /usr/include/openssl/objects.h:916,
from /usr/include/openssl/evp.h:27,
from /usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:44:
/usr/include/openssl/asn1.h:553:1: note: declared here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c: In function ‘zif_openssl_x509_parse’:
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:1982:10: error: dereferencing pointer to incomplete type ‘X509 {aka struct x509_st}’
if (cert->name) {
^~
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c: In function ‘php_openssl_generate_private_key’:
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:3420:5: warning: ‘RSA_generate_key’ is deprecated [-Wdeprecated-declarations]
if (EVP_PKEY_assign_RSA(req->priv_key, RSA_generate_key(req->priv_key_bits, 0x10001, NULL, NULL))) {
^~
In file included from /usr/include/openssl/rsa.h:13:0,
from /usr/include/openssl/x509.h:31,
from /usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:45:
/usr/include/openssl/rsa.h:193:1: note: declared here
DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void
^
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:3428:6: warning: ‘DSA_generate_parameters’ is deprecated [-Wdeprecated-declarations]
DSA *dsapar = DSA_generate_parameters(req->priv_key_bits, NULL, 0, NULL, NULL, NULL, NULL);
^~~
In file included from /usr/include/openssl/dh.h:13:0,
from /usr/include/openssl/dsa.h:31,
from /usr/include/openssl/x509.h:32,
from /usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:45:
/usr/include/openssl/dsa.h:122:1: note: declared here
DEPRECATEDIN_0_9_8(DSA *DSA_generate_parameters(int bits,
^
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:3446:6: warning: ‘DH_generate_parameters’ is deprecated [-Wdeprecated-declarations]
DH *dhpar = DH_generate_parameters(req->priv_key_bits, 2, NULL, NULL);
^~
In file included from /usr/include/openssl/dh.h:13:0,
from /usr/include/openssl/dsa.h:31,
from /usr/include/openssl/x509.h:32,
from /usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:45:
/usr/include/openssl/dh.h:135:1: note: declared here
DEPRECATEDIN_0_9_8(DH *DH_generate_parameters(int prime_len, int generator,
^
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c: In function ‘php_openssl_is_private_key’:
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:3485:14: error: dereferencing pointer to incomplete type ‘EVP_PKEY {aka struct evp_pkey_st}’
switch (pkey->type) {
^~
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c: In function ‘php_openssl_pkey_init_dsa’:
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:3557:10: error: dereferencing pointer to incomplete type ‘DSA {aka struct dsa_st}’
if (!dsa->p || !dsa->q || !dsa->g) {
^~
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c: In function ‘php_openssl_pkey_init_dh’:
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:3580:9: error: dereferencing pointer to incomplete type ‘DH {aka struct dh_st}’
if (!dh->p || !dh->g) {
^~
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c: In function ‘zif_openssl_pkey_new’:
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:3548:9: error: dereferencing pointer to incomplete type ‘RSA {aka struct rsa_st}’
_type->_name = BN_bin2bn(
^
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:3617:6: note: in expansion of macro ‘OPENSSL_PKEY_SET_BN’
OPENSSL_PKEY_SET_BN(Z_ARRVAL_PP(data), rsa, n);
^~~~~~~~~~~~~~~~~~~
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c: In function ‘zif_openssl_sign’:
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:4801:13: error: storage size of ‘md_ctx’ isn’t known
EVP_MD_CTX md_ctx;
^~~~~~
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:4845:2: warning: implicit declaration of function ‘EVP_MD_CTX_cleanup’ [-Wimplicit-function-declaration]
EVP_MD_CTX_cleanup(&md_ctx);
^~~~~~~~~~~~~~~~~~
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c: In function ‘zif_openssl_verify’:
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:4859:17: error: storage size of ‘md_ctx’ isn’t known
EVP_MD_CTX md_ctx;
^~~~~~
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c: In function ‘zif_openssl_seal’:
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:4920:17: error: storage size of ‘ctx’ isn’t known
EVP_CIPHER_CTX ctx;
^~~
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c: In function ‘zif_openssl_open’:
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:5048:17: error: storage size of ‘ctx’ isn’t known
EVP_CIPHER_CTX ctx;
^~~
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c: In function ‘zif_openssl_digest’:
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:5154:13: error: storage size of ‘md_ctx’ isn’t known
EVP_MD_CTX md_ctx;
^~~~~~
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c: In function ‘zif_openssl_encrypt’:
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:5233:17: error: storage size of ‘cipher_ctx’ isn’t known
EVP_CIPHER_CTX cipher_ctx;
^~~~~~~~~~
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c: In function ‘zif_openssl_decrypt’:
/usr/local/server-setup/php-5.6.31/ext/openssl/openssl.c:5316:17: error: storage size of ‘cipher_ctx’ isn’t known
EVP_CIPHER_CTX cipher_ctx;
^~~~~~~~~~
Makefile:549: recipe for target 'ext/openssl/openssl.lo' failed
make: *** [ext/openssl/openssl.lo] Error 1

@bukka
Copy link
Contributor

bukka commented Aug 10, 2017

PHP 5.6 is receiving only security fixes and OpenSSL 1.1 is not supported. Please use PHP 7.x if you want to use OpenSSL 1.1.

This ticket should be closed as it is not an OpenSSL issue.

@shrimpwagon
Copy link
Author

Oh, wow. Ok. Thank you for the quick response!!!

@richsalz richsalz reopened this Aug 10, 2017
@bukka
Copy link
Contributor

bukka commented Aug 10, 2017

@shrimpwagon Forgot to mention in case you really need it you can use this backport for 5.6 from Remi which basically backports my changes for support OpenSSL 1.1 in 7.x:

remicollet/php-src@4ca75ff

encodeering added a commit to encodeering/docker-php that referenced this issue Jan 6, 2018
* would require additional setup to build more than 2 versions on semaphore co

NOTE

* php 5.6 requires jessie as base image
** openssl/openssl#4133
encodeering added a commit to encodeering/docker-php that referenced this issue Jan 6, 2018
* all images below 7.2 seem to use jessie as base image

NOTe

* php 5.6 requires jessie as base image
** openssl/openssl#4133
encodeering added a commit to encodeering/docker-php that referenced this issue Jan 6, 2018
* all images below 7.2 seem to use jessie as base image

NOTe

* php 5.6 requires jessie as base image
** openssl/openssl#4133
encodeering added a commit to encodeering/docker-php that referenced this issue Jan 6, 2018
* all images below 7.2 seem to use jessie as base image

NOTe

* php 5.6 requires jessie as base image
** openssl/openssl#4133
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants